GithubHelp home page GithubHelp logo

coerick / cloudconvert-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudconvert/cloudconvert-cli

0.0 2.0 0.0 108 KB

Command Line Interface for CloudConvert (https://cloudconvert.com)

JavaScript 100.00%

cloudconvert-cli's Introduction

Command Line Interface for CloudConvert

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

Currently this CLI only supports the basic API features of CloudConvert. Feel free to fork and submit pull requests to improve this!

Installation

As this CLI is based on the cloudconvert-node module, node.js has to be installed, of course.

npm install -g cloudconvert-cli

And set your CloudConvert API Key as enviroment variable:

export CLOUDCONVERT_API_KEY=your_key

Usage

To convert input.pdf to jpg:

$ cloudconvert -f jpg input.pdf
test.pdf  ->  jpg  [=====================================] 100%  Conversion finished!
1 of 1 conversions completed successfully.

Batch converting is supported:

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

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

$ cloudconvert -f jpg -c page_range=1-1 -c resize=250x input.pdf

The best way to find out the possible options and values is using the API Console.

To quickly find out which output formats are supported for a specific file:

$ cloudconvert input.pdf
The file(s) can be converted to the following output formats using the -f argument:
test.pdf      -> dxf, doc, docx, html, odt, pdf, rtf, txt, azw3, epub, lrf, mobi, oeb, pdb, bmp, gif, ico, jpg, odd, png, psd, tiff, webp, emf, eps, ps, svg, wmf

All Options

$ cloudconvert --help

  Usage: cloudconvert [options] [files...]

  Options:

    -h, --help                              output usage information
    -f, --format <format>                   set the output format the file(s) should be converted to
    -c, --converteroption <option>=<value>  set a converter option. example: -c page_range=1-2
    -p, --preset <id>                       use a preset of conversion options. Presets can be managed here: https://cloudconvert.com/preset
    -o, --outputdir <directory>             set the directory for storing the output files. defaults to the working directory
    --apikey <value>                        set the API key. alternatively you can use the CLOUDCONVERT_API_KEY enviroment variable
    --concurrent <n>                        limit to n concurrent conversions. defaults to 5
    -V, --version                           output the version number

  Examples:

    $ cloudconvert -f jpg ../test/*.pdf
    $ cloudconvert -f jpg -c page_range=1-1 test.pdf

Resources

cloudconvert-cli's People

Contributors

josiasmontag avatar

Watchers

James Cloos avatar Erick Arroyo 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.