Denominate

Home » Code » denominate

Denominate is a simple program and an associated library supporting bulk file and directory name normalization. If you’ve ever spent a long time changing filenames to get rid of whitespace or convert periods and underscores to hyphens, you know why it exists.

Denominate makes it very easy to normalize the names using a default scheme, and the associated library exposes enough reusable functionality that you can easily define your own custom renaming schemes. Additionally, it provides some useful generic functions related to file and directory walking and renaming.

There is Haddock API documentation available here. A stable version is available as a source tarball: version 0.5.0. And the latest and greatest is in the Darcs repository, which you can get by pointing Darcs at the URL of this page. Patches, requests, and suggestions are welcome.

Example

An example is worth a thousand words, so here is a quick example:

calvin@gould /tmp $ find DOCUMENTS -type f
DOCUMENTS/Notes/Haskell CheatSheet___1.pdf
DOCUMENTS/Notes/Cabal Notes^^^from_luigi.pdf
DOCUMENTS/Notes/How I Learned to Stop Worrying and Love Monads.pdf
DOCUMENTS/papers--to-read/__When_Is_a_Function_a_Fold_or_an_unfold.pdf
calvin@gould /tmp $ denominate DOCUMENTS
calvin@gould /tmp $ find DOCUMENTS -type f
DOCUMENTS/papers-to-read/when-is-a-function-a-fold-or-an-unfold.pdf
DOCUMENTS/notes/haskell-cheatsheet-1.pdf
DOCUMENTS/notes/cabal-notes-from-luigi.pdf
DOCUMENTS/notes/how-i-learned-to-stop-worrying-and-love-monads.pdf
calvin@gould /tmp $ 

Note that the root directory itself is unchanged, which is always the case.

History

This site is valid XHTML+RDFa, CSS.