Giter Club home page Giter Club logo

pdfworkshop's Introduction

pdfworkshop

PDF compress tool, using iLovePDF API

Prerequisites

The application is compatible with Windows and Linux based systems. Python version 3.5 or above is assumed to be installed, as well as pip package manager utility and setuptools module. An updated version of the pylovepdf library is needed, which can be found here.

Installation

pip install pdfworkshop

or

python setup.py install

or

pip install -e ~/local_fork_repo_path/

How to run

pdfworkshop -h

Configuration

name default description
input_dir ./ Directory where PDF files will be collected from.
output_dir ./output/ Directory where the compressed PDF files will be stored.
public_key "" Your public API key.
suffix _compressed The suffix given to compressed files (before the extension).
recursive False Boolean indicating if input_dir must be scanned recursively.

The public_key value must be defined before using the tool for the first time. The required public key can be obtained by creating a developer account on iLovePDF. Any value can be configured using:

pdfworkshop config <config_name> <new_config_value>

Commands

  • list-config - list tool configuration values
  • config <option> <value> - edit tool configuration values
  • run - compress all PDF files stored in input_dir, storing the result in output_dir

How to use

By default, the PDF files to compress should be on the directory from where the tool will be called. After using the run command, an output directory will be created, where all compressed files will be stored.

Example run

To exercise some of the available commands, one can try to:

  • List the current configuration
pdfworkshop list-config
  • Define the API public_key value
pdfworkshop config public_key <new_public_key>
  • Run PDF compress tool
pdfworkshop run

License

This project is licensed under the MIT License - see LICENSE file for details.

pdfworkshop's People

Contributors

markhaakman avatar sinistro14 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.