A Python-based tool converting a text file to a PDF file
Project description
Text File to PDF
Install package
You can install text-file-to-pdf
from source.
Option 1 - from PyPi
# Create the virtual environment
python3 -m venv .venv
# Activate the virtual environment
. .venv/bin/activate
pip install text-file-to-pdf
Option 2 - from source - for development
git clone https://github.com/TruckCab/text-file-to-pdf.git
cd text-file-to-pdf
# Create the virtual environment
python3 -m venv .venv
# Activate the virtual environment
. .venv/bin/activate
# Upgrade pip, setuptools, and wheel
pip install --upgrade pip setuptools wheel
# Install text-file-to-pdf - in editable mode with dev dependencies
pip install --editable .[dev]
Note
For the following commands - if you running from source and using --editable
mode (for development purposes) - you will need to set the PYTHONPATH environment variable as follows:
export PYTHONPATH=$(pwd)/src
Usage
Help
text-file-to-pdf --help
Usage: text-file-to-pdf [OPTIONS]
Options:
--version / --no-version Prints the "Text File to PDF" program
version and exits. [required]
--input-file TEXT The input text file to convert to PDF
format. The path can be relative or
absolute. [required]
--output-file TEXT The output PDF file to create. The path can
be relative or absolute. [required]
--orientation [portrait|landscape]
The page orientation to use for the PDF
file. [required]
--format [a3|a4|a5|letter|legal]
The page (paper) format for the PDF file.
[default: letter; required]
--font-name [courier|helvetica|times]
The font to use in the PDF file. [default:
courier; required]
--font-size INTEGER The font-size to use in the PDF file.
[default: 9; required]
--help Show this message and exit.
Handy development commands
Version management
Bump the version of the application - (you must have installed from source with the [dev] extras)
bumpver update --patch
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
text_file_to_pdf-0.0.4.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for text_file_to_pdf-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e8c2010543e187dd14ac303790ed0a311e445c42a11d964ecf8e247ab2cce3a |
|
MD5 | 4032cbe7e722eceb8d5e391a5b8bc46e |
|
BLAKE2b-256 | e2989a831607583aa7c281bdd1e2c8c6c8533944c186db1183fe53aa78ddb180 |