proycon / foliatools

A number of command-line tools for working with FoLiA (Format for Linguistic Annotation). Includes validators, converters, visualisers, and more.
GNU General Public License v3.0
10 stars 4 forks source link

tei2folia: Adding a value to -i parameter #56

Closed martinreynaert closed 6 months ago

martinreynaert commented 6 months ago

Hi proycon,

With Ucto, I use the parameter '--id' to which I give as value the relevant part of the file name. This then becomes the first part of the ID of each xml element. If --id is not specified, this by default becomes 'undefined'.

I tried the same in what seemed the similar parameter in tei2folia, i.e. '-i'. Adding a parameter there, breaks it. The help function gives: '-i, --ids Generate IDs for all structural elements (default: False)'. This is unclear and as a consequence I have no idea how it works. When I use it without a value, the result is that element IDs start with 'undefined'. This feature does not seem to be further documented anywhere else either.

I would very much like tei2folia to also have the same functionality in this as Ucto has. Can this be implemented, please?

Thank you!

proycon commented 6 months ago

The --ids parameter indeed does not do what you want, I now introduced a new --docid parameter with which you can set the document identifier (you can still use it in combination with --ids to force IDs for other structural items).

proycon commented 6 months ago

Released now in v2.5.6