██████╗ ██████╗ ██████╗ ██████╗██╗ ██████╗ ██╗ ██╗██████╗ ██████╗██╗ ██╗ ██╔══██╗██╔═══██╗██╔════╝██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗ ██╔════╝██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ ██║ ██║██║ ██║██║ ██║█████╗██║ ██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ ██║ ██║██║ ██║██║ ██║╚════╝██║ ██║ ██║ ██████╔╝╚██████╔╝╚██████╗╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝ ╚██████╗███████╗██║ ╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝╚══════╝╚═╝
python cli program for the DocumentCloud platform
A simple CLI tool to enable interacting with DocumentCloud from the comfort of the terminal. Uses the python-documentcloud wrapper of the DocumentCloud API, as well as the excellent Typer CLI library.
Installation
pip install doccloud-cli
Examples
See all commands
doccloud-cli --help
Output:
Usage: doccloud-cli.exe [OPTIONS] COMMAND [ARGS]...
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the │
│ installation. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────╮
│ search Search DocumentCloud for a query. Optionally specify the number of results shown. │
│ upload Upload a document on your machine to DocumentCloud. Will prompt for username and │
│ password if not entered initially. │
│ upload-dir Upload a directory of documents on your machine to DocumentCloud as a Project. Will │
│ prompt for project name, username, and password if not entered initially. │
│ get-document Fetches a document from the numeric ID and displays its metadata. │
│ view-text View the text of a document as parsed by DocumentCloud. Your mileage may vary. │
│ save-text Saves the text of a document to a .txt file. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Searching for documents with the term "Los Angeles". Optional argument to limit the amount of results displayed
doccloud-cli search "Los Angeles" 5
Output:
Search Results
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Contributor ┃ Title ┃ Creation Date ┃ ID ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Rosanna Xia │ 801 S. Los Angeles St., Los Angeles │ Jul 02 2013 │ 723521 │
│ Rosanna Xia │ 817 S. Los Angeles St., Los Angeles │ Jun 28 2013 │ 719140 │
│ Rosanna Xia │ 824 S. Los Angeles St., Los Angeles │ Jun 28 2013 │ 719138 │
│ Online Staff │ Los Angeles County │ Aug 24 2021 │ 21048519 │
│ Cheryl Miller │ Los Angeles Response │ Apr 26 2018 │ 4448284 │
└───────────────┴─────────────────────────────────────┴───────────────┴──────────┘
Uploading a document on your machine to DocumentCloud. You will be prompted for credentials if they are not included.
doccloud-cli upload C:\Users\name\Downloads\document.pdf username password
Features
- Logging into DocumentCloud
- Searching for documents (with hyperlinking!)
- Uploading documents
- Viewing/saving the full text of documents as parsed by DocumentCloud (your mileage may vary)
TODO
- Improve uploading functionality (uploading from URL)
- Support for viewing/adding/deleting annotations
- Improve search functionality (ability to fetch more metadata)
Contributing
- Fork it (https://github.com/leadbraw/doccloud-cli/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Metadata
Release files for doccloud-cli 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| doccloud_cli-1.0.7.tar.gz | 5.3 kB | Without provenance | Details for doccloud_cli-1.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| doccloud_cli-1.0.7-py3-none-any.whl | Python 3 | none | any | Details for doccloud_cli-1.0.7-py3-none-any.whl |
Total release size: 11.7 kB
Release files / doccloud_cli-1.0.7.tar.gz
| Download URL | doccloud_cli-1.0.7.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee83e6119d5e10c58c9ca4ff9e67179dc6c98c2ea90426e6385c8ef4a9e2a35b
|
|
BLAKE2b-256 checksum How to use checksums |
869b962ea4216e860ada87efb19d098d9574957a0d734c2b1b9f56ba463d6d32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.6 Windows/10
|
Release files / doccloud_cli-1.0.7-py3-none-any.whl
| Download URL | doccloud_cli-1.0.7-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf823fcf08b8bdfb6879ef331f3289758611367168bf75e55350fc44c67c1597
|
|
BLAKE2b-256 checksum How to use checksums |
38c9cfbc1b667e8bacb56ab99ad22af29a426be4452d807c06b6016a5d42b22f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.6 Windows/10
|
Security for doccloud-cli 1.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.