Modules reference

satnogsconfig

SatNOGS Config module initialization

satnogsconfig.main()[source]

SatNOGS Setup utility

satnogsconfig.config

Configuration module

class satnogsconfig.config.Config(filename)[source]

Manage configuration file

Parameters:

filename (str) – File path of configuration

_load_config()[source]

Load and parse YAML configuration

Returns:

Configuration dictionary

Return type:

dict or NoneType

clear_config()[source]

Clear configuration file

dump_config(to_file=False)[source]

Dump configuration in YAML format

Parameters:

to_file (bool, optional) – Dump to file

Returns:

YAML configuration

Return type:

str

get_variable(variable)[source]

Get variable value from configuration

Parameters:

variable (str) – Variable to get the value

Returns:

Value of variable

Return type:

str or bool or NoneType

set_variable(variable, value)[source]

Set variable value in configuration

Parameters:
  • variable (str) – Variable to set the value

  • value (str or bool or NoneType) – Value of variable

satnogsconfig.helpers

Helpers module

class satnogsconfig.helpers.SatnogsSetup[source]

Interract with satnogs-setup

property is_applied

Check whether configuration has been applied

Returns:

Whether configuration has been applied

Return type:

bool

property tags

Get satnogs-setup tags

Returns:

Set of tags

Return type:

set

class satnogsconfig.helpers.Support(config, satnogs_setup)[source]

Create support information to be used for reporting bugs

dump(*args, **kwargs)[source]

Dump support information

Returns:

JSON dump of support information

Return type:

str

property info

Support information

Returns:

Support information dictionary

Return type:

dict

satnogsconfig.menu

Menu module

class satnogsconfig.menu.Menu(menu, config, backtitle=None)[source]

Show a menu structure based on dialog

Parameters:
  • menu (dict) – Menu dictionary

  • config (dict) – Configuration dictionary

  • backtitle (str, optional) – Default dialog backtitle

_configbox(menu)[source]

Show scrollbox for viewing configuration

Parameters:

menu (dict) – Menu dictionary

_exit(menu)[source]

Exit the utility

Parameters:

menu (dict) – Menu dictionary

_get_common_options(menu)[source]

Get dialog common options

Parameters:

menu (dict) – Menu dictionary

Returns:

Common option dictionary

Return type:

dict

_msgbox(menu)[source]

Show msgbox

Parameters:

menu (dict) – Menu dictionary

_resetyesno(menu)[source]

Reset configuration

Parameters:

menu (dict) – Menu dictionary

_set_default_backtitle(backtitle=None)[source]

Set backtitle of menu

Parameters:

backtitle (str) – Menu backtitle

_submenu(menu)[source]

Show submenu

Parameters:

menu (dict) – Menu dictionary

_support(_)[source]

Show support information

_update_stack(menu, response)[source]

Update stack based on dialog responses

Parameters:
  • menu (dict) – Menu dictionary

  • response (str) – Dialog response

_variablebox(menu)[source]

Show inputbox for setting a variable

Parameters:

menu (dict) – Menu dictionary

_variableyesno(menu)[source]

Show boolean selection for setting a variable

Parameters:

menu (dict) – Menu dictionary

property backtitle

Get default backtitle

Returns:

Background title

Return type:

str

show()[source]

Show dialog menu structure

satnogsconfig.menu._clear_screen()[source]

Clear screen

satnogsconfig.menu._get_variables(menu, name=None, mandatory=False)[source]

Get all menu variable items

Parameters:
  • menu (dict) – Menu dictionary

  • name (str, optional) – Name of menu item

  • mandatory (bool, optional) – Return only mandatory variables

Returns:

Menu variables dictionary

Return type:

dict

satnogsconfig.menu._load_menu(file)[source]

Load menu structure from YAML file

Parameters:

file (file) – Menu file stream

Returns:

Menu dictionary

Return type:

dict