Skip to content

Commit

Permalink
#1 credentials file
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian committed Jun 10, 2018
1 parent 4c14abc commit cdcedce
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/copy-to-bitnami-wp.sh
/earls5sftpNoGit.sh
/mvGps.sh
credentials

1 change: 1 addition & 0 deletions create-out.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
IN="/home/chris/pendel/in"
OUT="/home/chris/pendel/out"

Expand Down
18 changes: 8 additions & 10 deletions earls5sftp.sh
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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]}"
Expand Down
3 changes: 2 additions & 1 deletion import.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
SRC="/home/chris/egh/photo/02_Progress/pendel"
DST="/home/chris/pendel/in"

Expand All @@ -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 ))
Expand Down
5 changes: 5 additions & 0 deletions leinwandRefresh.sh
Original file line number Diff line number Diff line change
@@ -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

43 changes: 43 additions & 0 deletions others/EXIF-Timestamp-info.txt
Original file line number Diff line number Diff line change
@@ -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 --> ...<time>2017-08-23T08:42:58.000Z</time>

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'




27 changes: 27 additions & 0 deletions tcxToFow.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cdcedce

Please sign in to comment.