diff options
author | rodri <rgl@antares-labs.eu> | 2024-05-12 20:34:03 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-05-12 20:34:03 +0000 |
commit | aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5 (patch) | |
tree | 679f3970653138702f9206a8beb256d814de1cb5 /tools/horizonget | |
parent | 55ceca8db396829cba474164545c6bcfcc45eea4 (diff) | |
download | 3dee-aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5.tar.gz 3dee-aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5.tar.bz2 3dee-aeb153cdd6cb37dc1e9d61b22a92430a756ddeb5.zip |
began work on a solar system planetarium.
Diffstat (limited to 'tools/horizonget')
-rwxr-xr-x | tools/horizonget | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/horizonget b/tools/horizonget new file mode 100755 index 0000000..8aa9308 --- /dev/null +++ b/tools/horizonget @@ -0,0 +1,31 @@ +#!/bin/rc +rfork ne +cwd=`{basename -d $0} +center='@sun' +target=() +t0=`{date -f 'YYYY-MM-DD' `{echo `{date -n} - 86400 | bc}} +t1=`{date -f 'YYYY-MM-DD'} +step='1 d' +flagfmt='' +args='target [t0 t1]' + +fn usage { + aux/usage + exit usage +} + +if(! ifs=() eval `{aux/getflags $*}) + usage + +switch($#*){ +case 1 + target=$1 +case 3 + target=$1 + t0=$2 + t1=$3 +case * + usage +} + +$cwd^/horizon.api.get $center $target $t0 $t1 $step | $cwd^/horizon.getdata.awk | tr A-Z a-z |