GithubHelp home page GithubHelp logo

cloudconvert-cli's Introduction

Command Line Interface for CloudConvert

This CLI for the CloudConvert API v2 allows easy and fast conversions of files using the terminal.

Installation

As this CLI is based on the cloudconvert-node module, node.js is required.

npm install -g cloudconvert-cli

And set your CloudConvert API v2 Key as enviroment variable:

export CLOUDCONVERT_API_KEY=your_key

Usage

To convert input.pdf to jpg:

$ cloudconvert convert -f jpg input.pdf
✔ Done!

Batch processing is supported:

$ cloudconvert convert -f jpg file1.pdf file2.pdf file3.pdf
$ cloudconvert convert -f jpg folder/*.*

You can set conversion specific parameters using the -p argument. For example, if you would like to get the first page of a PDF resized to the width of 250:

$ cloudconvert convert -f jpg -p.pages=1-1 -p.width=250 input.pdf

The best way to find out the possible parameters and values is using the Job Builder.

Optimize

$ cloudconvert optimize input.pdf
✔ Done!
ℹ Task `process`: File size reduced by 12%

Merge

$ cloudconvert merge file1.pdf file2.pdf

Capture Website

$ cloudconvert capture-website -f pdf https://www.google.com

Create Thumbnail

$ cloudconvert thumbnail -f png file1.pdf 

All Options

$ cloudconvert --help

cloudconvert <command>

Commands:
  cloudconvert convert <files..>      Convert files to an output format
  cloudconvert optimize <files..>     Optimize and compress files
  cloudconvert merge <files..>        Merge files to a single PDF
  cloudconvert capture-website <url>  Capture a website as PDF, PNG or JPG
  cloudconvert thumbnail <files..>    Create thumbnails

Options:
  --version        Show version number                                 [boolean]
  --apikey         Set the API key. You can get your API key here:
                   https://cloudconvert.com/dashboard/api/v2/keys
         [string] [required] [default: CLOUDCONVERT_API_KEY enviroment variable]
  --sandbox        Use the CloudConvert Sandbox API   [boolean] [default: false]
  --outputdir      Set the directory for storing the output files. defaults to
                   the working directory                                [string]
  --parameter, -p  Send custom parameters with the task payload. Use the dot
                   notation, for example: -p.engine=office
  --help           Show help                                           [boolean]


Resources

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.