Reference

cli

Processes command line arguments and updates child’s records.

cli.auto_upd(childs, last_upd)[source]

Automatic update based on current date vs last update date.

cli.man_upd(argv, childs, last_upd)[source]

Manual update based on args.

First it checks all args and only if all are correct are they processed.

cli.print_state(childs, last_upd)[source]

Prints current state for each child.

cli.start(argv)[source]

Print banner, read/create data & log file and process args.

common

Common use constants and functions.

common.banner()[source]

Returns banner text.

common.license_()[source]

Returns license text, read from a file.

common.load_data(filename=u'C:\\Users\\JMatos\\MEOCloud\\Github\\daysgrounded\\daysgrounded\\data.json')[source]

Load data (list).

common.save_data(data_lst, filename=u'C:\\Users\\JMatos\\MEOCloud\\Github\\daysgrounded\\daysgrounded\\data.json')[source]

Save data (list).

common.sleep(seconds=5)[source]

Pause for specified time.

common.usage()[source]

Returns usage text, read from a file.

common.version()[source]

Returns version.

daysgrounded

Manage child(s) grounded days. If there are any command line arguments it calls the cli module. Otherwise the gui module. See usage.txt for command line usage.

daysgrounded.main()[source]

Start CLI or GUI.

gui_tk_func

GUI allows setting the grounded days per child or auto update.

gui_tk_func.start()[source]

Print banner, read/create data & log file and start GUI.

localization

Localization.

localization.sys_lang()[source]

Get system language.

shared

Shared constants and functions between CLI and GUI modules.

shared.auto_upd_datafile(childs, last_upd)[source]

Automatic update based on current date vs last update date.

shared.create_file()[source]

Create new data file and log file.

shared.open_create_datafile()[source]

Opens datafile if it exists, otherwise creates it.

shared.read_file()[source]

Reads and returns childs and last_upd from the data file.

shared.update_file(childs, last_upd)[source]

Update data file and log file.

The log file creates an history to be used in the future.