mentat.module.detmngr module

This Mentat module is a script providing functions for detectors management for Mentat system database.

This script is implemented using the pyzenkit.zenscript framework and so it provides all of its core features. See the documentation for more in-depth details.

Note

Still work in progress, use with caution.

Usage examples

# Display help message and exit.
mentat-detmngr.py --help

# Run in debug mode (enable output of debugging information to terminal).
mentat-detmngr.py --debug

# Run with increased logging level.
mentat-detmngr.py --log-level debug

Available script commands

status (default)

Detect and display the state of internal whois database contents according to the data in given reference whois file.

update

Attempt to update the state of internal whois database contents according to the data in given reference whois file.

Custom configuration

Custom command line options

--detectors-file file-path

Path to reference detectors file containing data.

Type: string, default: None

--source

Origin of the whois file.

Type: string, default: detectors-file

class mentat.module.detmngr.MentatDetmngrScript[source]

Bases: mentat.script.fetcher.FetcherScript

Implementation of Mentat module (script) providing functions for detectors management for Mentat database.

CONFIG_DETECTORS_FILE = 'detectors_file'
CONFIG_DETECTORS_SOURCE = 'source'
cbk_command_status()[source]

Implementation of the status command (default).

Detect and display the status of detectors collection.

cbk_command_update()[source]

Implementation of the update command.

Attempt to update the state of internal detectors database contents according to the data in given reference detectors file.

get_default_command()[source]

Return the name of the default script command. This command will be executed in case it is not explicitly selected either by command line option, or by configuration file directive.

Returns

Name of the default command.

Return type

str