version 1.11, 2012/08/29 11:21:41
|
version 1.12, 2012/08/29 12:30:35
|
Line 5
|
Line 5
|
# can do whatever you want with this stuff. If we meet some day, and you think |
# can do whatever you want with this stuff. If we meet some day, and you think |
# this stuff is worth it, you can buy me a beer in return Aron Schlesinger |
# this stuff is worth it, you can buy me a beer in return Aron Schlesinger |
# |
# |
# $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.10 2012/08/29 10:52:35 as Exp $ | # $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.11 2012/08/29 11:21:41 as Exp $ |
# |
# |
|
|
ARG_TITLE="PGallery" |
ARG_TITLE="PGallery" |
Line 256 div.box div.i {
|
Line 256 div.box div.i {
|
height: 25px; |
height: 25px; |
line-height: 25px; |
line-height: 25px; |
position: relative; |
position: relative; |
left: 4px; |
|
} |
} |
body > div.c { |
body > div.c { |
text-align: center; |
text-align: center; |
Line 342 HTML
|
Line 341 HTML
|
html_img() |
html_img() |
{ |
{ |
orig=$1 |
orig=$1 |
img=$2 | num=$2 |
link=$3 | all=$3 |
linkb=$4 | img=$4 |
linkn=$5 | link=$5 |
| linkb=$6 |
| linkn=$7 |
|
|
info=$($BIN_IMGINFO -f $img) |
info=$($BIN_IMGINFO -f $img) |
width=$(echo $info | awk '{print $3}') |
width=$(echo $info | awk '{print $3}') |
Line 359 html_img()
|
Line 360 html_img()
|
|
|
if [ "$linkb" != "" ] |
if [ "$linkb" != "" ] |
then |
then |
hlinkb="<a href='$linkb'>zurück</a>" | hlinkb="<a href='$linkb'>back</a>" |
olinkb="<a class='left' style='height:${height}px' href='$linkb'></a>" |
olinkb="<a class='left' style='height:${height}px' href='$linkb'></a>" |
fi |
fi |
|
|
if [ "$linkn" != "" ] |
if [ "$linkn" != "" ] |
then |
then |
hlinkn="<a href="$linkn">weiter</a>" | hlinkn="<a href="$linkn">forward</a>" |
olinkn="<a class='right' style='height:${height}px' href='$linkn'></a>" |
olinkn="<a class='right' style='height:${height}px' href='$linkn'></a>" |
fi |
fi |
|
|
cat <<HTML |
cat <<HTML |
<div class="box"> |
<div class="box"> |
<div class="nav"> |
<div class="nav"> |
<div class="top"><a href="$link">Index</a></div> | <div class="top"> |
| <a href="$link">Index</a> | <a href="$orig">original</a> | $num/$all |
| </div> |
<div class="left">$hlinkb</div> |
<div class="left">$hlinkb</div> |
<div class="right">$hlinkn</div> |
<div class="right">$hlinkn</div> |
</div> |
</div> |
Line 433 get_exif_desc()
|
Line 436 get_exif_desc()
|
} |
} |
|
|
# |
# |
|
# get_exif_ts() |
|
# |
|
get_exif_ts() |
|
{ |
|
img=$1 |
|
date=$($BIN_EXIF --ifd=EXIF --tag=0x9003 -m $img 2> /dev/null) |
|
test "$date" = "" && return 1 |
|
date -j -f "%Y:%m:%d %T" "$date" "+%s" |
|
} |
|
|
|
# |
|
# get_exif_date() |
|
# |
|
get_exif_date() |
|
{ |
|
img=$1 |
|
ts=$(get_exif_ts $img) && date -r $ts "+%d.%m.%Y %H:%M" || echo "" |
|
} |
|
|
|
# |
# get_exif_value() |
# get_exif_value() |
# |
# |
get_exif_value() |
get_exif_value() |
Line 448 get_exif_value()
|
Line 471 get_exif_value()
|
get_exif_info() |
get_exif_info() |
{ |
{ |
img=$1 |
img=$1 |
|
|
exifinfo= |
exifinfo= |
|
created=$(get_exif_date $img) && exifinfo="$created / " |
|
|
for exif in $ARG_EXIF |
for exif in $ARG_EXIF |
do |
do |
if echo $exif | grep -q -E '0x[[:alnum:]]{4}' |
if echo $exif | grep -q -E '0x[[:alnum:]]{4}' |
Line 458 get_exif_info()
|
Line 484 get_exif_info()
|
exifinfo="$exifinfo$exif " |
exifinfo="$exifinfo$exif " |
fi |
fi |
done |
done |
echo $exifinfo | sed -e 's/ mm /mm /' -e 's/ sec./s/' -e 's/ ISO / ISO/' | echo $exifinfo | sed -E -e 's/ mm /mm /' -e 's/ sec./s/' -e 's/ ISO / ISO/' -e 's/ ISO(\/| )/ \1/' |
} |
} |
|
|
# |
# |
Line 652 MAKE
|
Line 678 MAKE
|
done |
done |
echo "tns: $targets" >> $MKAKEFILE |
echo "tns: $targets" >> $MKAKEFILE |
|
|
make -f $MKAKEFILE | #make -f $MKAKEFILE |
rm $MKAKEFILE |
rm $MKAKEFILE |
|
|
# create html index |
# create html index |
Line 675 echo create html index
|
Line 701 echo create html index
|
# create single html files |
# create single html files |
#test $ARG_UPDATE -eq 1 && FLIST="$FLIST_NEW $FLIST_UPDATE" |
#test $ARG_UPDATE -eq 1 && FLIST="$FLIST_NEW $FLIST_UPDATE" |
i=0 |
i=0 |
|
all=$(echo $FLIST | wc -w) |
echo -n "create single html files " |
echo -n "create single html files " |
for file in $FLIST |
for file in $FLIST |
do |
do |
Line 701 do
|
Line 728 do
|
echo -n . |
echo -n . |
( |
( |
html_header |
html_header |
html_img $file $big $ARG_INDEX "$linkb" "$linkn" | html_img $file $i $all $big $ARG_INDEX "$linkb" "$linkn" |
html_footer |
html_footer |
) > $imglink |
) > $imglink |
done |
done |