public
Description: random pieces of code
Homepage: http://darrenf.org/
Clone URL: git://github.com/darrenf/odds-and-sods.git
README
Odds and sods

pork.py
-------
This is a generator which marries some yaml to your choice of 4 --
/four/, count 'em -- template engines (OK, 3 and string.Template,
which isn't really an engine) and creates some output.  In a file,
if you want.

Oh look, tests!

templates
---------
Some templates I may or may not actually use in anger.  Likely to be
for my use, and of (vague) potential interest as examples for anyone
else.  Grouped by use.

* templates/tag-and-rename-mp3s

  Can you guess what this is for? The files document themselves through
  typically judicious and verbose commenting, but since you're already
  reading this... it's a yaml skeleton and jinja2 template.  Combine the
  two and you end up with a shell script which will tag and rename a set
  of mp3s (so long as they're called <num>*mp3).

fix-unknowns.py
---------------
A script which combines the above.  Basically, drop a file called
'tracklist.txt' in a directory full of mp3s you want tagged and
rename, call fix-unknowns.py with the parent directory, then go
into that directory in a shell and run ./tracks.sh.  Simple.  Should
be safe and non-destructive, but who knows?

tracklist.txt should be this format:

    * first line: album title
    * subsequent lines: tab separated track number, artist, and
      song title

There are pre-requisites and stuff.  Read the file itself, it has
docstrings and comments galore.  And if it's not obvious, I wrote it
for personal use on my vortexbox

    http://www.vortexbox.org/