File | Date | Author | Commit |
---|---|---|---|
.github | 2023-03-22 | Vertonim | [668276] Update action trigger & permissions |
vertopal | 2023-03-28 | Vertonim | [095a49] Vertopal CLI v1.0.2 |
.gitignore | 2023-02-10 | Vertonim | [ae37c8] Initial commit |
LICENSE | 2023-02-10 | Vertonim | [ae37c8] Initial commit |
README.md | 2023-03-30 | Vertonim | [7ea81d] Better Windows PowerShell installer |
pyproject.toml | 2023-03-28 | Vertonim | [4b2d5b] Vertopal CLI v1.0.2 |
requirements.txt | 2023-02-26 | Vertonim | [6322df] Create requirements.txt |
setup.py | 2023-02-10 | Vertonim | [ae37c8] Initial commit |
Vertopal-CLI is a small, yet powerful utility for converting
digital files to a variety of file formats
using Vertopal public API.
You can use Vertopal-CLI by either terminal commands or
importing as Python package.
Vertopal-CLI is available on PyPI:
python -m pip install vertopal
You can also download the most recent version of Vertopal-CLI binaries for
macOS, Windows, and Linux from the
releases page or
the product page.
An automatic installer is available for each different platform. It will run an
install script that downloads and copy Vertopal-CLI binaries to the correct
location.
Using macOS Terminal:
curl https://run.vertopal.com/cli/macos | bash
On Windows using PowerShell:
(curl https://run.vertopal.com/cli/windows).Content | iex
If you are getting any UnauthorizedAccess error, then start Windows
PowerShell with the "Run as administrator" option and run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
.
Now re-run the above installation command. To change the
Execution Policies
to its default, you can run
Set-ExecutionPolicy -ExecutionPolicy Default -Scope LocalMachine
.
Using Linux Terminal:
curl https://run.vertopal.com/cli/linux | bash
To use Vertopal-CLI you need to obtain an App-ID and a Security Token.
Converting files using terminal commands are very simple:
vertopal convert document.ipynb --to pdf
To view full command-line help, execute vertopal --help
and vertopal convert --help
in terminal.
Before executing vertopal convert
commands in terminal, you need to set
your obtained App-ID and Security Token in global configuration file:
vertopal config --app "your-app-id" --token "your-security-token"
Importing vertopal as a Python package gives you
more control and flexibility over each individual task:
>>> import vertopal
>>> response = vertopal.API.upload(
... filename="document.pdf",
... filepath="/home/vertopal/document.ipynb",
... app="your-app-id",
... token="your-security-token",
... )
>>> response
<Response [200]>
>>> json_response = response.json()
>>> json_response["result"]["output"]["connector"]
'the-connector-of-the-upload-task'