ontology icon indicating copy to clipboard operation
ontology copied to clipboard

Export of exsting terms and definitions

Open carstenhoyerklick opened this issue 3 years ago • 10 comments

Description of the issue

I have been asked for a list of existing terms and defintions as list, e.g. in a pdf file.

Ideas of solution

I general it can be done with the export function of the robot library: http://robot.obolibrary.org/export. I will try to setup a unix script which can generate a nicly formatted list of terms based on the robot library.

Workflow checklist

  • [x ] I am aware of the workflow for this repository

carstenhoyerklick avatar Feb 10 '22 11:02 carstenhoyerklick

I gave the issue a proper title.

For documentation: We discussed today at the OEO DEV meeting, that it would be also nice, to produce such a file during the release process. On option would to be to export a list of IDs, labels (terms) and definitions to an markdown file that is then part of the repo.

l-emele avatar Feb 10 '22 13:02 l-emele

Once created, the list should be linked on the OEP @Ludee

stap-m avatar Feb 10 '22 13:02 stap-m

@markus-rothkoetter or @sfluegel05 : Are you familiar enough with ROBOT to create such a script for the release process?

l-emele avatar Jun 15 '22 13:06 l-emele

@l-emele It shouldn't be a problem from the ROBOT-side for me. Their HTML export is super. Also a conversion to e.g. PDF via pandoc is straightforward.

I haven't been part of a release-session, yet. So, concerning the exact integration into release-process I cannot comment (yet). Maybe I can simply attend the next release session.

Concerning time allocation I won't find time before the next release as I'm focusing on the script-stuff for #1154

markus-rothkoetter avatar Jun 15 '22 14:06 markus-rothkoetter

That is no problem. This is not a super urgent issue and and it is therefore not necessary to have such a script already for the next release. I thus moved the issue to the release milestone 1.12.0.

The last state of discussion was that the script should produce a markdown file and not HTML or a PDF file, see my comment above.

Maybe @mglauer can give some advice in how to best include such a script in the release process?

l-emele avatar Jun 15 '22 14:06 l-emele

@l-emele Perfect, thanks for the clarification concerning the timeline. Then I'll take care of it.

Conversion to Markdown will definitely require e.g. pandoc for conversion as there is no native Markdown export from ROBOT, afaik, but this won't be a problem, I think.

markus-rothkoetter avatar Jun 15 '22 14:06 markus-rothkoetter

Unassigning myself, as @stage1407 has taken over this issue.

markus-rothkoetter avatar Aug 30 '22 11:08 markus-rothkoetter

There is a little problem, because the definitions contain symbols like ',' and '\t', so .csv and .tsv are not suitable for this problem. I will look for a better solution in the next days. Nevertheless, the current version of the script is already available under the respective feature branch.

stage1407 avatar Sep 02 '22 21:09 stage1407

You can quote fields in double quotes in CSV

The row

"A,B"," C"

Contains two fields.

MGlauer avatar Sep 03 '22 06:09 MGlauer

I tried this now and found out that it was not because of that, but because of how the export command in ROBOT handles line breaks. For example, in line 11,12 of src/ontology/edits/oeo-social.omn, ROBOT reads a definition that contains '\n' and does not process it as the contents of the definition when converting to a .csv file. This causes another part of the definition to be written to a new line of the .csv, breaking the format. I could try other file formats. But if they are coded and serialized the same by ROBOT, then I could still try owlready2 or we reconsider using new lines in definitions.

stage1407 avatar Sep 03 '22 20:09 stage1407

The associated pull request #1319 was merged. Is there a reason why this issue is still open.

l-emele avatar Jan 26 '23 13:01 l-emele

I don't think so

areleu avatar Jan 26 '23 13:01 areleu