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

Gue dengan S2 gue. Sronok banget!

Vultr - another reliable alternative for SEA Virtual Private Server!

I have been using Vultr  as my recent VPS now, since it has just a nearby Data Center in Singapore (sadly, Malaysian VPS is always expensive.. so the best option is DC in Singapore - most of the time). It provides free trial credit for around USD5.. and +USD2 if you did a social media integration/sharing with Twitter. Try it now. Click Vultr