Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odML to RDF export script #298

Merged
merged 6 commits into from
Aug 22, 2018
Merged

Conversation

mpsonntag
Copy link
Contributor

This PR adds a convenience command line script to the odML package, that searches through a given directory, converts all found odML files to the latest version and exports all odML files to the RDF format. The conversion is focused on converting as many files as possible in mixed repositories, which possibly contain unrelated XML, JSON or YAML or invalid odML files. Therefore all exceptions are ignored, the tool simply prints a report at the end of the conversion to inform about successes and failures.

After pip install, the script can be called by typing odmlexportrdf [-r] [-o OUT] SEARCHDIR with the arguments:

Arguments:
    SEARCHDIR       Directory to search for odML files.

Options:
    -o OUT          Output directory. Must exist if specified.
                    If not specified, output files will be
                    written to the current directory.
    -r              Search recursively.

The PR also updates the version to 1.4.1 to prepare for a release containing the latest RDF changes.

@coveralls
Copy link

coveralls commented Aug 21, 2018

Coverage Status

Coverage decreased (-2.2%) to 79.545% when pulling a4a2c67 on mpsonntag:rdfExpScript into 8d455d1 on G-Node:master.

Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to have two scripts, or maybe subcommands of the same script, one for updating to newest ver and one for converting? Do we already have an upgrade script?

I also don't know if I like the name of the command. odmlexportrdf while descriptive doesn't quite sound like a nice command. Why not something like odml2rdf (in the style of dos2unix) or odmltordf (like pdftotext)?

Copy link
Member

@jgrewe jgrewe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Similar to @achilleas-k's comment I find the name a little bit cumbersome. odml2rdf or odmltordf are equally good, imho.

@mpsonntag
Copy link
Contributor Author

pyyaml keeps failing on us...

@achilleas-k achilleas-k merged commit 628f4f1 into G-Node:master Aug 22, 2018
@mpsonntag mpsonntag deleted the rdfExpScript branch August 22, 2018 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants