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

Add prefixes to output with --add-prefix and --add-prefixes #488

Merged
merged 5 commits into from
Jun 5, 2019

Conversation

beckyjackson
Copy link
Contributor

@beckyjackson beckyjackson commented May 24, 2019

See discussion in #457

@jamesaoverton -ap and -AP work fine but if you'd like me to remove them and have no short option, I can do that.

usage: robot [command] [options] <arguments>
 --add-prefix <arg>     add prefix 'foo: http://bar' to the output
 --add-prefixes <arg>   add JSON-LD prefixes to the output

The --add-prefix and --add-prefixes options allows you to specify prefix mappings in the same way as --prefix and --prefixes:

robot --noprefixes --add-prefix "foo: http://foo#" \
  export-prefixes --output results/foo.json

robot --noprefixes --add-prefixes foo.json \
  --add-prefix "bar: http://bar#" --add-prefix "baz: http://baz#" \
  export-prefixes

The difference is that the --prefix/--prefixes options do not include the new prefix in the header of the output ontology, whereas --add-prefix/--add-prefixes options do, for example in Turtle:

@prefix foo: <http://foo#> .

@jamesaoverton jamesaoverton merged commit 4d202cf into ontodev:master Jun 5, 2019
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.

None yet

2 participants