davidverweij / csv2docx

Generates .docx files from .csv files using a .docx template with mailmerge fields
MIT License
5 stars 0 forks source link

Future Thinking: ElectronJS app? #27

Open davidverweij opened 4 years ago

davidverweij commented 4 years ago

This is rather a far-future view, but I've been keen on exploring ElectronJs for a while, but never really got a reason to do it. Our csv2docx feels like a small enough (insert chuckle as we are not there yet) project to give it a go. I found an article that shows the ability to interface with Python from within an EletronJS app.

Exploring this venue would allow us to produce a cross-platform desktop app, allowing non-developers users to benefit from our solution from within the Desktop. It would then be easily updated based on the Python package if need be. ElectronJS would we one approach - allowing us to use HTML, CSS, JS for GUI development, but alternatives are of interest too of course.

This is by no means a priority, but I thought to bring it up to slowly discuss and keep track of this potential.

Thoughts?

jawrainey commented 4 years ago

I agree that it would be neat to have non-developers use the library, and one approach could be a desktop app, but that couples dowloading/installing an app for (most likely) a one-off use. I think that the examples ElectronJs are used for (slack, twitch, messenger) might indicate the scale needed to justify building a desktop app (e.g. > 100m users)?

Keeping with that non-tech use of the library and sticking with python*, I was also thinking recently that we could maybe build a website using a "modern" python web framework (e.g. fastapi) to offer csv2docx as a service? I have wanted to use fastapi for a while to compare its use with my experience with flask.

How I imagine such a website: drag your spreadsheet to the top left, the template to the bottom right, click convert and a zip file appears to the right for download. Although, why even have a server? Why can't our csv2docx library be transpiled to a JS library that does the conversion offline in the browser?

*By putting the library into practice we can refine it through real-world use 👍

davidverweij commented 4 years ago

For safekeeping, I found this gui wrapper for a click CLI, called quick. Very simple, and it doesn't handle prompts, but might be a first simple step for non-CLI users (although you would need to initiate the gui with something like

poetry run gui