Linux for Photography
bits and bobs
My adventures with encoding Video from a Minidv video camera for SVCD awaiting an update
also fiddeling with zone minder to store changed images on a database from a camera watching my drive
Various scripts in Bash, Korn shell or Perl
These are fragments I put together to do odd jobs and are here more as an aide-memoire for me as I'm eternaly thinking 'I know just what sort of construct / loop / filescan I need to do this job', Now where is it...
- Remember:- Someone else's code is like their underpants;
- warm and comforting to them;
- rarely do they want you to see it and mostly you don't want to get into it.
- I. M. Hayhurst 2002
- That said, come and fossick in my drawers.
- encoderdriver (shell) When Grip broke down and left me with a directory of wav files waiting to become mp3's, just a script to do something with every file in a directory.
- 96well-assign (perl) Takes a list of items and assigns them a well in a 96-well plate (8 rows A-H x 12 columns 1-12) writes a list of the item it's plate No. and Row & column. I was quite chuffed with this as it seemed just a little bit nifty using modular arithmatic.
- iterate (perl) Just a fragment to drive a comparison of each of the elements in an array against all of the others.
- nested (shell)Iterate through a list of lists, i.e take a list of m3u playlist files and check there is a file at the end of the path for each item in the m3u file.
- dupget and dup-strip (perl)Scan a FASTA file build a hash of the description line and look for identical lines, dup-strip takes out the duplicate and associated sequence.
- derwent2fasta (perl) Makes a FASTA file out of the embl style record from all the .dat files in a directory, er what , yes quite specialised but a useful parseing reference for me.
- wibble (perl) A reminder how to use the stat function in perl, The script takes a list of files (and their path) and reports how much space they are taking up, There are easier ways of doing this, but the ctime mtime and atime is useful for brewing up complicated find commands.
- linkchange Changing all the links to a file (shell) Filling up a website with notes on how it's maintained is a self-sustaining activity, However I overcame my (shameful) aversion to sed and used this to change all the links on the site from filename.html to filename.php (for the gallery page). This was in order to use php to do a page include rather than change all the gallery pages everytime I added a new one. Now irrelevant as the site is driven by a wiki engine