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:

@florian@lemmy.world
link
fedilink
English
2
edit-2
6M

I seems a long time ago, I build the same thing as you. For templating I used https://github.com/christopher-ramirez/secretary and as “database” I used Google sheets. Still use it at work.

It never was really user friendly so I am looking to replace it. That is also the main issue with your self build solution? Or are there other issues as well?

I didn’t know about Documint. Looks interesting, will check it out, thanks 👍

@Biorix@lemmy.world
creator
link
fedilink
English
26M

Nice!

Secretary looks exactly like Docxtemplate, which I used on my homemade webpage. Maybe it’s a fork.

It never was really user friendly so I am looking to replace it. That is also the main issue with your self build solution? Or are there other issues as well?

Yes exactly. I need people to be able to use the tools easily and reliably and to be able to add templates themselves.

Also, my main job is not developing tools and I can only do it on my spare time, so the fastest it is to implement the better.

After a week to try, Airtable + Make seems to be the easiest. Airtable also offers to generate documents directly in it, but it lacks options.

My main issue with a lot of tool (except Docxtemplate or similar) is to renders array of data. Most solution replace a {{tag}} with an info, but what I would need is a {{array[i]}} and to be able to generate different paragraphs.

@florian@lemmy.world
link
fedilink
English
25M

What is “Make”? Hard to Google name.

Have you considered open sourcing you self built solution?

@Biorix@lemmy.world
creator
link
fedilink
English
25M

It used to be integromat. You can look it up more easily, haha

I almost succeeded with it, but to integrate multiple entries in one document, it was too complicated.

So, I’m modifying the code I originally made to make API calls to Airtable, and I assemble the doc with docxtpl

I started by creating an API on my already functioning flask app, so everything can be done through Airtable page. But I was worried about opening an API to the world, so I decided to make a local python app that I’ll probably compile to .exe

And yes, I can open source, but it’s really tailored to me needs

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 215 users / day
  • 438 users / week
  • 1.15K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.71K Posts
  • 74.7K Comments
  • Modlog