Convertit is a format conversion webservice.
Retrieve your document in an other format ! The input file is converted and served back ! Using a dead simple GET request, documents are pulled. Using POST request, it takes the attachment.
Supported conversions:
odt -> pdf
odt -> doc
ods -> xls
csv -> ods
csv -> xls
svg -> pdf
svg -> png
Previously converted documents are cleaned along the way (on each request).
USAGE
Using GET request
Example, convert from odt to pdf :
curl http://convertit/?url=http://server/document.odt&to=application/pdf HTTP/1.1 302 Found Content-Disposition: attachement; filename=document.pdf ...
GET parameters:
url: absolute url of the document to be converted.
“url” also supports a “{X_FORWARDED_FOR}” placeholder for requests not knowing their own host. “{X_FORWARDED_FOR}” will be replaced with the corresponding “X_FORWARDED_FOR” header if available. Be warned that “X_FORWARDED_FOR” is not a safe value since it can be modified by user agents or given false value by forward proxies. Use only if really needed. Exemple:
curl "http://convertit/?url=http://{X_FORWARDED_FOR}/document.odt&to=application/pdf"
Using POST request
Upload data in POST parameter named file:
curl -F "file=@tiger.svg" http://convertit/?to=image/png HTTP/1.1 302 Found Content-Disposition: attachement; filename=tiger.png
Query parameters
to: output mimetype (optionnal, default to application/pdf if not provided);
from: input mimetype (optionnal, guessed from input url or file if not provided).
INSTALL
System dependencies
for OpenDocument support: unoconv
for SVG support: inkscape
Conversion binaries should be in system PATH (which is used internally.)
Download
Development
make serve
Once the application is running, you may visit http://localhost:6543/ in your browser.
Run tests:
make tests
Production
Using gunicorn for example :
gunicorn --workers=1 --paste=production.ini
Using Docker :
sudo docker build -t="convertit" . sudo docker run -p :6543 convertit
Feedback
Open an issue to report a bug or request a new feature.
CREDITS
Companies
Contributors
kiorky <kiorky@cryptelium.net>
Mathieu Leplatre <mathieu.leplatre@makina-corpus.com>
Gaël Utard <gael.utard@makina-corpus.com>
Jean-Etienne Castagnede <j.e.castagnede@gmail.com>
CHANGELOG
2.0.0 (2019-11-22)
Move from Python 2 to Python 3
1.1.5 (2015-04-01)
Fix systematic crash in unoconv converter
1.1.4 (2015-04-01)
Serialize parallel libreoffice conversions with flock instead of celery
1.1.3 (2015-01-20)
Serialize parallel libreoffice conversions
1.1.2 (2014-12-30)
Fix a crash in unoconv error handling
Log errors
Add a warning about unoconv not able to work in parallel
1.1.1 (2014-12-18)
Send HTTP errors as raw strings instead of HTML documents
1.1.0 (2014-05-21)
Use original request header Accept-language to download the URL
Add {X_FORWARDED_FOR} placeholder in GET url parameter. Replaced by the corresponding header if available. It avoids the client initiating the request to be aware of its own address. Exemple:
curl "http://convertit/?url=http://{X_FORWARDED_FOR}/document.odt&to=application/pdf"
1.0 (2013-09-03)
Initial working version
Metadata
Release files for convertit 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| convertit-2.2.0.tar.gz | 78.9 kB | Without provenance | Details |
Release files / convertit-2.2.0.tar.gz
| Download URL | convertit-2.2.0.tar.gz |
|---|---|
| Size | 78.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b4b8550c067265fe215c0ee28e30eb463b163d36d25e7e57677047a2e2fa41c
|
|
BLAKE2b-256 checksum How to use checksums |
9d5f1ab8e9720bd510e58eb7a4fdd5c8383a59968174fc882964231601748b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.5rc1
|
Security for convertit 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.