redis-server```Start the redis worker```rq worker```# Web app for viewing Lombard Press compliant transcriptions in PDFOne of the many advantages of encoding transcriptions or editions in a semanticmarkup language is the separation of presentation and content. This means thatthe same file can serve different purposes and be used in different contexts.One incarnation may represent the text as a traditional critical edition set upon a print page with one or several critical apparatus, another incarnation maybe a interactive web page presenting the text alongside images of a manuscript,and yet another a e-reader friendly version with explanatory notes for students.But this separation of presentation and content also means that it may bedifficult to envision how a finished edition may look like. This app provides aneasy interface for converting a XML transcription to a pdf document.Your XML document must be valid and in compliance withthe [LombardPress Schema](http://lombardpress.org/schema/docs/) for critical anddiplomatic editions.You can either upload you own documents or fetch a document fromthe [scta database](http://lombardpress.org/schema/docs/). If you have your ownXSLT script for conversion of the XML document, you can upload that. Otherwisethe app will use a default Lombard Press transformation script. The script usedis based on which version of the LombardPress Schema that the transcription isbased on.## RESTful interfaceOn the url `/compile` you can also pass the id and output as url parameters. Theurl could then look like this:```<hostname>/compile?id=lectio1&output=tex```This will return a JSON response of either an error message or the url of theoutput file.Parameters:- `id`: A valid SCTA id. It can either be a full SCTA url (`http://scta.info/resource/lectio1`) or just the id (`lectio1`).- `output`: Which format should be created? Possibilities are `tex` and `pdf`.When you have a running instance, try `curl -ihttp://127.0.0.1:5000/compile\?id\=http://scta.info/resource/lectio1` (orreplace the hostname appropriately).## WarningThis is still a young app, so it may produce unexpected output. Anything may besubject to change, and I cannot guarantee for the safety of your texts, computeror sanity when using the app.Please report any problems you experience inthe [issue tracker](https://github.com/stenskjaer/lbp_print-web-app/issues).# DevelopmentDownload the repo:```git clone https://github.com/stenskjaer/lbp_print-web-app.git```If you just want to experiment locally (or maybe make a pull request!), youshould probably createa [virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/)for the project. To do that, run:```bash$ mkvirtualenv -p python3 <name>```Where `<name>` is the name you want to give the venv.After activating the venv (`workon` or `source`), install dependencies:```bash$ pip install -r requirements.txt```Finally, you also need to create some directories:```shellmkdir -p upload static/output logs```You can run a local development server with `python3 service.py` if you want totest it with `gunicorn` (equivalent to the Dockerized server), run:```bashgunicorn --worker-class eventlet -w 1 -b 0.0.0.0:5000 service:app```# Docker imageIf you want to build the Docker image, run (from the project directory):```docker build -t lbp-print .```Now, to run: ```docker run -p 80:80 lbp-print```The app should be available on [localhost](http://localhost).# ContributeAll pull requests and issue reports are very welcome! ♡