Browse Source

meteor filenames differs from noaa

tags/1.5
Nico Rey 4 years ago
parent
commit
1443285acf
2 changed files with 6 additions and 2 deletions
  1. +5
    -1
      migrate_data.sh
  2. +1
    -1
      receive.sh

+ 5
- 1
migrate_data.sh View File

@@ -32,7 +32,11 @@ for filename in $(find . -name *.jpg); do
date_normalized=$(echo "$basedate" | sed -e "s/^$sat_name//;s/./&:/12;s/./&:/10;s/./& /8;s/./&\//6;s/./&\//4")
epoch_date=$(date "+%s" -d "$date_normalized")
passname=$(echo "$basename" | cut -f1,2 -d'-')
if [[ $basename == *"METEOR"* ]]; then
passname=$(echo "$basename" | cut -f1,2,3 -d'-')
else
passname=$(echo "$basename" | cut -f1,2 -d'-')
fi
echo "Migration in progress: $basename"
cp "$BASEPATH/$filename" "$FINALPATH"
convert -thumbnail 300 "$BASEPATH/$filename" "$FINALPATH/thumb/$basename"


+ 1
- 1
receive.sh View File

@@ -46,7 +46,7 @@ for i in $ENHANCEMENTS; do
log "Decoding image" "INFO"
/usr/local/bin/wxtoimg -o -m "${NOAA_HOME}/map/${3}-map.png" -e "$i" "${RAMFS_AUDIO}/audio/${3}.wav" "${NOAA_OUTPUT}/image/${3}-$i.jpg"
/usr/bin/convert -quality 90 -format jpg "${NOAA_OUTPUT}/image/${3}-$i.jpg" -undercolor black -fill yellow -pointsize 18 -annotate +20+20 "${1} $i ${START_DATE}" "${NOAA_OUTPUT}/image/${3}-$i.jpg"
/usr/bin/convert -thumbnail 300 "${NOAA_OUTPUT}/image/${3}-$i.jpg" "${NOAA_OUTPUT}/image/thumb/${3}-$i.jpg
/usr/bin/convert -thumbnail 300 "${NOAA_OUTPUT}/image/${3}-$i.jpg" "${NOAA_OUTPUT}/image/thumb/${3}-$i.jpg"
done
if [ -n "$CONSUMER_KEY" ]; then
log "Posting to Twitter" "INFO"


Loading…
Cancel
Save