I’m looking for a solution to generate document (ideally docx but pdf is ok) from a database
Ex: I have a project entry (with client info, dates, information about the project, etc.) and I want to generate documents from a tender templates, containing selected entries from the database.
Here is what I tried until now :
- Custom database (tinyDB) + custom webpage form + a docx template with jinja markups served by a homemade webpage hosted on pythonanywhere (lot of work and not reliable as I’m doing everything myself)
- Nocodb form and database (no document generation yet) (self-hosted or on cloud)
- Airtable (closed source and on cloud) for forms, database and document generation
Airtable is what I’m currently trying because it’s the only one that I found that have lot of support and adds on.
There are a few options on Airtable for document generation, lot of which cost around $30/month which is why I’m looking for a viable alternative. Ideally I would like to be able to upload my already made templates.
More point to the solution if it’s supports geodata
I’m considering keeping airtable and using the api to generate document with the python program I used on the first point, but I’d like to know if there is more options.
EDIT2: to be concise: I’m looking for an alternative to Airtable + Make. Ideally, FOSS and self-hostable or on cloud
Edit: precision: I need to create a document that contains multiple items of the db. Ex: I need to create a resume with different experiences that are saved in the database
Here is an example of a template:
Yes, that why I recommand jinja. as it can be used in OpenXML as well as latex or anything in plain text.
Let’s say you want to place a table that corresponds to a certain pattern, you could add it to your file conditionally. In your Word document, you could add that :
{% for job in jobs %} {% if job.style == 1 %} {{ job.name }} | {{ job.date}} | ... {% else %} - {{ job.name }} - {{ job.date}} - ... {% endif %} {% endfor %}
I don’t know .NET but you can probably call a Jinja tools
Also for the resume, you might be insterested in Rx Resume
Ah thanks for letting me know about Rx Resume! Great resource, and actually solves the last mile problem (creating the document) of my little personal app. I am a bit of a jack of all trades, so I made a little database for the resume where the lowest level item (the little bullet points in the experience) can have tags attached to them. So I might describe the same job/experience in multiple ways depending on who the audience is, and then filter for the tags to only get the bullet points that are relevant for that position and generate a resume.
Now instead of going into some whole slog of coding document generation, I can just export that bit as JSON and import into Rx Resume! Thanks again!