Commit ef803682 authored by Jonas Smedegaard's avatar Jonas Smedegaard

Support options --infile --outfile --prefixfile, with arguments overriding options.

parent 2badbeca
......@@ -121,6 +121,18 @@ SPARQL
=over 16
=item B<--infile>
  • Is the idea to keep ARGUMENTS in inline POD, and all the other more conceptual documentation to docs/. I think that'd be fine, if there's a way to link from one to the other...

  • Quoting Vladimir Alexiev (2018-12-06 16:49:09)

    Vladimir Alexiev started a new discussion on bin/rdfpuml.pl:

    =over 16

    +=item B<--infile>

    Is the idea to keep ARGUMENTS in inline POD, and all the other more conceptual documentation to docs/. I think that'd be fine, if there's a way to link from one to the other...

    The idea right now is to include inline only enough for a decent user experience at runtime.

    Further down the road I will likely propose a shift to have all documentation inline, but other parts are more important now.

    • Jonas

    signature.asc

  • I agree to have all documentation inline, as soon as we can keep it whole after __END__ (Or almost whole, if those bits above need to be there, fine). And where to keep the doc images, so the HTML export works ok.

  • Quoting Vladimir Alexiev (2018-12-07 11:21:39)

    Vladimir Alexiev commented on a discussion on bin/rdfpuml.pl:

    =over 16

    +=item B<--infile>

    I agree to have all documentation inline, as soon as we can keep it whole after __END__ (Or almost whole, if those bits above need to be there, fine). And where to keep the doc images, so the HTML export works ok.

    Let's explore later how to best do full documentation.

    signature.asc

  • Quoting Vladimir Alexiev (2018-12-07 11:21:39)

    Vladimir Alexiev commented on a discussion on bin/rdfpuml.pl:

    =over 16

    +=item B<--infile>

    I agree to have all documentation inline, as soon as we can keep it whole after __END__ (Or almost whole, if those bits above need to be there, fine). And where to keep the doc images, so the HTML export works ok.

    Let's explore later how to best do full documentation.

    signature.asc

Please register or sign in to reply
Read from this Turtle file.
=item B<--outfile>
Write to this PlantUML file.
=item B<--prefixfile>
Read Turtle-ish prefixes from this file.
=item B<--help>
Print a brief help message and exits.
......@@ -151,14 +163,17 @@ with optional suffix F<.ttl> removed and suffix F<.puml> added.
=back
Arguments override options.
E.g. C<rdfpuml --infile foo.ttl bar.ttl> will only read F<bar.ttl>.
=cut
pod2usage("$0: Missing input filename.\n")
unless (@ARGV);
my $infile = path($ARGV[0]);
my $outfile = path( $ARGV[1] || $infile->basename('.ttl') . '.puml' );
my $prefixfile = $infile->sibling('prefixes.ttl');
my $infile = path( $ARGV[0] || $opt{infile} );
my $outfile = path( $ARGV[1] || $opt{outfile} || $infile->basename('.ttl') . '.puml' );
my $prefixfile = $opt{prefixfile} || $infile->sibling('prefixes.ttl');
my $prefixes = $prefixfile->exists ? $prefixfile->slurp_utf8 : "";
my $data = $infile->slurp_utf8;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment