In this tutorial, you will learn how to install and configure Vertopal CLI to bring file conversion to your Raspberry Pi terminal.
Introduction to Vertopal CLIVertopal CLI is a tiny open-source utility that works on top of Vertopal File Conversion API and supports converting +350 file formats to each other. Converting GIF to APNG, PDF to LATEX, images, documents, spreadsheets, presentations, fonts, ebooks, and tens of thousands of other conversions are supported.
Install Raspbian on Raspberry PiTo make this tutorial short and avoid duplication, use any other great articles about how to get started with setting up your Raspberry Pi. You can also read the Official Documentation.
Install Vertopal CLI on Raspberry PiEven though Vertopal CLI binaries are available for macOS, Windows, and Linux distros, the easiest way to set it up on your Raspberry Pi, is through Package Installer for Python or pip for short. It retrieves packages from the pi-wheel server, making it easier for you to install packages without needing additional dependencies. The package installation from pip is efficient as it compiles the code from the source and then prepares it accordingly for installation.
Step 1: Update RaspbianBefore moving towards the pip installation, the better way is to update current packages on your Raspberry Pi system using the following command:
sudo apt update && sudo apt upgrade -y
Step 2: Install pip on Raspberry PiTo install pip on Raspberry Pi, execute the following command in the terminal:
sudo apt install python3-pip
To check the pip version, you can use the following command:
$ pip --version
pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)
Step 3: Install Vertopal CLI using pipInstall Vertopal CLI on Raspberry Pi by executing the command below:
python -m pip install vertopal
You can check if the package is installed successfully by running either:
$ which vertopal
/home/pi/.local/bin/vertopal
or:
$ vertopal
usage: vertopal [options] <command> [<args>]
A small, yet powerful command-line utility for converting digital files to a variety of file formats using Vertopal public API.
command:
convert Convert files on your local machine
config Configure global config file
options:
-v, --version output version information and exit
-h, --help display this help message and exit
Convert utility by Vertopal - https://www.vertopal.com
Step 4: Obtain Client CredentialsTo start converting files using Vertopal CLI, you need to obtain an app ID and a security token as client credentials. It's used to authenticate and connect to the Vertopal Public API. You can follow simple steps below to get your credentials:
- Visit this page to create a free Vertopal account.
- After logging in to your account, navigate to User Account > API > APPS > New App page.
- Choose a name for your app. For example vertopal-cli and check the "Connect third-party services to this app" option.
- On your app management page, make sure it's on Production status.
- Copy the value of the ID field and the Access Token to use for the next step.
Configure Vertopal CLI and set the client credentials of the Vertopal Public File Conversion API with the command below. Substitute your app ID and security token values from the previous step with the <app-id>
and <token>
below.
vertopal config --app "<app-id>" --token "<token>"
Step 6: Start Converting Files!Congratulations! You are ready to convert hundreds of file formats.
Keep in mind you will need vCredits to convert files using Vertopal CLI. It's free for personal use. Collect them for free every day in your User Account Dashboard.
Create a sample TXT file with the vertopal --help
command as its content using the following command:
vertopal -h > vertopal.txt
Then convert the plain text file to PDF using Vertopal CLI:
$ vertopal convert vertopal.txt --to pdf
[1/4] Uploading vertopal.txt
[2/4] Waiting for PDF conversion
[3/4] Converting vertopal.txt to PDF — please wait...
[INFO] Convert vCredits used: 1
[4/4] Downloading converted file
[DONE] Your converted file saved as vertopal.pdf
Your TXT file is converted to PDF. You can find it in your current working directory, next to the TXT file.
Vertopal CLI supports all the file formats and conversions in its web platform accessible from https://www.vertopal.com.
Vertopal CLI GitHub Repository | Product Page
Comments