berteh / ScribusGenerator

Create beautiful documents with data. Open source pdf (and Scribus) template and mail-merge alternative.
http://berteh.github.io/ScribusGenerator/
MIT License
247 stars 37 forks source link

Feature: rest/json api for generation sla/pdf #146

Closed 4n70w4 closed 3 months ago

4n70w4 commented 4 years ago

It would be very useful to run this as a web service.

berteh commented 4 years ago

Thanks for the suggestion. I won't have the time to look into this request in the near future, but feel free to push a code improvement if you feel like it. I would review with pleasure.

4n70w4 commented 4 years ago

I have no idea how to do this and no experience with python. But still relevant and would be very convenient!

berteh commented 4 years ago

I don't really see the added value VS additional troubles (eg to upload users SLA templates)... but if you wanna give it a try you can either expose the current command line Scribus Generator installed on your web server (or cloud), such as: https://medium.com/cmd-io/shell-scripts-run-via-secure-web-api-9a59642ee460

or create a native Python API: https://linuxhint.com/rest_api_python/

SLA generation works without having Scribus installed on the webserver, but PDF generation requires Scribus to be installed, and properly configured to bind the Xdisplay to anything the user can interact with.

supersexy commented 3 years ago

any progress / projects in this direction do exist already?

berteh commented 3 years ago

nope, and it's not on my plan for the near future, but I would gladly review a PR if you want to give it a try.

chevdor commented 3 months ago

With https://github.com/berteh/ScribusGenerator/issues/228 in place, it would be rather simple to make a tool doing that and indeed, I would love to see such a service, ideally dockerized.

berteh commented 3 months ago

it's all readily available from the CLI, per the links provided in #228

I've got no docker skills and don't know how a full Scribus install would work in a server settings (I think a screen is needed... but not sure) so I won't be able to help, but if you wanna give it a shot I'd gladly test it out and/or integrate PRs here if needed.

berteh commented 3 months ago

forgot to mention: there's already an embryo of docker for ScribusGenerator at https://github.com/berteh/ScribusGenerator/wiki/Docker-image-for-ScribusGenerator

Kindly test/adapt/improve directly in the wiki... and then document in the README in a PR ;)