Script to merge TLEs into git archive
parent
bbb04608dd
commit
6e235010f4
|
@ -35,6 +35,7 @@ What the little scripts do:
|
|||
* `spacecruft-dl-ids` --- Download list of IDs photographed and identified
|
||||
in the Spacecruft archive.
|
||||
* `spacecruft-ls-ids` --- Lists NORAD IDs in Spacecruft archive.
|
||||
* `tle2git` --- Convert archive of historical TLEs into git repo.
|
||||
|
||||
Scripts that use `sattools`:
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
GITDIR="/srv/seesat/tle/git"
|
||||
TLEDIR="/srv/seesat/tle/classfd"
|
||||
|
||||
# Set up directory for git
|
||||
mkdir -p $GITDIR
|
||||
cd $GITDIR
|
||||
git init
|
||||
|
||||
# Got to TLE directory and start processing
|
||||
cd $TLEDIR
|
||||
|
||||
for TLEFILE in 20*_*_classfd.txt
|
||||
do \
|
||||
YEAR=`echo ${TLEFILE} | cut -c 1-4`
|
||||
MONTH=`echo ${TLEFILE} | cut -c 5-6`
|
||||
DAY=`echo ${TLEFILE} | cut -c 7-8`
|
||||
HOUR=`echo ${TLEFILE} | cut -c 10-11`
|
||||
MINUTE=`echo ${TLEFILE} | cut -c 12-13`
|
||||
SECOND=`echo ${TLEFILE} | cut -c 14-15`
|
||||
|
||||
cp -p ${TLEFILE} ${GITDIR}/classfd.tle
|
||||
|
||||
cd ${GITDIR}
|
||||
git add classfd.tle
|
||||
TZ="Etc/UTC" git commit -m"classfd from ${YEAR}-${MONTH}-${DAY}" \
|
||||
--date="${YEAR}${MONTH}${DAY}T${HOUR}:${MINUTE}:${SECOND}"
|
||||
|
||||
cd ${TLEDIR}
|
||||
|
||||
done
|
||||
|
Loading…
Reference in New Issue