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_cache:

Clears the browsing cache used when making HTML snapshots.

usage: sosse-admin clear_cache [-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] [urls ...]

positional arguments:
  urls        Optionnal list of URLs to add to the crawler queue.

options:
  -h, --help  show this help message and exit

default_admin:

Creates a default admin superuser with admin password, 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 regexp

positional arguments:
  url regexp

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.

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