phatsort: FAT filesystem sort utility

[ library, mit, program, utils ] [ Propose Tags ]

This package provides a utility for sorting files and directories on a FAT filesystem. Please see the README on GitHub at https://github.com/ExtremaIS/phatsort-haskell#readme.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
write-hie

write .hie files

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.5.0.1
Change log CHANGELOG.md
Dependencies ansi-wl-pprint (>=0.6 && <0.7), base (>=4.7 && <5), directory (>=1.3 && <1.4), filepath (>=1.4 && <1.5), MonadRandom (>=0.5 && <0.6), optparse-applicative (>=0.14 && <0.18), phatsort, random-shuffle (>=0.0.4 && <0.1), transformers (>=0.5 && <0.6), unix-compat (>=0.5 && <0.7) [details]
License MIT
Copyright Copyright (c) 2019-2022 Travis Cardwell
Author Travis Cardwell <travis.cardwell@extrema.is>
Maintainer Travis Cardwell <travis.cardwell@extrema.is>
Revised Revision 1 made by TravisCardwell at 2022-05-22T20:20:36Z
Category Utils
Home page https://github.com/ExtremaIS/phatsort-haskell#readme
Bug tracker https://github.com/ExtremaIS/phatsort-haskell/issues
Source repo head: git clone https://github.com/ExtremaIS/phatsort-haskell.git
Uploaded by TravisCardwell at 2022-03-02T04:48:05Z
Distributions LTSHaskell:0.5.0.1, NixOS:0.5.0.1, Stackage:0.5.0.1
Executables seqcp, phatsort
Downloads 42 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-03-02 [all 1 reports]

Readme for phatsort-0.5.0.1

[back to package description]

PhatSort

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub CI Hackage Stackage LTS Stackage Nightly

Overview

The PhatSort project provides two command-line utilities for sorting files and directories on FAT filesystems. The phatsort utility sorts files and directories that are already on the filesystem. The seqcp utility copies files and directories to the filesystem in sorted order.

There are many MP3 players that allow you to mount the device as external storage and manage the media yourself. The storage generally uses a FAT filesystem. When copying multiple files onto the storage, using the command line (cp/mv) or a GUI, they are generally stored in an arbitrary order. This is not a problem if the firmware of the MP3 player sorts by filename, but many MP3 players use the order in the FAT filesystem without sorting, which results in podcasts and album tracks being played out of order.

There are some utilities that sort the FAT tables of an unmounted filesystem. (See Related Software for information and links.) Unfortunately, there are many devices for which this does not work. PhatSort takes a different approach to solving the problem. It works by creating new directories and moving ("renaming") the files in the desired order, while the filesystem is mounted. This method works on all devices that have been tried so far.

PhatSort also (optionally) forces the filesystem buffers to be written to the storage media after each change. This helps avoid write failures when using devices that have problems with writing large amounts of data. Note that the seqcp utility helps with this issue even on non-FAT filesystems.

CLI

Requirements

PhatSort has only been tested on Linux. It might work on other operating systems. Scripts that are output use POSIX shell commands and therefore require a POSIX shell to execute.

Installation

.deb Package Installation

Check the Releases page for .deb packages.

.rpm Package Installation

Check the Releases page for .rpm packages.

Installation From Hackage

Install PhatSort from Hackage using Cabal as follows:

$ cabal v2-install phatsort

Installation From Stackage

Install PhatSort from Stackage using Stack as follows:

$ stack install phatsort

Usage

See the phatsort and seqcp man pages for usage information.

FATSort is a command-line utility that sorts unmounted FAT filesystems by direct manipulation of the FAT tables. Unfortunately, there are many devices for which this does not work.

YAFS is a command-line utility that sorts unmounted FAT filesystems by direct manipulation of the FAT tables. Visual YAFS provides a GUI. I have not tried either of these.

DriveSort is Windows GUI software that sorts unmounted FAT filesystems by direct manipulation of the FAT tables. I have not tried it.

Project

Tags

All releases are tagged in the main branch. Release tags are signed using the security@extrema.is GPG key.

Contribution

Issues and feature requests are tracked on GitHub: https://github.com/ExtremaIS/phatsort-haskell/issues

Issues may also be submitted via email to bugs@extrema.is.

License

This project is released under the MIT License as specified in the LICENSE file.