Command Line InterfaceΒΆ
Sosse provides a sosse-admin command that is based on the
Django management command.
It can be called with sosse-amdin help, to list all commands available, and sosse-admin help <command> to get
help a specific command. The help for Sosse specific commands is also provided below:
- clear_html_archive:
Clears archived HTML snapshots.
usage: sosse-admin clear_html_archive [-h]
options:
-h, --help show this help message and exit
- crawl:
This command starts one or multiple crawlers, depending on the crawler count option set in the configuration file.
usage: sosse-admin crawl [-h] [--one-shot] [urls ...]
positional arguments:
urls Optionnal list of URLs to add to the crawler queue.
options:
-h, --help show this help message and exit
--one-shot Quit when the queue is empty.
- default_admin:
Creates a default
adminsuperuser withadminpassword, does nothing if at least one user already exists in the database.
usage: sosse-admin default_admin [-h]
options:
-h, --help show this help message and exit
- default_conf:
Outputs default configuration file to stdout.
usage: sosse-admin default_conf [-h]
options:
-h, --help show this help message and exit
- delete_documents:
Mass delete documents.
usage: sosse-admin delete_documents [-h] [--dry-run] [-i] url regex
positional arguments:
url regex
options:
-h, --help show this help message and exit
--dry-run Prints the count of documents that would be deleted.
-i, --ignore-case Case insensitive matching.
- dumpdata_sosse:
Output the contents of the database as a fixture of the given format (using each modelβs default manager unless βall is specified).
usage: sosse-admin dumpdata_sosse [-h] [--format FORMAT] [--indent INDENT]
[--database DATABASE] [-e EXCLUDE] [--natural-foreign]
[--natural-primary] [-a] [--pks PRIMARY_KEYS]
[-o OUTPUT]
[app_label[.ModelName] ...]
positional arguments:
app_label[.ModelName]
Restricts dumped data to the specified app_label or
app_label.ModelName.
options:
-h, --help show this help message and exit
--format FORMAT Specifies the output serialization format for
fixtures.
--indent INDENT Specifies the indent level to use when pretty-printing
output.
--database DATABASE Nominates a specific database to dump fixtures from.
Defaults to the "default" database.
-e EXCLUDE, --exclude EXCLUDE
An app_label or app_label.ModelName to exclude (use
multiple --exclude to exclude multiple apps/models).
--natural-foreign Use natural foreign keys if they are available.
--natural-primary Use natural primary keys if they are available.
-a, --all Use Django's base manager to dump all models stored in
the database, including those that would otherwise be
filtered or modified by a custom manager.
--pks PRIMARY_KEYS Only dump objects with given primary keys. Accepts a
comma-separated list of keys. This option only works
when you specify one model.
-o OUTPUT, --output OUTPUT
Specifies file to which the output is written.
- extract_doc:
Displays code-defined documentation on stdout.
usage: sosse-admin extract_doc [-h] {conf,cli,se}
positional arguments:
{conf,cli,se} "conf" for the configuration file, "cli" for the CLI, "se"
for search engines
options:
-h, --help show this help message and exit
- generate_secret:
Generates a secret key that can be used in the Configuration file.
usage: sosse-admin generate_secret [-h]
options:
-h, --help show this help message and exit
- load_se:
Loads a External search engine shortcuts from an OpenSearch Description formatted XML file.
Most search engines provide such a file, defined in the HTML of their web page. It can be found inside a
<link>element below the<head>tag, for example Brave Search defines it as:<link rel="search" type="application/opensearchdescription+xml" title="Brave Search" href="https://cdn.search.brave.com/opensearch.xml">
usage: sosse-admin load_se [-h] opensearch_file
positional arguments:
opensearch_file OpenSearch Description formatted XML file.
options:
-h, --help show this help message and exit
- update_se:
This updates External search engine shortcuts in the database based on their definition in the source code.
usage: sosse-admin update_se [-h]
options:
-h, --help show this help message and exit