FeedTheCube / CogDoc

0 stars 0 forks source link

What media types should we consider for scope? #3

Open hyndgrinder opened 6 years ago

hyndgrinder commented 6 years ago

@SinclairC looking for recommendations on a suitable library for displaying the results of the Documenter. My thought is that it would make sense to use HTML output to start. So, maybe Flask is a good library for that? Later, we could add the users option to choose other types like pdf, xlsx (is there a reason to use xls as well/instead of xlsx?). I don't think it makes much sense to consider XML, since that's what the source files are already. The point of this program in it's infancy is to simplify the report's XML hierarchy to make it as human-readable as possible.

SinclairC commented 6 years ago

For xlsx, xlsxwriter looks promising (http://xlsxwriter.readthedocs.io/). Is there any benefit to that over just making a csv file?

Anyway, HTML or csv might be a good starting point. I generally write my own code (I find that most libraries are overkill for my needs and just end up using more memory and power for no reason), so I've never used Flask. With something like this, there's not much reason for a library in my opinion. You can pretty easily output HTML just by writing lines of text to a file. We could write any necessary JavaScript functions separately and refer to them for things like possibly shrinking/expanding parts of the hierarchy.

hyndgrinder commented 6 years ago

Flask is a lightweight library to produce a model/view/controller type framework. I think it worth considering, though I do like the idea of a hard file being produced. I'm not sure if that's a viable expectation with flask. I'll think about that some more...

Please do have a look at flask, though; I like it because it's simple. But if you're still convinced it's better to build ourselves, we'll go from there.

SinclairC commented 6 years ago

Wasn't sure where to comment, since the other issue is closed now. Yes, I think the HTML export I started work on seems like the initial step. If we do want to export to something like CSV later, that's comparably quite simple so we could add that easily later on using the JSON output of the objects.