No project description provided
Project description
oarepo-upload-cli
Package that synchronizes documents between the student system and repository up to some date.
CLI Usage
To use the upload CLI tool, you first have to install the package somewhere.
Installing upload CLI in a separate virtualenv
Create a separate virtualenv and install upload CLI into it:
python3.10 -m venv .venv-upload-cli
(source .venv-upload-cli/bin/activate; pip install -U pip setuptools wheel; pip install oarepo-upload-cli)
Configuration
Ini file
In order for the configuration file to be parsed correctly, create the file following these rules:
- name -
~/.repository-uploader.ini
- content template
[authentication] token = enter-token-here [repository] collection_url = url_of_the_collection record_modified_field = dateModified file_modified_field = dateModified [entrypoints] # name of the entrypoint inside oarepo_upload_cli.dependencies # that gives implementation of RecordSource source = # name of the entrypoint inside oarepo_upload_cli.dependencies # that gives implementation of RepositoryClient repository =
Environment variables
Values in the configuration can be overriden by these environment variables:
REPOSITORY_UPLOADER_BEARER_TOKEN
REPOSITORY_UPLOADER_COLLECTION_URL
REPOSITORY_UPLOADER_FILE_MODIFIED_FIELD_NAME
REPOSITORY_UPLOADER_RECORD_MODIFIED_FIELD_NAME
REPOSITORY_UPLOADER_SOURCE
REPOSITORY_UPLOADER_REPOSITORY
Command-line options
Commandline options take the highest priority:
oarepo_upload
--config config-file-location
--token bearer_token
--collection-url collection-url
--file-modified-field file-modified-field
--record-modified-field record-modified-field
--source source-entrypoint
--repository repository-entrypoint
The following options handle which records should be uploaded:
--modified_after
- Timestamp that represents date after modification. If not specified, the last updated timestamp from repository will be used.--modified_before
- Timestamp that represents date before modification.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
oarepo-upload-cli-1.1.2.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for oarepo_upload_cli-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6e15e58e1fe3dca57818162d861f38a107ebeb27be9178ec98be0f6eb15418e |
|
MD5 | 955023fa26c55d1822b4345da881bc63 |
|
BLAKE2b-256 | c6382716cc36a243c166b85ff2d41de09f7123725b61545bf4918e0432492d09 |