Skip to main content

Dar Invenio Command Line Interface

Project description

DAR-INVENIO-CLI

DAR-INVENIO-CLI is a command-line tool for creating drafts and uploading files in the Invenio webpage.

Installation

You can install the package using pip:

pip install .

Configuration

Before using the tool, you need to set up the configuration. The configuration with api_token is required.

dar-invenio-cli config init --api-token <your-api-token>

You can also update the values for base-api-url and model or api_token later:

dar-invenio-cli config update 

with optional options:

  • --base-api-url <your-base-api-url>
  • --model <your-model>
  • --api-token <your-api-token>

You can see the current configuration by running:

dar-invenio-cli config show

Usage

Create a single draft

From a JSON file:

dar-invenio-cli create draft --from-file /path/to/your/file.json

From a name:

dar-invenio-cli create draft --from-name "My Draft Name"

Create multiple drafts

From multiple JSON files:

dar-invenio-cli create drafts --from-files /path/to/file1.json /path/to/file2.json

From a folder containing JSON files:

dar-invenio-cli create drafts --from-folder /path/to/your/folder

Upload files to a draft

dar-invenio-cli upload <draft_id> /path/to/file1 /path/to/file2

For Developers

The core logic is located in dar_invenio_cli/core.py. You can import and use the functions from this module in your own Python projects.

Deployment to PyPI

To deploy the package to PyPI, follow these steps:

  1. Build the package:

    python -m build
    
  2. Install twine:

    pip install twine
    
  3. Upload to PyPI:

    twine upload dist/*
    

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

dar_invenio_cli-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dar_invenio_cli-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file dar_invenio_cli-0.1.0.tar.gz.

File metadata

  • Download URL: dar_invenio_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dar_invenio_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc0353adeb619f704a25560707b2ce84d39593c9be2b34b1147a9cb33e27f44a
MD5 1db5af1f917644a6cf1cef047b4a8a1a
BLAKE2b-256 95994ccbd05800bd54f4a1de86b30417c69777af5319dcafa2e508cfd6ba1198

See more details on using hashes here.

File details

Details for the file dar_invenio_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dar_invenio_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca1a4949db9f6e0ef1cedf6761e4f4f4ec92b6dcee6bc8e1d89571818e64066a
MD5 457896b851c9fcc5de397684b1f024ae
BLAKE2b-256 3af029feb0a7d5d566fb98fdf1f4d36ca1b48a33ce2b8f8e53c35dba4e25fa2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page