Command Line Interface (CLI)¶
Following scripts are located in the scripts/ folder.
csv_export¶
USAGE: scripts/csv_export.py [flags]
flags:
scripts/csv_export.py:
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Config file.
(default: 'resources/icubam.env')
--output: Path for export.
Try --helpfull to get a list of all flags.
csv_import¶
USAGE: scripts/csv_import.py [flags]
flags:
scripts/csv_import.py:
--bedcounts_csv: Path to csv file containing bedcounts data.
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Config file.
(default: 'resources/icubam.env')
--[no]force_update: Allow in-place modifications to already present elements.
(default: 'false')
--icus_csv: Path to csv file containing ICU data.
--users_csv: Path to csv file containing user data.
Try --helpfull to get a list of all flags.
csv_lookup_finess¶
USAGE: scripts/csv_lookup_finess.py [flags]
flags:
scripts/csv_lookup_finess.py:
--finess_geojson: Path to geojson file containing FINESS data.
(default: 'resources/finess.geojson')
--fr_cities: Path to csv file containing french cities data.
(default: 'resources/fr_cities.csv')
--input: Path to input csv file containing ICU data.
--output: Path to output csv file.
Try --helpfull to get a list of all flags.
gen_plots¶
Generates plots using icubam.analytics.
flags:
scripts/gen_plots.py:
--config: Config file.
(default: 'resources/config.toml')
--output_dir: Where to write the images. If not use the one in config.
--plot_name: Plot name. If None, generate default plots.
Try --helpfull to get a list of all flags.
generate_api_key¶
This scripts generates an API KEY for external users to access the map.
flags:
scripts/generate_api_key.py:
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Optionally specifies the .env path.
(default: 'resources/icubam.env')
--email: Meta data.
--name: Meta data.
--telephone: Meta data.
Try --helpfull to get a list of all flags.
get_id_url¶
Runs the webserver.
flags:
scripts/get_id_url.py:
--[no]all: Get all ids
(default: 'false')
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Optionally specifies the .env path.
(default: 'resources/icubam.env')
Try --helpfull to get a list of all flags.
migrate_db¶
USAGE: scripts/migrate_db.py [flags]
flags:
scripts/migrate_db.py:
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Config file.
(default: 'resources/icubam.env')
Try --helpfull to get a list of all flags.
populate_db_fake¶
Populates store with fake data.
flags:
scripts/populate_db_fake.py:
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Config file.
(default: 'resources/icubam.env')
Try --helpfull to get a list of all flags.
run_server¶
Runs the webserver.
flags:
scripts/run_server.py:
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Optionally specifies the .env path.
(default: 'resources/icubam.env')
--port: Port of the application.
(an integer)
--server: File for the db.
(default: 'www')
Try --helpfull to get a list of all flags.
schedule_sms¶
Schedules SMS sending with a given delay, or follow the standard schedule.
flags:
scripts/schedule_sms.py:
--config: Config file.
(default: 'resources/config.toml')
--delay: time in seconds to schedule next batch.
(an integer)
--dotenv_path: Optionally specifies the .env path.
(default: 'resources/icubam.env')
Try --helpfull to get a list of all flags.
send_sms¶
USAGE: scripts/send_sms.py [flags]
flags:
scripts/send_sms.py:
--config: Config file.
(default: 'resources/config.toml')
--dotenv_path: Optionally specifies the .env path.
(default: 'resources/icubam.env')
--phone: The number to send the sms to.
Try --helpfull to get a list of all flags.
update_password¶
Runs the webserver.
flags:
scripts/update_password.py:
--config: Config file.
(default: 'resources/config.toml')
--[no]create-admin: Create a new user
(default: 'false')
--dotenv_path: Optionally specifies the .env path.
(default: 'resources/icubam.env')
--email: File for the db.
--password: File for the db.
Try --helpfull to get a list of all flags.
upload_file¶
USAGE: scripts/upload_file.py [flags]
flags:
scripts/upload_file.py:
--dest: Destination URL.
--file_path: File upload path.
Try --helpfull to get a list of all flags.
wipe_sensitive_info_db¶
Wipes sensitive information from an ICUBAM DB.
Warning: modifies data in-place!
flags:
scripts/wipe_sensitive_info_db.py:
--admin_email: Admin email (if resetting admins)
--admin_pass: Admin password (if resetting admins). Set the env variable
ICUBAM_ADMIN_PASS to override
--filename: DB file name.
--[no]force: Do not prompt user confirmation.
(default: 'false')
--[no]keep_beds: Whether to keep bed occupation data.
(default: 'false')
--[no]reset_admin: Reset admin information
(default: 'false')
Try --helpfull to get a list of all flags.