| July 2008 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat | ||
| 1 | 2 | 3 | 4 | 5 | ||||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 | ||
| 13 | 14 | 15 | 16 | 17 | 18 | 19 | ||
| 20 | 21 | 22 | 23 | 24 | 25 | 26 | ||
| 27 | 28 | 29 | 30 | 31 | ||||
Dies ist ein Script, mit dem man - wohlgemerkt nur an der bash, also unter Linux - Bilder für das Hochladen auf ipernity vorbereiten kann. Ausführliche Kommentare dazu, was die einzelnen Variablen bewirken, befinden sich in der runterladbaren Version: kamerastars.de/daten/IPEdit.
This is a script with this you can - well, only at the bash, thus under Linux - prepare images for uploading them at ipernity. A fully documented version of this script is downloadable at this location: kamerastars.de/daten/IPEdit.
Vielleicht kann das ja einer von euch gebrauchen.
Maybe one of you has a use for this
Die Version zum Runterladen wird regelmäßig erweitert
The download version will be extended time by time
#!/bin/bash
# IPEdit lite - Editing pictures for uploading them to ipernity.com
# Author: Dirk Sohler, http://blog.schlunzen.org - http://dirk.ipernity.com
# Licensed under CC-by-sa, http://creativecommons.org/licenses/by-sa/3.0/
# Use at your own risk!
# Base
MAXWIDTH="800"
MAXHEIGHT="600"
DIRECTORY="${HOME}"
PREFIX="edited_"
# Caption
CAPTION=""
FONT=""
TEXTCOLOR=""
TEXTPOS="5,5"
# Tools
CONVERT=`which convert`
MOGRIFY=`which mogrify`
# Check
if [ ! -e $CONVERT ]; then
echo "The convert tool was not found. Do you have ImageMagic installed?"
exit 11
fi
if [ ! -e $MOGRIFY ]; then
echo "The mogrify tool was not found. Do you have ImageMagic installed?"
exit 12
fi
if [ ! -d "${DIRECTORY}" ] || [ ! -w "${DIRECTORY}" ]; then
echo "The given path is not writable (or is no directory)"
exit 21
else
cd "${DIRECTORY}"
fi
# Edit
INDEX=0
for PICTURE in *.jpg
do
${CONVERT} -quality 100 -geometry ${MAXWIDTH}x${MAXHEIGHT} \
"${PICTURE}" "${PREFIX}${PICTURE}"
if [ `echo ${CAPTION} | wc -c` -gt 1 ]; then
$MOGRIFY -quality 100 -gravity SouthEast -pointsize 16 \
-family ${FONT} -fill ${TEXTCOLOR} \
-draw "text ${TEXTPOS} \
\"$CAPTION\"" "${PREFIX}${PICTURE}"
fi
((INDEX++))
done
# Finish
echo "Edited ${INDEX} pictures"
Send a message
Search for members