>>13
Try doing this to take a website down, and show us. I would be very amused if it worked.
Name:
Anonymous2012-06-01 21:28
>>7
True. I'm editing like 50 large file size pics for them, gotta crop and post thumbnails, links to the larger sized photo, titles of all products in the html..... *pours coffee* -_-
Just realised, addendum tot hat last thing, i didn't need to change file permissions while testing because the file already existed. So if using that script from scratch it would be. ls *.jpg| awk '{print "convert -size 120x120 "$1" -resize 120x120 +profile i/'*/' "$1"_small.jpg;"}'>converter.sh;chmod 777 converter.sh;./converter.sh
And I suppose for the sake of garbage collection, ls *.jpg| awk '{print "convert -size 120x120 "$1" -resize 120x120 +profile i/'*/' "$1"_small.jpg;"}'>converter.sh;chmod 777 converter.sh;./converter.sh;rm converter.sh
Just gone back to this again, and realised that any picture filenames that have a space in them, will throw an error.
Wonder how to deal with that. I am about to sleep now, probably, but will consider it in the morning.
Name:
!L33tUKZj5I2012-06-02 1:15
Ok, so this version strips out any spaces in filenames, and replaces them with underscores. There would be a way to put the files back with the spaces again after, but fuck it, deal with it.
This does mean that all files will be converted though. echo "rename" `ls *\ *.jpg` `ls *\ *.jpg|grep '\ ' |sed 's/\'\ '/'\_'/g'`>renamer.sh;chmod 777 renamer.sh;./renamer.sh;ls *.jpg| awk '{print "convert -size 120x120 "$1" -resize 120x120 +profile i/'*/' "$1"_small.jpg;"}'>converter.sh;chmod 777 converter.sh;./converter.sh;rm converter.sh;rm renamer.sh
Name:
!L33tUKZj5I2012-06-02 1:47
Ok, for the sake of housekeeping, this puts back all filenames with spaces in them to their original state. All the thumbnails will have filenames with underscores in them though.
I forgot to add ;'s to the end of each line in the shell scripts generated and used. [m]
……………………………………..________
………………………………,.-‘ …………….“~.,
………………………..,.- …………………………..“-.,
…………………….,/………………………………………..â€:,
…………………,?………………………………………………\,
………………./…………………………………………………..,}
……………../………………………………………………,:`^`..}
……………/……………………………………………,: ……/
…………..?…..__…………………………………..:`………../
…………./__.(…..“~-,_…………………………,:`………./
………../(_….â€~,_……..“~,_………………..,:`…….._/
……….{.._$;_……â€=,_…….“-,_…….,.-~-,},.~â€;/….}
………..((…..*~_…….â€=-._……“;,,./`…./ ………../
…,,,___.\`~,……“~.,………………..`…..}…………../
…………(….`=-,,…….`……………………(……;_,,-â€
…………/.`~,……`-………………………….\……/\
………….\`~.*-,……………………………….|,./…..\,__
,,_……….}.>-._\……………………………..|…………..`=~-,
…..`=~-,_\_……`\,……………………………\
……………….`=~-,,.\,………………………….\
…………………………..`:,,………………………`\…………..__
……………………………….`=-,……………….,%`>–==“
…………………………………._\……….._,-%…….`\
……………………………..,< `.._|_,-&``................`[/m]