CLI

granicus-archiver

Granicus Archiver CLI

granicus-archiver [OPTIONS] COMMAND [ARGS]...

Options

--log-level <LEVEL>

Either TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL.

Options:

TRACE | DEBUG | INFO | SUCCESS | WARNING | ERROR | CRITICAL

-c, --config-file <config_file>
Default:

'$HOME/.config/granicus-archiver/config.yaml'

-o, --out-dir <out_dir>

Root directory to store downloaded files

--data-file <data_file>

Filename to store download information. Defaults to “<out-dir>/data.json”

--granicus-data-url <granicus_data_url>

URL for granicus clip data

--local-timezone <local_timezone>
--legistar-out-dir <legistar_out_dir>

Root directory to store downloaded legistar files

--legistar-data-file <legistar_data_file>

Filename to store legistar information. Defaults to “<legistar-out-dir>/legistar-data.json”

--timestamp-file <timestamp_file>

Filename to store clip timestamp information. Defaults to “<out-dir>/timestamp-data.yaml”

--load-config-env

Load configuration from environment variables

--config-env-file <config_env_file>

Load configuration from environment variables in a file (if –load-config-env is set)

--config-read-only

Disable saving configuration changes

--time, --no-time

Measure and print elapsed execution time.

--color, --ansi, --no-color, --no-ansi

Strip out all colors and all ANSI codes from output.

--show-params

Show all CLI parameters, their provenance, defaults and value, then exit.

--version

Show the version and exit.

Environment variables

('CLI_LOG_LEVEL',)

Provide a default for --log-level

('CLI_CONFIG_FILE',)

Provide a default for -c

('CLI_OUT_DIR',)

Provide a default for -o

('CLI_DATA_FILE',)

Provide a default for --data-file

('CLI_GRANICUS_DATA_URL',)

Provide a default for --granicus-data-url

('CLI_LOCAL_TIMEZONE',)

Provide a default for --local-timezone

('CLI_LEGISTAR_OUT_DIR',)

Provide a default for --legistar-out-dir

('CLI_LEGISTAR_DATA_FILE',)

Provide a default for --legistar-data-file

('CLI_TIMESTAMP_FILE',)

Provide a default for --timestamp-file

('CLI_LOAD_CONFIG_ENV',)

Provide a default for --load-config-env

('CLI_CONFIG_ENV_FILE',)

Provide a default for --config-env-file

('CLI_CONFIG_READ_ONLY',)

Provide a default for --config-read-only

('CLI_TIME',)

Provide a default for --time

('CLI_COLOR',)

Provide a default for --color

('CLI_SHOW_PARAMS',)

Provide a default for --show-params

('CLI_VERSION',)

Provide a default for --version

granicus-archiver show-config

Show the current configuration

granicus-archiver show-config [OPTIONS]

Options

--group <group>
Default:

'all'

Options:

root | aws | google | legistar | all

--as-env

Print as environment variables

Environment variables

('SHOW_CONFIG_GROUP',)

Provide a default for --group

('SHOW_CONFIG_AS_ENV',)

Provide a default for --as-env

granicus-archiver save-config

Save the current configuration to a file

granicus-archiver save-config [OPTIONS]

Options

--out-file <out_file>

Environment variables

('SAVE_CONFIG_OUT_FILE',)

Provide a default for --out-file

Clips

granicus-archiver clips

Granicus clips sub-commands

granicus-archiver clips [OPTIONS] COMMAND [ARGS]...

Options

--time, --no-time

Measure and print elapsed execution time.

--color, --ansi, --no-color, --no-ansi

Strip out all colors and all ANSI codes from output.

-C, --config <CONFIG_PATH>

Location of the configuration file. Supports glob pattern of local path and remote URL.

--show-params

Show all CLI parameters, their provenance, defaults and value, then exit.

--verbosity <LEVEL>

Either CRITICAL, ERROR, WARNING, INFO, DEBUG.

Options:

CRITICAL | ERROR | WARNING | INFO | DEBUG

-v, --verbose
--version

Show the version and exit.

Environment variables

('CLIPS_TIME',)

Provide a default for --time

('CLIPS_COLOR',)

Provide a default for --color

('CLIPS_CONFIG',)

Provide a default for --config

('CLIPS_SHOW_PARAMS',)

Provide a default for --show-params

('CLIPS_VERBOSITY',)

Provide a default for --verbosity

('CLIPS_VERBOSE',)

Provide a default for --verbose

('CLIPS_VERSION',)

Provide a default for --version

granicus-archiver clips download

Download files for Granicus clips

granicus-archiver clips download [OPTIONS]

Options

--max-clips <max_clips>

