This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SITE="https://us-east.manta.joyent.com/mantademo/public/images/getty-open/" | |
DEST="/$MANTA_USER/public/" | |
# For more files change "-20" below to a larger number. | |
# For the complete download, remove "head -20 |" below | |
mmkdir -p ${DEST}/originals | |
curl -ksL ${SITE}/filelist.txt | head -20 | mput ${DEST}/filelist.txt | |
echo ${DEST}/filelist.txt | mjob create -m "xargs -I {} sh -c 'curl -ksL ${SITE}/originals/{} | mput ${DEST}/originals/{}'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -k https://us-east.manta.joyent.com/mantademo/public/images/getty-open/filelist.txt > filelist.txt | |
cat filelist.txt | xargs -I {} curl -k https://us-east.manta.joyent.com/mantademo/public/images/getty-open/originals/{} -o {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time mfind /$MANTA_USER/public/art -n '1.jpg$' | mjob create --memory 2048 -w -m 'convert $MANTA_INPUT_FILE -colorspace RGB -resize 250000@ -colorspace sRGB -quality 80 /var/tmp/out.jpg && mpipe ${MANTA_INPUT_OBJECT%.*}_s.jpg < /var/tmp/out.jpg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '*.jpg' -exec sh -c 'convert "{}" -colorspace RGB -resize 250000@ -colorspace sRGB -quality 80 `basename "{}" .jpg`_250.jpg' ';' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert 00000201.jpg -colorspace RGB -resize 250000@ -colorspace sRGB -quality 80 00000201_250.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mfind /$MANTA_USER/public/getty -n 'jpg$' | mjob create -w -m 'convert $MANTA_INPUT_FILE -thumbnail 10000@ -strip -quality 95 PNG8:/var/tmp/out.png && mpipe ${MANTA_INPUT_OBJECT%.*}.png < /var/tmp/out.png' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SITE="https://us-east.manta.joyent.com/mantademo/public/images/getty-open" | |
DEST="/$MANTA_USER/public" | |
echo Copy Demo JPEG files to your Manta Account as a tar file ... | |
mjob create -w -r "curl -ksL ${SITE}/demojpgs.tar | mput ${DEST}/demojpgs.tar" < /dev/null | |
echo Using muntar to extract the JPEG files on Manta ... | |
echo ${DEST}/demojpgs.tar | mjob create -o -m 'muntar -f $MANTA_INPUT_FILE /$MANTA_USER/public' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time find . -name '*.jpg' -exec sh -c 'convert "{}" -thumbnail 10000@ -strip -quality 95 PNG8:`basename "{}" jpg`png' ';' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat mr_identify.txt | \ | |
awk '{print $7 " " $1 " " $3}' | \ | |
sed 's/.\///' | \ | |
sort -n | \ | |
sed -e 's/MB/ MB/' -e 's/KB/ KB/' | \ | |
-e 's/+0+0//' -e 's/x/ /' | \ | |
awk '{print $1 ", " $2 ", " $3 ", " $4 ", " $5}' > Getty_Filesizes.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat manta_identify_sorted.txt | \ | |
awk '{print $7 " " $1 " " $3}' | \ | |
sort -n | \ | |
sed -e 's/MB/ MB/' -e 's/KB/ KB/' | \ | |
-e 's/+0+0//' -e 's/x/ /' | | |
awk '{print $1 ", " $2 ", " $3 ", " $4 ", " $5}' > Getty_Filesizes.csv |