Skip to content

Commit

Permalink
some fixes, let's try! #62 #58 #61
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsPL committed Jan 22, 2019
1 parent 2293913 commit 7ae36a5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/meteor-m2/meteor_gallery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# value for some tests:
# fileNameCore="20190118-1012_METEOR-M2"
# rawImageDir="./"



outHtml="$imgdir/$fileNameCore.html" # html for this single pass
Expand All @@ -24,7 +26,7 @@ makethumb() {

# -----------------------------------------------------------------------------#

logFile="$rawImageDir/$fileNameCore.log" # log file to read from
logFile="$imgdir/$fileNameCore.log" # log file to read from

varDate=$(sed '1q;d' $logFile)
varSat=$(sed '3q;d' $logFile)
Expand All @@ -38,6 +40,8 @@ dateTimeDir=$(date -d @$varStart +"%Y/%m/%d") # directory format of date, eg. 2
wwwPath=$wwwRootPath/recordings/meteor/img/$dateTimeDir




# -----------------------------------------------------------------------------#


Expand All @@ -54,7 +58,7 @@ else

if [ "$resizeimageto" != "" ]; then
echo "Resizing images to $resizeimageto px"
mogrify -resize ${resizeimageto}x${resizeimageto}> *.jpg
mogrify -resize ${resizeimageto}x${resizeimageto}\> *.jpg
fi

#
Expand All @@ -72,13 +76,13 @@ else

for obrazek in *.jpg
do
echo $obrazek
echo "Thumb for $obrazek"
base=$(basename $obrazek .jpg)
sizeof=$(du -sh "$obrazek" | cut -f 1)
# generate thumbnail
thumbnail=$(makethumb "$obrazek")
echo $thumbnail
echo "<a data-fancybox='gallery' data-caption='$varSat | $varDate | $enchancement ($sizeof)' href='$wwwPath/$obrazek'><img src='$wwwPath/$thumbnail' alt='$enchancement' title='$enchancement | $sizeof' class='img-thumbnail' /></a> " >> $outHtml
echo "<a data-fancybox='gallery' data-caption='$varSat | $varDate ($sizeof)' href='$wwwPath/$obrazek'><img src='$wwwPath/$thumbnail' alt='meteor image' title='$sizeof' class='img-thumbnail' /></a> " >> $outHtml
done


Expand Down

0 comments on commit 7ae36a5

Please sign in to comment.