Maximum number of clips to download. If not provided, there is no limit

--io-job-limit <io_job_limit>

Limit number of concurrent uploads to this amount

Default:

4

--temp-dir <temp_dir>

Directory for temporary files. Only set this if you know what you’re doing

--folder <folder>

Environment variables

('DOWNLOAD_MAX_CLIPS',)

Provide a default for --max-clips

('DOWNLOAD_IO_JOB_LIMIT',)

Provide a default for --io-job-limit

('DOWNLOAD_TEMP_DIR',)

Provide a default for --temp-dir

('DOWNLOAD_FOLDER',)

Provide a default for --folder

granicus-archiver clips check

Check downloaded files using the stored metadata

granicus-archiver clips check [OPTIONS]

Options

--warnings-only, --no-warnings-only

Whether to treat check errors as warnings or exceptions

Default:

True

Environment variables

('CHECK_WARNINGS_ONLY',)

Provide a default for --warnings-only

granicus-archiver clips upload

Upload all local content to Google Drive

granicus-archiver clips upload [OPTIONS]

Options

--drive-folder <drive_folder>

Name of the root folder to upload to

--max-clips <max_clips>

Maximum number of clips to download. If not provided, there is no limit

--io-job-limit <io_job_limit>

Limit number of concurrent downloads to this amount

Default:

8

Environment variables

('UPLOAD_DRIVE_FOLDER',)

Provide a default for --drive-folder

('UPLOAD_MAX_CLIPS',)

Provide a default for --max-clips

('UPLOAD_IO_JOB_LIMIT',)

Provide a default for --io-job-limit

Legistar

granicus-archiver legistar

Legistar sub-commands

granicus-archiver legistar [OPTIONS] COMMAND [ARGS]...

Options

--time, --no-time

Measure and print elapsed execution time.

--color, --ansi, --no-color, --no-ansi

Strip out all colors and all ANSI codes from output.

-C, --config <CONFIG_PATH>

Location of the configuration file. Supports glob pattern of local path and remote URL.

--show-params

Show all CLI parameters, their provenance, defaults and value, then exit.

--verbosity <LEVEL>

Either CRITICAL, ERROR, WARNING, INFO, DEBUG.

Options:

CRITICAL | ERROR | WARNING | INFO | DEBUG

-v, --verbose
--version

Show the version and exit.

Environment variables

('LEGISTAR_TIME',)

Provide a default for --time

('LEGISTAR_COLOR',)

Provide a default for --color

('LEGISTAR_CONFIG',)

Provide a default for --config

('LEGISTAR_SHOW_PARAMS',)

Provide a default for --show-params

('LEGISTAR_VERBOSITY',)

Provide a default for --verbosity

('LEGISTAR_VERBOSE',)

Provide a default for --verbose

('LEGISTAR_VERSION',)

Provide a default for --version

granicus-archiver legistar add-feed-url

Add a legistar calendar RSS feed url

granicus-archiver legistar add-feed-url [OPTIONS]

Options

--name <name>
--url <url>

Environment variables

('ADD_FEED_URL_NAME',)

Provide a default for --name

('ADD_FEED_URL_URL',)

Provide a default for --url

granicus-archiver legistar list-feed-urls

Show RSS feed urls in the current configuration

granicus-archiver legistar list-feed-urls [OPTIONS]

granicus-archiver legistar add-category-map

Map a legistar category to its granicus folder

granicus-archiver legistar add-category-map [OPTIONS]

Options

--granicus-folder <granicus_folder>
--legistar-category <legistar_category>

Environment variables

('ADD_CATEGORY_MAP_GRANICUS_FOLDER',)

Provide a default for --granicus-folder

('ADD_CATEGORY_MAP_LEGISTAR_CATEGORY',)

Provide a default for --legistar-category

“Fake GUID” Commands

granicus-archiver legistar download

Parse and download legistar files

granicus-archiver legistar download [OPTIONS]

Options

--allow-updates, --no-allow-updates
--max-clips <max_clips>

Maximum number of clips to download agenda packets for. If zero, downloads are disabled

Default:

0

Whether to remove embedded links from downloaded pdf files

Default:

True

--temp-dir <temp_dir>

Directory for temporary files. Only set this if you know what you’re doing

--incomplete-csv <incomplete_csv>

Optional file to write incomplete items to (as CSV)

Environment variables

('DOWNLOAD_ALLOW_UPDATES',)

Provide a default for --allow-updates

('DOWNLOAD_MAX_CLIPS',)

Provide a default for --max-clips

('DOWNLOAD_TEMP_DIR',)

Provide a default for --temp-dir

('DOWNLOAD_INCOMPLETE_CSV',)

