You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by GitBox <gi...@apache.org> on 2020/11/20 20:01:44 UTC

[GitHub] [any23] lewismc opened a new pull request #165: ANY23-458 Improve extractor and writer information in Rover

lewismc opened a new pull request #165:
URL: https://github.com/apache/any23/pull/165


   This PR addresses https://issues.apache.org/jira/browse/ANY23-458
   
   PR address the following improved info to STDOUT
   
   ```
       rover      Apache Any23 Command Line Tool.
         Usage: rover [options] input IRIs {<url>|<file>}+
           Options:
             -d, --defaultns
               Override the default namespace used to produce statements.
             -e, --extractors
               a comma-separated list of extractors, e.g. rdf-xml,rdf-turtle,
               etc. A complete extractor list can be obtained by calling ./any23
               extractor --list
               Default: [csv, html-embedded-jsonld, html-head-icbm, html-head-links, html-head-meta, html-head-title, html-mf-adr, html-mf-geo, html-mf-hcalendar, html-mf-hcard, html-mf-hlisting, html-mf-hrecipe, html-mf-hresume, html-mf-hreview, html-mf-hreview-aggregate, html-mf-license, html-mf-species, html-mf-xfn, html-microdata, html-rdfa11, html-xpath, ical, jcal, owl-functional, owl-manchester, rdf-jsonld, rdf-nq, rdf-nt, rdf-trix, rdf-turtle, rdf-xml, xcal, yaml]
             -f, --format
               a comma-separated list of writer factories, e.g.
               json,jsonld,nquads,notrivial,ntriples,trix,turtle,uri
               Default: [ntriples]
             -l, --log
               Produce log within a file.
             -n, --nesting
               Disable production of nesting triples.
               Default: false
             -t, --notrivial
               Filter trivial statements (e.g. CSS related ones). [DEPRECATED: As
               of version 2.3, use --format instead.]
               Default: false
             -o, --output
               Specify Output file (defaults to standard output)
               Default: java.io.PrintStream@2b2948e2
             -p, --pedantic
               Validate and fixes HTML content detecting commons issues.
               Default: false
             -s, --stats
               Print out extraction statistics.
               Default: false
   ``` 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [any23] HansBrende commented on a change in pull request #165: ANY23-458 Improve extractor and writer information in Rover

Posted by GitBox <gi...@apache.org>.
HansBrende commented on a change in pull request #165:
URL: https://github.com/apache/any23/pull/165#discussion_r528038021



##########
File path: cli/src/main/java/org/apache/any23/cli/Rover.java
##########
@@ -112,12 +117,16 @@ public String getIdentifier() {
     @Parameter(description = "input IRIs {<url>|<file>}+", converter = ArgumentToIRIConverter.class)
     protected List<String> inputIRIs = new LinkedList<>();
 
-    @Parameter(names = { "-e",
-            "--extractors" }, description = "a comma-separated list of extractors, e.g. rdf-xml,rdf-turtle")
-    private List<String> extractors = new LinkedList<>();
+    @Parameter(names = { "-e", "--extractors" }, description = "a comma-separated list of extractors, "
+            + "e.g. rdf-xml,rdf-turtle, etc. A complete extractor list can be obtained by calling ./any23 extractor --list")
+    private List<String> extractors = new LinkedList<String>() {
+        {
+            addAll(eRegistry.getAllNames());
+        }
+    };
 
     @Parameter(names = { "-f",
-            "--format" }, description = "a comma-separated list of writer factories, e.g. notrivial,nquads")
+            "--format" }, description = "a comma-separated list of writer factories, e.g. json,jsonld,nquads,notrivial,ntriples,trix,turtle,uri")

Review comment:
       @lewismc the --extractors improvement looks good, however the writer example won't work. The only reason `notrivial` can precede `nquads` is that `notrivial` is a delegating writer factory... i.e., it *pre-processes* the triples (to remove "trivial" triples) before passing them to the nquads writer.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [any23] lewismc merged pull request #165: ANY23-458 Improve extractor and writer information in Rover

Posted by GitBox <gi...@apache.org>.
lewismc merged pull request #165:
URL: https://github.com/apache/any23/pull/165


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [any23] HansBrende commented on a change in pull request #165: ANY23-458 Improve extractor and writer information in Rover

Posted by GitBox <gi...@apache.org>.
HansBrende commented on a change in pull request #165:
URL: https://github.com/apache/any23/pull/165#discussion_r528038021



