Skip to main content
Buat HTML Thumbnails guna command line

Saja jek,coz saya nak create html thumbnails guna digikam,tak nampak lak plugin tu kluar even dah emerge on Gentoo.

Short cut,guna command line bash saja,dengan syarat imagemagick dah diemerge.

katakan saya ada berpuluh-puluh fail JPG dan nak letak pada laman web,

buat satu direktori,

mkdir th


buat thumbnail:

for i in *.jpg; do convert -sample 25%x25% $i th/$i ; done


buat html thumbnail:


for i in *.jpg ; do echo " src=\""th/$i\"">" >> index.html; done



(kena escape " dengan \" kalau tak readable oleh for loop).
digikam punya html plugin tak jalan,terpaksa guna CLI.


siap!

Comments

Anonymous said…
aku guna igal jer. mula2 memang plan nk buat camni tapi igal is better. :)
0xff said…
igal pun actually needs imagemagick as dependencies :-)

kalau guna digikam punya actually much better i guess.

anyway,aku pun tengah emerge igal,thanx for point it out. :-)
Marjan Jeffry said…
nie solution python aku linuxlah python 4 mnajem
Anonymous said…
>igal pun actually needs imagemagick as dependencies :-)
nvm ... imagemagick memang dah lama ada kt system aku. tapi aku takder PIL, sebab tu aku suka igal. satu sebab lagi aku tak payah buat coding. org malas memang camni. jangan tiru aku. python rock ! :)
Marjan Jeffry said…
Yes python rock :p ... tapi any solution pun rock asalkan boleh jalan

Popular posts from this blog

Danga Bay, Chevrolet Optra and bio...(eh?) I thought it was Debian(haha). My colleague point me to the AirAsia flight turbin and he told me, "Macam debian punya logo" I saw a spiral on top the turbin blades. Pretty much like Debian Logo That's spark me to shoot for a pix. And I was warned by the airport staff. Uh,uh. Flash lamp will spark burst,eh? I was presented my "mock" research proposal. Suggested "Profiling Bioinformatics Application Behavior on Distributed Computing Architecture". Eh, will this gonna be bioinformatics specific or hardware optimization specific.or? Flashback: I spent almost a week at the office. When it's Subh azan,went back to my house for bath and pray. Reading all the journals and papers was not funny,really. Tough eye balls. No world cup. Ewh. And have some VCD lure. Uh,uh. you gonna be kidding. Anyway, I learned a lot and UTM SLAB Research Course is no joke. Really. My proposal has been corrected with comments so I have
Gue dengan S2 gue. Sronok banget!