Astname is a small script written in bash (and an other version in python3)
to get the name/provisional designation or asteroid number of
a small solar system body. Identification is based on NASA JPL/Horizons
index file, DASTCOM.IDX.
If it is not present, it will be downloaded from
ftp://ssd.jpl.nasa.gov/pub/xfr/DASTCOM.IDX, also, if it is older than 30 days,
the index file will be re-downloded.
It was tested on Debian GNU/Linux, but it should work on other linux distributions too.
The python3 version works on Windows as well.
The script runs some tests on the input, so e.g. if it is a float number, it will exit. The input tests
are not 100% fool proof at the moment.
Dependencies:
Setting up the script is pretty simple.
The script accepts integer asteroid number(s) as argument, asteroid
name(s) or NAIFID(s), e.g.:
astname 64 16
or:
astname Angelina
or:
astname 2000016
Use double quotes if special characters are present in the
astreoid name, e.g.:
astname "Prokof'ev"
Use double quotes also, when searching for provisional designation e.g.:
astname "1976 YG"
The search is not case sensitive.
Use astname --help to print this information.
The first time you use the script you need an active internet connection to download the index file.
Later, if the index file is present, but it is older than 30 days and can't be re-downloded the old file will be used.
There is a python3.x script also, which has the same functionality, as the bash version.
Needed packages: