?

Log in

No account? Create an account
entries friends calendar profile adric.net Previous Previous Next Next
./sizes *.jpg - nil.enroll(aetheric_username, quantum_class_id)
yljatlhQo'! QIch lo'laltbebej!
adric
adric
./sizes *.jpg
I got this working pretty quickly and it involved clevering out some arcana, including how to do math with the output of your pipes(?!). Also, if will help me reorganize the wallpaper collection. Exif is a neat tool if you don't have it.


#!/bin/bash
## print images files and their pixel sizes, for wallpaper
## might take target from first argument
## requires exif package, available in apt

for image in *.jpg; ##$1;
do
while exif --tag PixelXDimension $image 2>&1 > /dev/null ;
do
echo -n $image " "
echo -n $((`exif --tag PixelXDimension $image | grep Value | tail -1 | awk '{print $2}'`/2)) x" "
echo -n $((`exif --tag PixelYDimension $image | grep Value | tail -1 | awk '{print $2}'`/2)) y
echo;
break;
done
done

Sample output:

400177main_MilkyWayCenterComp3000.jpg 1500 x 1200 y


I'm sure none of you care much but I'm quite pleased I was able to figure this out in only a couple tries**

ETA: fixes, works well though there is still some error junk in the output, even with the 2>&1 > dev/null incantation.


**The hours wasted fighting with gem, ImageMagick, macports (sudo mv /opt/not.opt), and make last week will not be spoken of. Take one point from ruby and put it into bash's bucket.

Tags:
Current Location: NOC
Current Music: Bleach soundtracks

5 comments or Leave a comment
Comments
vidicon From: vidicon Date: December 15th, 2010 04:43 pm (UTC) (Link)
Still trying to get apt-get install build-essential and necessary headers on my Galaxy S for what it's worth. :/
adric From: adric Date: December 15th, 2010 05:26 pm (UTC) (Link)

Saurik's stuff works for me with some mods

I can just give you the files when you are in USB range soon...
10dimensions From: 10dimensions Date: December 15th, 2010 09:37 pm (UTC) (Link)

appropriately enough today *is* Bleach Day

How's the Bleach soundtrack?
adric From: adric Date: January 2nd, 2011 07:42 pm (UTC) (Link)

Re: appropriately enough today *is* Bleach Day

Oops, lag. I blame ... humans.

I snagged a big ol torrent ball of a Bleach music from when I was still keeping up with the show. It's all of the score and weird pop fight music plus the singles with all of the opening and closing tracks, and some other random bits, including bits of the show.

It tends to overpower my other soundtracks and anime music in playlists by shear volume and that there are three version of each track (or so).

Really did mean to reply to you when you commented, had it gmail the whole time staring at me...

How are your dave and your kitties?
10dimensions From: 10dimensions Date: September 8th, 2011 03:14 am (UTC) (Link)

Re: appropriately enough today *is* Bleach Day <--- today, too

Hey... would there be any way I could get a copy of that stuff? I can give you someplace to upload to if you need one. I am also ftp-capable for downloading.

[How after-the-fact was this? But I meant to ask a long time ago and forgot, which is why the comment email got saved. I want that fight song! ;)]
5 comments or Leave a comment