swissvotes.cli
Attributes
Functions
| 
 | Adds an instance to the database. For example: | 
| 
 | Import a attachments from the given folder. For example: | 
| Import a campaign material from the given folder. For example: | |
| 
 | Reindexes the attachments. | 
| 
 | Updates external resources. | 
Module Contents
- swissvotes.cli.add(group_context: onegov.core.cli.core.GroupContext) collections.abc.Callable[[onegov.swissvotes.request.SwissvotesRequest, onegov.swissvotes.app.SwissvotesApp], None][source]
- Adds an instance to the database. For example: - onegov-swissvotes --select '/onegov_swissvotes/swissvotes' add 
- swissvotes.cli.import_attachments(group_context: onegov.core.cli.core.GroupContext, folder: str) collections.abc.Callable[[onegov.swissvotes.request.SwissvotesRequest, onegov.swissvotes.app.SwissvotesApp], None][source]
- Import a attachments from the given folder. For example: - onegov-swissvotes \ --select '/onegov_swissvotes/swissvotes' \ import-attachments data_folder - Expects a data folder structure with the first level representing an attachment and the second level a locale. The PDFs have to be named by BFS number (single number or range). For example: - data/voting_text/de_CH/001.pdf data/voting_text/de_CH/038.1.pdf data/voting_text/de_CH/622-625.pdf 
- swissvotes.cli.import_campaign_material(group_context: onegov.core.cli.core.GroupContext, folder: str) collections.abc.Callable[[onegov.swissvotes.request.SwissvotesRequest, onegov.swissvotes.app.SwissvotesApp], None][source]
- Import a campaign material from the given folder. For example: - onegov-swissvotes \ --select '/onegov_swissvotes/swissvotes' \ import-campaign-material data_folder - Expects all files within this folder and filenames starting with the BFS number. For example: - 229_Ja-PB_Argumentarium-Gründe-der-Trennung.pdf 232-1_Nein_PB_Referentenführer.pdf