Stellar CLI
The stellar cli has various subcommands.
Stellar CLI
Usage: stellar <COMMAND>
Commands:
generate Help message for generator
import Help message for import
web Help message for web
check Help message for check
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print versio
stellar web
The web
subcommand is used to start the web server.
Help message for web
Usage: stellar web [OPTIONS] --data <DATA> --connection-url <CONNECTION_URL>
Options:
-a, --address <ADDRESS> Listening address [default: 0.0.0.0]
-p, --port <PORT> Listening port [default: 8080]
-d, --data <DATA> Data folder
-c, --connection-url <CONNECTION_URL> MongoDB Connection URL
-h, --help Print help
stellar import
The import
subcommand is used to process data and import it to the MongoDB database.
Help message for import
Usage: stellar import [OPTIONS] --connection-url <CONNECTION_URL>
Options:
-c, --connection-url <CONNECTION_URL>
MongoDB connection URL
-i, --import <IMPORT>...
Import data/snippets/pages/courses folder or single snippet/page/course
-h, --help
Print help
Here is a bunch of examples:
stellar import -c "..." --import ./data
stellar import -c "..." --import ./data/snippets
stellar import -c "..." --import ./data/pages
stellar import -c "..." --import ./data/courses
stellar import -c "..." --import ./data/snippets/snippet1
stellar import -c "..." --import ./data/pages/page1.html
stellar import -c "..." --import ./data/courses/course1.json
stellar import -c "..." --import course1.json course2.json
stellar generate
The generate
subcommand is used to parse a PDF in the PDF Stellar Format
and generate a page and snippets.
Help message for generator
Usage: stellar generate [OPTIONS] --input <INPUT> --data-output <DATA_OUTPUT>
Options:
-i, --input <INPUT> Generate data from a PDF file
-o, --data-output <DATA_OUTPUT> Output for generated data
--import Import the generated snippets
-c, --connection-url <CONNECTION_URL> MongoDB connection URL
--top-offset <TOP_OFFSET> Snippet cut top offset [default: -20]
--bottom-offset <BOTTOM_OFFSET> Snippet cut bottom offset [default: 2.5]
--left-margin <LEFT_MARGIN> Snippet cut left margin
--right-margin <RIGHT_MARGIN> Snippet cut right margin
-h, --help
To compile from the PDF generated by the previous LaTeX example:
stellar-cli generate snippets \
--input stellar.pdf \
--data-output ./data \
--bottom-offset 9.5 \
--top-offset=-20
stellar check
The check
subcommand is used to check the integrity of the existing data.
There are various integrity checks:
- Existence of refereces in the snippets, pages, courses and universes
- Autoreferentiality in snippets
- Reference linearity
Help message for check
Usage: stellar check [OPTIONS] --connection-url <CONNECTION_URL>
Options:
-c, --connection-url <CONNECTION_URL>
MongoDB connection URL
-e, --existences
Check only existance of references E.g. existance for courses checks whether the pages exist
-a, --autoreferentiality
Check only snippets self-reference
-l, --linearity
Check only snippets linearity
-h, --help
Print help