Provide a default for --incomplete-csv

granicus-archiver legistar check

Check downloaded files using the stored metadata

granicus-archiver legistar check [OPTIONS]

Options

--recheck-hashes, --no-recheck-hashes

Environment variables

('CHECK_RECHECK_HASHES',)

Provide a default for --recheck-hashes

granicus-archiver legistar upload

Upload all local content to Google Drive

granicus-archiver legistar upload [OPTIONS]

Options

--max-clips <max_clips>

Maximum number of clips to upload

--drive-folder <drive_folder>

Name of the root folder to upload to

Environment variables

('UPLOAD_MAX_CLIPS',)

Provide a default for --max-clips

('UPLOAD_DRIVE_FOLDER',)

Provide a default for --drive-folder

“Real GUID” Commands

granicus-archiver legistar download-rguid

Parse and download legistar files

granicus-archiver legistar download-rguid [OPTIONS]

Options

--allow-updates, --no-allow-updates
--max-clips <max_clips>

Maximum number of clips to download agenda packets for. If zero, downloads are disabled

Default:

0

Whether to remove embedded links from downloaded pdf files

Default:

True

--temp-dir <temp_dir>

Directory for temporary files. Only set this if you know what you’re doing

--incomplete-csv <incomplete_csv>

Optional file to write incomplete items to (as CSV)

Environment variables

('DOWNLOAD_RGUID_ALLOW_UPDATES',)

Provide a default for --allow-updates

('DOWNLOAD_RGUID_MAX_CLIPS',)

Provide a default for --max-clips

('DOWNLOAD_RGUID_TEMP_DIR',)

Provide a default for --temp-dir

('DOWNLOAD_RGUID_INCOMPLETE_CSV',)

Provide a default for --incomplete-csv

granicus-archiver legistar check-rguid

Check downloaded files using the stored metadata

granicus-archiver legistar check-rguid [OPTIONS]

Options

--recheck-hashes, --no-recheck-hashes

Environment variables

('CHECK_RGUID_RECHECK_HASHES',)

Provide a default for --recheck-hashes

granicus-archiver legistar upload-rguid

Upload all local content to Google Drive

granicus-archiver legistar upload-rguid [OPTIONS]

Options

--max-clips <max_clips>

Maximum number of clips to upload

--drive-folder <drive_folder>

Name of the root folder to upload to

Environment variables

('UPLOAD_RGUID_MAX_CLIPS',)

Provide a default for --max-clips

('UPLOAD_RGUID_DRIVE_FOLDER',)

Provide a default for --drive-folder

Drive

granicus-archiver drive

Google Drive sub-commands

granicus-archiver drive [OPTIONS] COMMAND [ARGS]...

granicus-archiver drive authorize

Launch a browser window to authorize uploads to Drive

granicus-archiver drive authorize [OPTIONS]

AWS

granicus-archiver aws

AWS sub-commands

granicus-archiver aws [OPTIONS] COMMAND [ARGS]...

Options

--time, --no-time

Measure and print elapsed execution time.

--color, --ansi, --no-color, --no-ansi

Strip out all colors and all ANSI codes from output.

-C, --config <CONFIG_PATH>

Location of the configuration file. Supports glob pattern of local path and remote URL.

--show-params

Show all CLI parameters, their provenance, defaults and value, then exit.

--verbosity <LEVEL>

Either CRITICAL, ERROR, WARNING, INFO, DEBUG.

Options:

CRITICAL | ERROR | WARNING | INFO | DEBUG

-v, --verbose
--version

Show the version and exit.

Environment variables

('AWS_TIME',)

Provide a default for --time

('AWS_COLOR',)

Provide a default for --color

('AWS_CONFIG',)

Provide a default for --config

('AWS_SHOW_PARAMS',)

Provide a default for --show-params

('AWS_VERBOSITY',)

Provide a default for --verbosity

('AWS_VERBOSE',)

Provide a default for --verbose

('AWS_VERSION',)

Provide a default for --version

granicus-archiver aws config

Configure AWS settings

granicus-archiver aws config [OPTIONS]

Options

--bucket-name <bucket_name>

The bucket to use for the archive

--clips-prefix <clips_prefix>
--legistar-prefix <legistar_prefix>
--legistar-rguid-prefix <legistar_rguid_prefix>
--endpoint-url <endpoint_url>

Custom S3 endpoint URL (for S3-compatible services)

--region-name <region_name>

AWS region name

--credentials-profile <credentials_profile>

AWS credentials profile name (from ~/.aws/credentials)

--object-url-format <object_url_format>

