version 1.23, 2012/09/11 16:24:46
|
version 1.28, 2017/12/07 14:24:00
|
Line 1
|
Line 1
|
#!/home/as/sh | #!/usr/local/libexec/pgallerysh |
# |
# |
# THE BEER-WARE LICENSE 2012 | # THE BEER-WARE LICENSE 2012,13 |
| # |
# <as@paefchen.net> wrote this file. As long as you retain this notice you |
# <as@paefchen.net> wrote this file. As long as you retain this notice you |
# 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.22 2012/09/11 15:40:43 as Exp $ | # $Paefchen: scripts/pgallery/src/pgallery.sh,v 1.27 2013/04/03 08:14:52 as Exp $ |
# |
# |
. $(dirname $0)/libpgallery |
|
|
|
|
. /usr/local/libexec/libpgallery |
|
|
ARG_TITLE="PGallery" |
ARG_TITLE="PGallery" |
ARG_FILES= |
ARG_FILES= |
ARG_FILETYPES="jpg jpeg png gif tif tiff" |
ARG_FILETYPES="jpg jpeg png gif tif tiff" |
Line 26 ARG_MAILFROM="PGallery <${USER}@${HOST}>"
|
Line 28 ARG_MAILFROM="PGallery <${USER}@${HOST}>"
|
ARG_URL= |
ARG_URL= |
ARG_EXIF="0x920a 0x829d 0x829a ISO 0x8827 / 0x010f - 0x0110" |
ARG_EXIF="0x920a 0x829d 0x829a ISO 0x8827 / 0x010f - 0x0110" |
ARG_INDEXIMG= |
ARG_INDEXIMG= |
|
ARG_NOINDEX= |
ARG_STARTTS= |
ARG_STARTTS= |
ARG_ENDTS= |
ARG_ENDTS= |
ARG_LINK= |
ARG_LINK= |
Line 53 Options:
|
Line 56 Options:
|
-f files gallery images |
-f files gallery images |
-h this page |
-h this page |
-i name index file name (default: $ARG_INDEX) |
-i name index file name (default: $ARG_INDEX) |
|
-x ignore gallery on index |
-l url gallery link |
-l url gallery link |
-m image image for pgalleryindex. default the first image |
-m image image for pgalleryindex. default the first image |
-n name page title (default: $ARG_TITLE) |
-n name page title (default: $ARG_TITLE) |
Line 70 Options:
|
Line 74 Options:
|
the syntax of the file is MAKE(1) |
the syntax of the file is MAKE(1) |
supported variable: TITLE COPYRIGHT INDEX FILETYPES TNSIZE URL |
supported variable: TITLE COPYRIGHT INDEX FILETYPES TNSIZE URL |
TNQALITY BIGSIZE BIGQALITY MAILTO MAILFROM |
TNQALITY BIGSIZE BIGQALITY MAILTO MAILFROM |
EXIF INDEXIMG LINK NAVI | EXIF INDEXIMG LINK NAVI NOINDEX |
-T mailto send update infos to this address. if not set, no mail delivery |
-T mailto send update infos to this address. if not set, no mail delivery |
-U no update, new calculation of all images. |
-U no update, new calculation of all images. |
normally only new and modified images will calculated |
normally only new and modified images will calculated |
Line 157 do
|
Line 161 do
|
exit;; |
exit;; |
-w) |
-w) |
ARG_NAVI=1;; |
ARG_NAVI=1;; |
|
-x) |
|
ARG_NOINDEX=1;; |
*) |
*) |
echo "unknown argument $arg" |
echo "unknown argument $arg" |
exit |
exit |
Line 172 if [ "$ARG_INFOFILE" != "" ]
|
Line 178 if [ "$ARG_INFOFILE" != "" ]
|
then |
then |
test -f $ARG_INFOFILE || err "info file not found \`\`$ARG_INFOFILE''" |
test -f $ARG_INFOFILE || err "info file not found \`\`$ARG_INFOFILE''" |
for n in TITLE COPYRIGHT INDEX FILETYPES TNSIZE TNQALITY BIGSIZE \ |
for n in TITLE COPYRIGHT INDEX FILETYPES TNSIZE TNQALITY BIGSIZE \ |
BIGQALITY MAILTO MAILFROM URL EXIF INDEXIMG LINK NAVI | BIGQALITY MAILTO MAILFROM URL EXIF INDEXIMG NOINDEX LINK NAVI |
do |
do |
v=$(make -f $ARG_INFOFILE -V$n) |
v=$(make -f $ARG_INFOFILE -V$n) |
test "$v" = "" && continue |
test "$v" = "" && continue |
Line 180 then
|
Line 186 then
|
done |
done |
fi |
fi |
|
|
#paras from iso to utf-8 | # paras from iso to utf-8 |
for n in $(set | awk -F= '{print $1}') |
for n in $(set | awk -F= '{print $1}') |
do |
do |
echo "$n" | grep -q '^ARG_' || continue |
echo "$n" | grep -q '^ARG_' || continue |
Line 237 test "$ARG_INDEXIMG" = "" && ARG_INDEXIMG=$(echo $FLIS
|
Line 243 test "$ARG_INDEXIMG" = "" && ARG_INDEXIMG=$(echo $FLIS
|
|
|
# find start and end ts |
# find start and end ts |
ARG_STARTTS=$(get_exif_ts $(echo $FLIST | awk '{print $1}')) |
ARG_STARTTS=$(get_exif_ts $(echo $FLIST | awk '{print $1}')) |
|
# XXX: |
|
if [ "$ARG_STARTTS" = "-1" ] |
|
then |
|
ARG_STARTTS=$(get_exif_ts $(echo $FLIST | awk '{print $2}')) |
|
fi |
ARG_ENDTS=$(get_exif_ts $(echo $FLIST | awk '{print $NF}')) |
ARG_ENDTS=$(get_exif_ts $(echo $FLIST | awk '{print $NF}')) |
|
|
# find new and to update images |
# find new and to update images |
Line 271 echo "save settings"
|
Line 282 echo "save settings"
|
set | while read n |
set | while read n |
do |
do |
echo "$n" | grep -q '^ARG_' || continue |
echo "$n" | grep -q '^ARG_' || continue |
|
echo "$n" | grep -q '^ARG_UPDATE' && continue |
echo "$n" >> $ARGFILE |
echo "$n" >> $ARGFILE |
done |
done |
|
|