On 11 November 2017 at 21:32, Pablo Rodriguez wrote:
> On 11/11/2017 08:01 PM, Mojca Miklavec wrote:
>> On 8 November 2017 at 20:46, Pablo Rodriguez wrote:
>>> [...]
>>> It can handle different .csv files to data merging for document
>>> automatic generation.
>>
>> It would be helpful to figure out what exactly is missing in the
>> built-in module written by Hans. Maybe that module could be upgraded
>> as well?
>
> If the module is
> tex/texmf-context/tex/context/modules/mkiv/m-database.mkiv, I think this
> is only intended for typesetting the database contents.

Well, it parses CSV files and typesets them in an arbitrary way.

> handlecsv enables document merging. With the first (stupid) sample that
> comes to my mind:
>
>     \starttext
>     \startbuffer
>     \Name\ has completed the course {\em\Course}, achieving the
>     following grade: \Grade.\page
>     \stopbuffer
>     \doloopforall{\getbuffer}
>     \stoptext

Which is exactly what the other module supports. See page 4 of
    http://dl.contextgarden.net/myway/csv.pdf

> Having to do that with before and after options would be a pain (in my
> opinion).
>
> You may page through
> https://github.com/ousia/handlecsv/blob/context-suite/doc/context/third/handlecsv/handlecsv.pdf
> to see the features.

The old module doesn't support invoking columns by title and doesn't
do any special filters. Another limitation might be that it uses #1,
#2, ... which reaches it limits pretty soon, but I'm sure that could
(should?) be fixed anyway.

And certainly the documentation by Jaroslav is much much better
written than my poor mock-up.

> I wonder whether it makes sense to extend the built-in module by Hans.
> If this wasn’t needed before, it may be not needed now.

This is an oxymoron. If the functionality is not needed: then why do
we need that new module in the first place? :)

What I want to encourage is one well-written and fully functional
module rather than ending up with ten solution, each one of them with
its own set of bugs. The MKII version of the database module
admittedly has a number of issues, in particular when it comes to
non-ascii. There might be issues with MKIV as well, I haven't used it
for a while because I now usually start with lua tables. But all in
all it would be much better to have some "perfectly working" built-in
functionality to parse CSV files in my opinion.

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to