Format string for generating object URLs. The string must contain {bucket_name} and {key} fields. If not set, the default format for the service will be used. (Default: https://s3.amazonaws.com/{bucket_name}/{key})

Environment variables

('CONFIG_BUCKET_NAME',)

Provide a default for --bucket-name

('CONFIG_CLIPS_PREFIX',)

Provide a default for --clips-prefix

('CONFIG_LEGISTAR_PREFIX',)

Provide a default for --legistar-prefix

('CONFIG_LEGISTAR_RGUID_PREFIX',)

Provide a default for --legistar-rguid-prefix

('CONFIG_ENDPOINT_URL',)

Provide a default for --endpoint-url

('CONFIG_REGION_NAME',)

Provide a default for --region-name

('CONFIG_CREDENTIALS_PROFILE',)

Provide a default for --credentials-profile

('CONFIG_OBJECT_URL_FORMAT',)

Provide a default for --object-url-format

granicus-archiver aws upload-clips

Upload clips to AWS

granicus-archiver aws upload-clips [OPTIONS]

Options

--max-clips <max_clips>

Required Maximum number of clips to upload

--io-job-limit <io_job_limit>

Limit number of concurrent uploads to this amount

Default:

8

Environment variables

('UPLOAD_CLIPS_MAX_CLIPS',)

Provide a default for --max-clips

('UPLOAD_CLIPS_IO_JOB_LIMIT',)

Provide a default for --io-job-limit

granicus-archiver aws upload-legistar

Upload Legistar files to AWS

granicus-archiver aws upload-legistar [OPTIONS]

Options

--max-clips <max_clips>

Required Maximum number of items to upload

Environment variables

('UPLOAD_LEGISTAR_MAX_CLIPS',)

Provide a default for --max-clips

granicus-archiver aws upload-legistar-rguid

Upload Real-Guid Legistar files to AWS

granicus-archiver aws upload-legistar-rguid [OPTIONS]

Options

--max-clips <max_clips>

Required Maximum number of items to upload

Environment variables

('UPLOAD_LEGISTAR_RGUID_MAX_CLIPS',)

Provide a default for --max-clips

Web

granicus-archiver web

granicus-archiver web [OPTIONS] COMMAND [ARGS]...

Options

--log-level <LEVEL>

Either TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL.

Options:

TRACE | DEBUG | INFO | SUCCESS | WARNING | ERROR | CRITICAL

-c, --config-file <config_file>

Config file to use. If provided (and the file exists), any other options are ignored. If provided and the file does not exist, the file will be created with the specified options.

-h, --hostname <hostname>
Default:

'localhost'

-p, --port <port>
Default:

8080

--sockfile <sockfile>

Unix socket file to use for the server (if not specified, use TCP)

--serve-static, --no-serve-static
Default:

True

--read-only, --no-read-only
Default:

True

--static-url <static_url>
Default:

'/'

--use-s3, --no-use-s3
Default:

False

--s3-data-dir <s3_data_dir>
--time, --no-time

Measure and print elapsed execution time.

--color, --ansi, --no-color, --no-ansi

Strip out all colors and all ANSI codes from output.

--show-params

Show all CLI parameters, their provenance, defaults and value, then exit.

--version

Show the version and exit.

Environment variables

('WEB_LOG_LEVEL',)

Provide a default for --log-level

('WEB_CONFIG_FILE',)

Provide a default for -c

('WEB_HOSTNAME',)

Provide a default for -h

('WEB_PORT',)

Provide a default for -p

('WEB_SOCKFILE',)

Provide a default for --sockfile

('WEB_SERVE_STATIC',)

Provide a default for --serve-static

('WEB_READ_ONLY',)

Provide a default for --read-only

('WEB_STATIC_URL',)

Provide a default for --static-url

('WEB_USE_S3',)

Provide a default for --use-s3

('WEB_S3_DATA_DIR',)

Provide a default for --s3-data-dir

('WEB_TIME',)

Provide a default for --time

('WEB_COLOR',)

Provide a default for --color

('WEB_SHOW_PARAMS',)

Provide a default for --show-params

('WEB_VERSION',)

Provide a default for --version

granicus-archiver web collect-static

Collect static files

granicus-archiver web collect-static [OPTIONS] OUT_DIR

Options

--dry-run

Arguments

OUT_DIR

Required argument

Environment variables

('COLLECT_STATIC_DRY_RUN',)

Provide a default for --dry-run

granicus-archiver web serve

Run the webapp and optionally launch a browser window

granicus-archiver web serve [OPTIONS]

Options

--launch-browser, --no-launch-browser

Launch a browser window after starting the server

Default:

True

Environment variables

('SERVE_LAUNCH_BROWSER',)

Provide a default for --launch-browser