##########
File path: cli/src/main/java/org/apache/any23/cli/Rover.java
##########
@@ -112,12 +117,16 @@ public String getIdentifier() {
     @Parameter(description = "input IRIs {<url>|<file>}+", converter = ArgumentToIRIConverter.class)
     protected List<String> inputIRIs = new LinkedList<>();
 
-    @Parameter(names = { "-e",
-            "--extractors" }, description = "a comma-separated list of extractors, e.g. rdf-xml,rdf-turtle")
-    private List<String> extractors = new LinkedList<>();
+    @Parameter(names = { "-e", "--extractors" }, description = "a comma-separated list of extractors, "
+            + "e.g. rdf-xml,rdf-turtle, etc. A complete extractor list can be obtained by calling ./any23 extractor --list")
+    private List<String> extractors = new LinkedList<String>() {
+        {
+            addAll(eRegistry.getAllNames());
+        }
+    };
 
     @Parameter(names = { "-f",
-            "--format" }, description = "a comma-separated list of writer factories, e.g. notrivial,nquads")
+            "--format" }, description = "a comma-separated list of writer factories, e.g. json,jsonld,nquads,notrivial,ntriples,trix,turtle,uri")

Review comment:
       @lewismc the --extractors improvement looks good, however the writer example won't work. The only reason `notrivial` can precede `nquads` is that `notrivial` is a delegating writer factory... i.e., it *pre-processes* the triples before passing them to the nquads writer factory.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [any23] HansBrende commented on a change in pull request #165: ANY23-458 Improve extractor and writer information in Rover

Posted by GitBox <gi...@apache.org>.
HansBrende commented on a change in pull request #165:
URL: https://github.com/apache/any23/pull/165#discussion_r528038021



##########
File path: cli/src/main/java/org/apache/any23/cli/Rover.java
##########
@@ -112,12 +117,16 @@ public String getIdentifier() {
     @Parameter(description = "input IRIs {<url>|<file>}+", converter = ArgumentToIRIConverter.class)
     protected List<String> inputIRIs = new LinkedList<>();
 
-    @Parameter(names = { "-e",
-            "--extractors" }, description = "a comma-separated list of extractors, e.g. rdf-xml,rdf-turtle")
-    private List<String> extractors = new LinkedList<>();
+    @Parameter(names = { "-e", "--extractors" }, description = "a comma-separated list of extractors, "
+            + "e.g. rdf-xml,rdf-turtle, etc. A complete extractor list can be obtained by calling ./any23 extractor --list")
+    private List<String> extractors = new LinkedList<String>() {
+        {
+            addAll(eRegistry.getAllNames());
+        }
+    };
 
     @Parameter(names = { "-f",
-            "--format" }, description = "a comma-separated list of writer factories, e.g. notrivial,nquads")
+            "--format" }, description = "a comma-separated list of writer factories, e.g. json,jsonld,nquads,notrivial,ntriples,trix,turtle,uri")

Review comment:
       @lewismc the --extractors improvement looks good, however the writer example won't work. The only reason `notrivial` can precede `nquads` is that `notrivial` is a delegating writer factory... i.e., it *pre-processes* the triples before passing them to the nquads writer.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [any23] HansBrende commented on a change in pull request #165: ANY23-458 Improve extractor and writer information in Rover

Posted by GitBox <gi...@apache.org>.
HansBrende commented on a change in pull request #165:
URL: https://github.com/apache/any23/pull/165#discussion_r528038268



##########
File path: cli/src/main/java/org/apache/any23/cli/Rover.java
##########
@@ -112,12 +117,16 @@ public String getIdentifier() {
     @Parameter(description = "input IRIs {<url>|<file>}+", converter = ArgumentToIRIConverter.class)
     protected List<String> inputIRIs = new LinkedList<>();
 
-    @Parameter(names = { "-e",
-            "--extractors" }, description = "a comma-separated list of extractors, e.g. rdf-xml,rdf-turtle")
-    private List<String> extractors = new LinkedList<>();
+    @Parameter(names = { "-e", "--extractors" }, description = "a comma-separated list of extractors, "
+            + "e.g. rdf-xml,rdf-turtle, etc. A complete extractor list can be obtained by calling ./any23 extractor --list")
+    private List<String> extractors = new LinkedList<String>() {
+        {
+            addAll(eRegistry.getAllNames());
+        }
+    };
 
     @Parameter(names = { "-f",
-            "--format" }, description = "a comma-separated list of writer factories, e.g. notrivial,nquads")
+            "--format" }, description = "a comma-separated list of writer factories, e.g. json,jsonld,nquads,notrivial,ntriples,trix,turtle,uri")

Review comment:
       (There is only 1 format, ultimately, that you write the output as, IIRC)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org