https://github.com/openfun/svg-converter
DEPRECATED A simple server to generate pdf files from svg
https://github.com/openfun/svg-converter
Last synced: about 1 year ago
JSON representation
DEPRECATED A simple server to generate pdf files from svg
- Host: GitHub
- URL: https://github.com/openfun/svg-converter
- Owner: openfun
- Created: 2017-08-07T10:30:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T16:28:48.000Z (over 8 years ago)
- Last Synced: 2025-01-13T12:48:43.534Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
SVG Converter REST API
----------------------
This is for now a very simple server that will accept an SVG file (POST) as an input and later be able to convert it
to a PDF or PNG file. This is using Inkscape in the background and can be made to use Cairosvg.
Example of use via curl:
> curl -X POST -F 'file=@_model.svg' -H 'Authorization: Token 48de857eedb88797209521a1695b0dc8d614afd4' http://127.0.0.1:8989/svgfiles/
It will return a file identifier which will be then used to get a specific version of the file (pdf or png):
> curl -X GET http://127.0.0.1:8989/converter/png/converterc7nu1vbyr > test.png
Requirements
------------
It can be installed as a simple django application using a deployment script such as
https://github.com/jcalazan/ansible-django-stack
TODO
----
For now this is very basic, but we could imagine (it is actually very crude, but works...):
- caching : make sure that we don't need to transform the file each time
- use of django storage
- storage of svg in the database instead of in the temp file folder