diff --git a/.gitignore b/.gitignore index 9de0855..a1913cf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /copy-to-bitnami-wp.sh /earls5sftpNoGit.sh /mvGps.sh +credentials diff --git a/create-out.sh b/create-out.sh index e22134c..dd86147 100755 --- a/create-out.sh +++ b/create-out.sh @@ -1,3 +1,4 @@ +#!/bin/bash IN="/home/chris/pendel/in" OUT="/home/chris/pendel/out" diff --git a/earls5sftp.sh b/earls5sftp.sh index 859e057..d8e7d66 100755 --- a/earls5sftp.sh +++ b/earls5sftp.sh @@ -1,4 +1,8 @@ -# Upload files to earls5 +#!/bin/bash +# Upload files to host +# There must be a file 'credentials' with two line: +# host-username yourusername +# host-password yourtopsecretpassword IN="/home/chris/pendel/in/$1" OUT="/home/chris/pendel/out" @@ -21,15 +25,9 @@ done # ...and the gps.csv files[i]="$OUT/gps.csv" -#for file in "${files[@]}"; do -# echo "$file" -# done -#echo "${files[0]}" -#echo "${files[1]}" -#echo "${files[2]}" -#exit 0 -export SSHPASS=topsecretpassword -sshpass -e sftp -oBatchMode=no -b - user@host << ! +export SSHPASS=$(grep -Po "(?<=^host-password ).*" credentials) +username=$(grep -Po "(?<=^host-username ).*" credentials) +sshpass -e sftp -oBatchMode=no -b - $username@menkent.uberspace.de << ! cd html/pendel/wp-content/uploads/pendel/ffm put "${files[0]}" put "${files[1]}" diff --git a/import.sh b/import.sh index ae1c812..1ab1e34 100755 --- a/import.sh +++ b/import.sh @@ -1,3 +1,4 @@ +#!/bin/bash SRC="/home/chris/egh/photo/02_Progress/pendel" DST="/home/chris/pendel/in" @@ -16,7 +17,7 @@ if [ ! -e $DST/$1 ] fi # Copy images from final -i=0 +i=0 for file in $SRC/$1/final/*.jpg; do imgs[i]="$file" (( ++i )) diff --git a/leinwandRefresh.sh b/leinwandRefresh.sh new file mode 100755 index 0000000..dd72ade --- /dev/null +++ b/leinwandRefresh.sh @@ -0,0 +1,5 @@ +#!/bin/bash +username=$(grep -Po "(?<=^host-username ).*" credentials) +refreshcode=$(grep -Po "(?<=^refreshcode ).*" credentials) +chromium-browser http://earls5.menkent.uberspace.de/pendel/leinwand/?refreshcode=$refreshcode + diff --git a/others/EXIF-Timestamp-info.txt b/others/EXIF-Timestamp-info.txt new file mode 100644 index 0000000..c82968c --- /dev/null +++ b/others/EXIF-Timestamp-info.txt @@ -0,0 +1,43 @@ +Organisation +============ +Auf eghMate werden die Dateien in /home/chris/pendel gepflegt und per rsync auf +diskstation://chrisDok/Projekte/Pendel/Pendel gespiegelt +Die Skripte werden auf eghMate ausgeführt und liegen nur als Backup auf der Diskstation. + + +Tiles +===== +Tile ist 500 x 500 Auschnitt als 100x100 gespeichert. Ohne GPS-Informationen. + +GPS in Datei extrahieren +======================== +Wenn alle jpg in direkten Unterverzeichnissen liegen und mit einer Zahl anfagen, kann so eine Datei mit GPS-Location erstellt werden: +find /media/diskstation/chrisDok/Projekte/Pendel/Pendel -regex /media/diskstation/chrisDok/Projekte/Pendel/Pendel/[0-9][0-9][0-9]/[0-9].*\.jpg | xargs exiftool -filename -gpsposition -n -s -t -S -q -f > /media/diskstation/chrisDok/Projekte/Pendel/Pendel/gps.csv + +Da ein shell/Skript nicht auf der Diskstation aufgefuehrt ist, liegt create_gps_file.sh als Kopie im Wordpress-Pendel/Verzeichnis auf kub. + + +EXIF und Zeitdifferenz +====================== +Relevant ist createdatetime und gpsdatetime. In den GPX-Tracks habe ich keine Zeitzone gefunden (gpx, tcx von Polar als auch der Tracker-App) + +Korrektur der Exif-Zeit +----------------------- +Bsp. GPX um eine Stunde vor. Ermitteln: +exiftool -createdate img.jpg --> ...2017:08:23 07:43:21 +head -c 200 001.gpx --> ... + +Korrektur der Exifzeit um eine Stunden nach vorne: +exiftool -datetimeoriginal+=1 -createdate+=1 20170823-074258-DSCF5765.jpg + +Zeitzone +------- +exiftool verwendet beim geotaggen die Timezone des Rechners für die Bild-Zeit, wenn keine Zeitzone im exif gesetzt ist. +Um die Verwendung der Rechner-Zeitzone zu unterbinden, muss man createdate explizit ohne Zeitzone für GPS-Tagging verwenden: +exiftool -geotag Christian_Schulzendorff_2017-08-23_06-54-06.gpx '-geotime<${createdate}+00:00' 20170823-074258-DSCF5765.jpg +Als Kopiervorlage +exiftool -geotag '-geotime<${createdate}+00:00' + + + + diff --git a/tcxToFow.sh b/tcxToFow.sh new file mode 100755 index 0000000..af5b76a --- /dev/null +++ b/tcxToFow.sh @@ -0,0 +1,27 @@ +#!/bin/bash +SRC="/home/chris/tmpGps" +FOW="/home/chris/egh/photo/02_Progress/pendel" + +# case in-sensitive matching +shopt -s nocaseglob + +if [ -z "$1" ] + then echo Missing pendel nr. E. g. Call 'mvGps.sh 024 025' + exit 0 +fi + + +shopt -s nullglob +array=($SRC/*.tcx) + +i=0 +for p in "$@" + do + if [ ! -e $FOW/$p/work ] + then echo Missing $FOW/$p/work + continue + fi + echo "Move $(basename ${array[i]}) to fow $p" + mv ${array[i]} "$FOW/$p/work/" + ((++i)) + done