11# ConvertAPI CLI Client
22
3- ## Convert your files with our command line file conversion utility
3+ ## Convert your files with our command- line file conversion utility
44
5- The ConvertAPI helps converting various file formats.
6- Creating PDF and Images from various sources like Word, Excel, Powerpoint, images, web pages or raw HTML codes.
7- Merge, Encrypt, Split, Repair and Decrypt PDF files.
8- And many others files manipulations.
9- In just few minutes you can integrate it into your application or shell script and use it easily.
5+ ConvertAPI helps in converting various file formats. Creating PDF and Images from various sources like Word, Excel, Powerpoint, images, web pages or raw HTML codes. Merge, Encrypt, Split, Repair and Decrypt PDF files and many other file manipulations. You can integrate it into your application in just a few minutes and use it easily.
106
117The ConvertAPI CLI makes it easier to use the Convert API from your shell without having to build your own HTTP calls.
128You can get your free secret at https://www.convertapi.com/a
@@ -15,12 +11,12 @@ You can get your free secret at https://www.convertapi.com/a
1511
1612Download compressed CLI executable
1713
18- * Linux: [ convertapi_lin.zip] ( http ://github)
19- * Linux ARM64: [ convertapi_lin_arm.zip] ( http ://github)
20- * Darwin (MacOS): [ convertapi_mac.zip] ( http ://github)
21- * Windows: [ convertapi_win.zip] ( http ://github)
14+ * Linux: [ convertapi_lin.zip] ( https ://github.com/ConvertAPI/convertapi-cli/releases/download/v1/convertapi_lin.zip )
15+ * Linux ARM64: [ convertapi_lin_arm.zip] ( https ://github.com/ConvertAPI/convertapi-cli/releases/download/v1/convertapi_lin_arm.zip )
16+ * Darwin (MacOS): [ convertapi_mac.zip] ( https ://github.com/ConvertAPI/convertapi-cli/releases/download/v1/convertapi_mac.zip )
17+ * Windows: [ convertapi_win.zip] ( https ://github.com/ConvertAPI/convertapi-cli/releases/download/v1/convertapi_win.zip )
2218
23- (this utility also can be built from source code for many other CPU and OS)
19+ (this utility can also be built from source code for many other CPU and OS)
2420
2521Unzip executable
2622
@@ -29,7 +25,7 @@ unzip convertapi_*.zip
2925```
3026
3127And you are done.
32- Optionally you can move executable file to more appropriate place and make utility accessible for all local users. On Linux would be:
28+ Optionally you can move the executable file to a more appropriate place and make utility accessible for all local users. On Linux it would be:
3329
3430``` shell
3531sudo mv convertapi /usr/local/bin
@@ -39,16 +35,16 @@ sudo mv convertapi /usr/local/bin
3935
4036### Before you start
4137
42- In order to use this CLI utility you must create your free trial account on https://www.convertapi.com site.
43- After sign up process you will get your secret at https://www.convertapi.com/a .
44- Secret will be used in every CLI utility run.
38+ In order to use this CLI utility, you must create your free trial account on https://www.convertapi.com site.
39+ After the sign- up process, you will get your secret at https://www.convertapi.com/a .
40+ The secret will be used in every CLI utility run.
4541
46- ### Most basic file conversion
42+ ### Basic file conversion
4743
48- Before we go in to details, short usage example how to convert DOCX file to PDF.
44+ Before we go into detail, a short usage example of how to convert DOCX file to PDF.
4945
5046``` shell
51- convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx" --out=" @/path/to/resultdir" --secret=< YOUR_SECRET_HERE >
47+ convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx" --out=" @/path/to/resultdir" --secret=your-api-secret
5248```
5349
5450### Arguments documentation
@@ -87,12 +83,12 @@ Comma `,` inside the parameter value must be escaped with `\,`.
8783##### File parameter
8884
8985Special case is file parameter.
90- Value can have prefix and can be provided as an array with ` ; ` semicolon separator.
91- Prefix can be one of those:
86+ Value can have a prefix and can be provided as an array with the ` ; ` semicolon separator.
87+ The prefix can be one of those:
9288
9389###### no prefix
9490
95- No prefix means that value is http or https scheme URL to file.
91+ No prefix means that the value is http or https scheme URL to a file.
9692_ Example:_
9793
9894``` shell
@@ -101,7 +97,7 @@ _Example:_
10197
10298###### @
10399
104- Parameter values starting from ` @ ` are treated as paths to local files or directories.
100+ Parameter values starting with ` @ ` are treated as paths to the local files or directories.
105101_ Example:_
106102
107103``` shell
@@ -110,8 +106,8 @@ _Example:_
110106
111107###### <
112108
113- Parameters with ` < ` values are substituted with data taken from ` STDIN ` .
114- As raw value can only be URL so in this case data received from ` STDIN ` should be URL or URL array separated by ` \n `
109+ Parameters with ` < ` values are substituted with the data taken from ` STDIN ` .
110+ As a raw value can only be the URL then, in this case, the data received from ` STDIN ` should be URL or URL array separated by ` \n `
115111_ Example:_
116112
117113``` shell
@@ -120,9 +116,9 @@ _Example:_
120116
121117###### @<
122118
123- Parameters with ` @< ` values are substituted with data taken from ` STDIN ` .
124- Data received from ` STDIN ` should be local path to file or directory.
125- Also can be an array of paths separated by ` \n ` .
119+ Parameters with ` @< ` values are substituted with the data taken from ` STDIN ` .
120+ Data received from ` STDIN ` should be a local path to the file or directory.
121+ It can also be an array of paths separated by ` \n ` .
126122_ Example:_
127123
128124``` shell
@@ -131,7 +127,7 @@ _Example:_
131127
132128###### <<
133129
134- Parameters with ` << ` values are substituted with data taken from ` STDIN ` .
130+ Parameters with ` << ` values are substituted with the data taken from ` STDIN ` .
135131Data received from ` STDIN ` should be file content.
136132_ Example:_
137133
@@ -141,7 +137,7 @@ _Example:_
141137
142138##### Array parameter
143139
144- If parameter name is suffixed with ` [] ` parameter gets treated as an array parameter.
140+ If a parameter name is suffixed with ` [] ` , the parameter is treated as an array parameter.
145141Mainly array parameters are used when one conversion needs to accept multiple files (e.g. pdf merge or zip compression).
146142
147143``` shell
@@ -150,17 +146,17 @@ Mainly array parameters are used when one conversion needs to accept multiple fi
150146
151147#### --out
152148
153- Argument defines how conversion result should be outputted.
149+ The argument defines how conversion result should be outputted.
154150Values can be one of those:
155151
156152##### url
157153
158- This is default output method. It prints to ` STDOUT ` URL or array of URLs that point to converted files.
154+ This is the default output method. It prints to ` STDOUT ` URL or array of URLs that point to the converted files.
159155This method should be used for conversion chaining.
160156
161157##### @
162158
163- Value prefixed with ` @ ` is treated as local file or directory path where converted file will be stored.
159+ Value prefixed with ` @ ` is treated as a local file or directory path where the converted file will be stored.
164160_ Example:_
165161
166162``` shell
173169
174170##### stdout
175171
176- Conversion result will be outputted to ` STDOUT ` .
177- If result consists of multiple files, second and other files will be outputted to file descriptors starting from 3.
172+ The Conversion result will be outputted to ` STDOUT ` .
173+ If the result contains multiple files, second and the following files will be outputted to the file descriptors starting from 3.
178174
179175``` shell
180176--out=" stdout"
@@ -191,57 +187,57 @@ Outputs CLI utility version information and exits.
191187
192188#### --help
193189
194- Displays short usage information.
190+ Displays a short usage information.
195191
196192
197193### Examples
198194
199- Convert local DOCX file to PDF A3 page size saving result to ` /path/to/resultdir `
195+ Convert a local DOCX file to PDF A3 page size saving the result to ` /path/to/resultdir `
200196``` shell
201- convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx, pagesize:a3" --out=" @/path/to/resultdir" --secret=< YOUR_SECRET_HERE >
197+ convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx, pagesize:a3" --out=" @/path/to/resultdir" --secret=your-api-secret
202198```
203199
204- Merge all PDF files that are in ` /path/to/dir ` directory and save it locally
200+ Merge all PDF files that are located in ` /path/to/dir ` directory and save it locally
205201``` shell
206- convertapi --iformat=pdf --oformat=merge --params=" files[]:@/path/to/dir" --out=" @/path/to/resultdir" --secret=< YOUR_SECRET_HERE >
202+ convertapi --iformat=pdf --oformat=merge --params=" files[]:@/path/to/dir" --out=" @/path/to/resultdir" --secret=your-api-secret
207203```
208204
209- Convert remote PPTX file to PDF saving result to ` /path/to/result.pdf `
205+ Convert remote PPTX file to PDF saving the result to ` /path/to/result.pdf `
210206``` shell
211- convertapi --iformat=pptx --oformat=pdf --params=" file:https://example.com/myfile.pptx" --out=" @/path/to/result.pdf" --secret=< YOUR_SECRET_HERE >
207+ convertapi --iformat=pptx --oformat=pdf --params=" file:https://example.com/myfile.pptx" --out=" @/path/to/result.pdf" --secret=your-api-secret
212208```
213209
214- Convert from DOCX to JPG and ZIP result JPG files
210+ Convert from DOCX to JPG and ZIP the result JPG files into a single archive
215211``` shell
216- convertapi --iformat=docx --oformat=jpg --params=" file:@/path/to/test.docx" --secret=< YOUR_SECRET_HERE > \
217- | convertapi --iformat=jpg --oformat=zip --params=" files[]:<" --out=" @/path/to/result.zip" --secret=< YOUR_SECRET_HERE >
212+ convertapi --iformat=docx --oformat=jpg --params=" file:@/path/to/test.docx" --secret=your-api-secret \
213+ | convertapi --iformat=jpg --oformat=zip --params=" files[]:<" --out=" @/path/to/result.zip" --secret=your-api-secret
218214```
219215
220- Convert DOCX to PDF and save result in remote server over SSH
216+ Convert DOCX to PDF and save the result on a remote server over SSH
221217``` shell
222- convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx" --out=stdout --secret=< YOUR_SECRET_HERE > \
218+ convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx" --out=stdout --secret=your-api-secret \
223219 | ssh user@myserver " cat >/tmp/my.pdf"
224220```
225221
226- Get PDF file from remote server, convert it to JPG and save result locally
222+ Get the PDF file from a remote server, convert it to JPG and save the result locally
227223``` shell
228224ssh user@server " cat /tmp/my.pdf" \
229- | convertapi --iformat=pdf --oformat=jpg --params=" file:<<" --out=@/path/to/resultdir --secret=< YOUR_SECRET_HERE >
225+ | convertapi --iformat=pdf --oformat=jpg --params=" file:<<" --out=@/path/to/resultdir --secret=your-api-secret
230226```
231227
232- Do PDF->JPG and DOCX->JPG conversions in parallel and ZIP result JPG files
228+ Do PDF->JPG and DOCX->JPG conversions in parallel and ZIP the converted JPG files
233229``` shell
234230( \
235- convertapi --iformat=pdf --oformat=jpg --params=" file:/path/to/dir" --secret=< YOUR_SECRET_HERE > \
236- & convertapi --iformat=docx --oformat=jpg --params=" file:@/path/to/dir" --secret=< YOUR_SECRET_HERE > \
237- ) | convertapi --iformat=jpg --oformat=zip --params=" files[]:<" --out=@/path/to/resultdir --secret=< YOUR_SECRET_HERE >
231+ convertapi --iformat=pdf --oformat=jpg --params=" file:/path/to/dir" --secret=your-api-secret \
232+ & convertapi --iformat=docx --oformat=jpg --params=" file:@/path/to/dir" --secret=your-api-secret \
233+ ) | convertapi --iformat=jpg --oformat=zip --params=" files[]:<" --out=@/path/to/resultdir --secret=your-api-secret
238234```
239235
240- Merge PDFs files from various locations: remote SSH server, local file, local directory, remote HTTP server.
241- Save result file to remote SSH server. All this done without writing to disk.
236+ Merge PDFs files from various locations: a remote SSH server, local file, local directory, and a remote HTTP server.
237+ Save the result file on a remote SSH server. All of this is done without writing to disk.
242238``` shell
243239ssh user@server1 " cat /tmp/my.pdf" \
244- | convertapi --iformat=pdf --oformat=merge --params=" files[]:<<;@/path/to/test.pdf;@/path/to/dir;https://example.com/my.pdf" --out=stdout --secret=< YOUR_SECRET_HERE > \
240+ | convertapi --iformat=pdf --oformat=merge --params=" files[]:<<;@/path/to/test.pdf;@/path/to/dir;https://example.com/my.pdf" --out=stdout --secret=your-api-secret \
245241 | ssh user@myserver2 " cat >/tmp/my.pdf"
246242```
247243
@@ -250,4 +246,4 @@ Please leave all comments, bugs, requests, and issues on the Issues page. We'll
250246
251247### License
252248The ConvertAPI CLI is licensed under the [ MIT] ( http://www.opensource.org/licenses/mit-license.php " Read more about the MIT license form ") license.
253- Refer to the [ LICENSE] ( https://github. com/ConvertAPI/convertapi-cli/blob/ master/LICENSE ) file for more information.
249+ Refer to the [ LICENSE] ( https://raw.githubusercontent. com/ConvertAPI/convertapi-cli/master/LICENSE.txt ) file for more information.
0 commit comments