election_day.cli

Provides commands used to initialize election day websites.

Attributes

Processor

cli

Functions

add(→ Processor)

Adds an election day instance with to the database. For example:

fetch(→ Processor)

Fetches the results from other instances as defined in the

send_sms(→ Processor)

Sends the SMS in the smsdir for a given instance. For example:

generate_media(→ Processor)

Generates the PDF and/or SVGs for the selected instances. For example:

generate_archive(→ Processor)

Generates a zipped file of the entire archive.

update_archived_results(→ Processor)

Update the archive results, e.g. after a database transfer.

migrate_subscribers(→ Processor)

Module Contents

election_day.cli.Processor: typing_extensions.TypeAlias[source]
election_day.cli.cli[source]
election_day.cli.add(group_context: onegov.core.cli.core.GroupContext) Processor[source]

Adds an election day instance with to the database. For example:

onegov-election-day –select ‘/onegov_election_day/zg’ add

election_day.cli.fetch(group_context: onegov.core.cli.core.GroupContext) Processor[source]

Fetches the results from other instances as defined in the principal.yml. Only fetches results from the same namespace.

onegov-election-day –select ‘/onegov_election_day/zg’ fetch

election_day.cli.send_sms(group_context: onegov.core.cli.core.GroupContext, username: str, password: str, originator: str | None) Processor[source]

Sends the SMS in the smsdir for a given instance. For example:

onegov-election-day –select ‘/onegov_election_day/zg’ send_sms

‘info@seantis.ch’ ‘top-secret’

election_day.cli.generate_media() Processor[source]

Generates the PDF and/or SVGs for the selected instances. For example:

onegov-election-day –select ‘/onegov_election_day/zg’ generate-media

election_day.cli.generate_archive() Processor[source]

Generates a zipped file of the entire archive. onegov-election-day –select ‘/onegov_election_day/zg’ generate-archive

election_day.cli.update_archived_results(host: str, scheme: str) Processor[source]

Update the archive results, e.g. after a database transfer.

election_day.cli.migrate_subscribers() Processor[source]