Skip to main content

Convert your files in terminal using Vertopal API

Project description

Vertopal-CLI

Vertopal-CLI is a small yet powerful utility that allows you to convert digital files into various formats using the Vertopal public API.

You can use Vertopal-CLI by either terminal commands or importing as a Python package.

Installing Vertopal-CLI

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.

Installer

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

Using Vertopal-CLI

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.

Setting App ID and Security Token

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 as Python package

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'

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

vertopal-1.0.3.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

vertopal-1.0.3-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file vertopal-1.0.3.tar.gz.

File metadata

  • Download URL: vertopal-1.0.3.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for vertopal-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c73dde06d6d53f36e5e87a8d9c573bdfe8caceb900ddfcb33afb1576bee9a9fb
MD5 3676824d973db7a12f2f642c93f48111
BLAKE2b-256 4f01c0df00884af48569295a27b2e54dbdc4d3cee570f013dd8aae3b3f3ab1b7

See more details on using hashes here.

File details

Details for the file vertopal-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: vertopal-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for vertopal-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 195d209c1528f15ad5a4ef873a27e4748b60de94df000a600f13096ce16dbb68
MD5 00e9dc0f766d9e97d548f11307dcbc2a
BLAKE2b-256 fc910e43bab792195316f8748ab1947f5b2f33d129a2a268244b0a77930680d8

See more details on using hashes here.

Supported by

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