#converting #docx #pdf #auto-cad #api-bindings #api-key #cloudconvert

simple_cloudconvert

Simple Cloudconvert functionality for converting files

6 releases

0.7.1 Jan 16, 2025
0.7.0 Jan 16, 2025
0.6.0 Jan 14, 2025
0.5.2 Jan 14, 2025

#529 in Encoding

Download history 270/week @ 2024-12-30 21/week @ 2025-01-06 421/week @ 2025-01-13 42/week @ 2025-01-20

505 downloads per month

MIT license

15KB
141 lines

Simple cloudconvert package

This is a package for converting a file from one format to another using cloudconvert. This package is very minimal and uses Cloudconvert API in order to convert files.

Usage

fn main(){
    use dotenv::dotenv;
    let _ = dotenv().ok();
    let converter = Converter::new("YOUR CLOUDCONVER API KEY");
    let link = converter.convert("path/to/file", // example: "C:\\Users\\user\\file.csv" 
    "file format", // the format of the input file. example: "csv". Find all valid formats here: https://api.cloudconvert.com/v2/convert/formats 
    "output format"); // the output format you want
    println!("{}", link.unwrap()); // A link to the new file. example: https://eu-central.storage.cloudconvert.com/tasks/loremipsumloremipsum
}

Get Your cloudconvert API key from here (Requires a cloudconvert account)

Warnings

  1. Cloudconvert requires tokens, and uses 1 token per usage of converter.convert
  2. Cloudconvert also has a rate limit of 500 requests.
  3. This request uses blocking requests from request::blocking, this could result in errors in async programs.
  4. No Advanced error handling. If there's any error it is simply returned back to you.

extra note

This package is NOT a cloudconvert API client. You can find that here. This is a package for pure usage.

Dependencies

~4–16MB
~201K SLoC