natalian archives tag

shell

Pouring soju

I wrote a couple of bash scripts to insert and update information into a mysql database.

  1. Imagetrack
  2. pyblosxom2wordpress

They are both disappointingly slow interfacing with the mysql client. Though with the help of imagetrack, I’ve managed to collate information of about 20000 images of mine on different machines in an hour. I hope to do some analysis with this information. Like figure out which images are corrupted or have had their EXIF mashed or their time wrong.

pyblosxom2wordpress is a script to insert old blog entries from my previous blogging system pybloxsom. This has been on my TODO for a long time.

Finally I got around to doing it. Most of the old blog entries are quite embarrassing. Oh well, they’re are all here now. One could use the script to continue writing their blog in a blosxom fashion and periodically run my script to insert the new entries.

Whilst examining the Wordpress MySQL DDL, I found it could do with some better restraints. Perhaps they kept it loose for other DBMSes.

Posted Tags: shell

God pokes at camera

A little caveat. Find doesn’t seem to like symlinks. Since /media/cdrom is a symlink to /media/cdrom0, using /media/cdrom0 with find will work. I spent far too much time figuring this out.


frodo$ cd /media/cdrom
frodo$ find `pwd` -iname ’*.jpg’
# hmmm, there are images here.
frodo$ find . -iname ’*.jpg’ # this works…
./common/0.jpg
./common/clip_art/e_mail/75/ec1.jpg
./common/clip_art/e_mail/75/ec2.jpg
...

Another reason to sigh about this FHS /media schema.

Posted Tags: shell

(Re-)Discovered a TZ conversion bug in coreutil’s date late last night.

Really didn’t expect bugs in shell tools like date.

I could work around it adjusting the epoch with date +%z but that would be an awful hack.

Sadly, I have been writing scripts for handling my pictures again and again. All because EXIFs are FECKED up with by dates by the camera and then by my favourite image viewer feh. And then screenshots etc. don’t have EXIF. narf.

Time is the most important attribute for data.

All the digital images that are taken are going to be very hard to manage without proper dates. The Y2K problem is a joke compared to this IMO.

While we’re here, how about scalable images?

I’ve had this feeling before. If something isn’t designed right from the start, an exponential amount of problems result.

Posted Tags: shell

Add a comment