Command Line Tool¶
The central entry-point for interacting with the catalog repository is the cli-tool pykstars.
Installation¶
Note
The tool is not meant to be used outside the catalog
repository. Therefore installing it in a venv
or in
docker is recommended. Make sure to use the --editable
flag when installing with pip.
Bare Metal¶
Docker¶
There exists a docker-image hiro98/pykstars:latest
that has the pykstars module pre-installed.
Running
docker run -v (pwd):/stuff --rm -it -w /stuff hiro98/pykstars:latest bash -c 'pip install -e . && bash'
should drop you in a shell with the kscat
command available.
Usage¶
Building Catalogs¶
Building catalogs is accomplished with the build
subcommand. The
whole catalog collection can be build and deduped as well as just a
sub-collection. The extreme case is of course building just a single
catalog, for example when developing a new catalog.
Note
Parsed catalogs will be cached. This cache is dropped automatically when a catalog file is edited, but when in doubt it is better to clean the cache manually.
kscat build¶
Build kstars catalogs.
kscat build [OPTIONS]
Options
-
-o
,
--output-dir
<output_dir>
¶ The directory in which the catalogs will be placed.
- Default
out
-
-c
,
--cache-dir
<cache_dir>
¶ The directory in which the catalogs will be placed.
- Default
.cache
-
-d
,
--data-dir
<data_dir>
¶ The directory of the static catalog data.
- Default
data
-
-c
,
--catalog
<catalog>
¶ Catalog to be built. Can be specified multiple times. By default all catalogs are being built.
-
-n
,
--nproc
<nproc>
¶ How many processes to use for parallel tasks. The default is the number of processors (6).
-
--knewstuff
<knewstuff>
¶ The prefix url for knewstuff. If specified the catalogs are output in a manner suitable for knewstuff in [output-dir]/knewstuff
Cleaning the Cache¶
kscat clean¶
Clean cache and output.
kscat clean [OPTIONS]
Options
-
-o
,
--output-dir
<output_dir>
¶ The directory in which the catalogs will be placed.
- Default
out
-
-c
,
--cache-dir
<cache_dir>
¶ The directory in which the catalogs will be placed.
- Default
.cache
-
--cache-only
¶
Whether to clean only the cache
Listing available Catalogs¶
This command may be used to either print a summary table of available catalogs (the default behavior) or print a detailed information about a single catalog.
For mode detailed inspection, an sqlite
viewer is recommended.