ContentMine / tilburg

Extraction of data from Vector-based Funnel Plots in the scholarly literature
1 stars 1 forks source link

Typo: says `-outputDir` when should be `--outputDir` #4

Open ghost opened 7 years ago

ghost commented 7 years ago

This issue report is based on using this JAR.

Following the instructions at http://discuss.contentmine.org/t/extracting-data-from-tilburg-funnel-plot-diagrams/386/12 yields a "Must give output directory" error.

This appears to be due to the omission of a hyphen from the relevant argument name, i.e. http://discuss.contentmine.org/t/extracting-data-from-tilburg-funnel-plot-diagrams/386/12 says -outputDir when it should say --outputDir, so the fix should be as simple as for @petermr to amend that Discourse post.

$ wget https://github.com/petermr/norma/raw/8ceac7e933f96d5753d2e1d9656ddf398bd7407f/target/norma-0.5.0-SNAPSHOT-jar-with-dependencies.jar
$ git clone git@github.com:ContentMine/tilburg.git
$ cd tilburg
$ tree publicPapers
publicPapers
├── 10_1186_s13643-015-0004-8.pdf
├── 1749-8546-7-5-S2.pdf
├── 6400831a.pdf
├── copas.pdf
├── hetpub-compact.pdf
├── journal_club_-_spiegelhalter_stats_in_med_funnel_plots.pdf
├── papers.md
├── PHM_2011_9.pdf
├── Publication bias.pdf
├── pub_text.pdf
├── sjart_st0061.pdf
└── uk09_palmer_handouts.pdf

0 directories, 12 files
$ java -jar ../norma-0.5.0-SNAPSHOT-jar-with-dependencies.jar --project publicPapers  --fileFilter '.*/(.*).pdf' --makeProject '(\1)/fulltext.pdf'
$ tree publicPaperspublicPapers
├── 10_1186_s13643-015-0004-8
│   └── fulltext.pdf
├── 1749-8546-7-5-S2
│   └── fulltext.pdf
├── 6400831a
│   └── fulltext.pdf
├── copas
│   └── fulltext.pdf
├── hetpub-compact
│   └── fulltext.pdf
├── journal_club_-_spiegelhalter_stats_in_med_funnel_plots
│   └── fulltext.pdf
├── papers.md
├── PHM_2011_9
│   └── fulltext.pdf
├── Publication bias
│   └── fulltext.pdf
├── pub_text
│   └── fulltext.pdf
├── sjart_st0061
│   └── fulltext.pdf
└── uk09_palmer_handouts
    └── fulltext.pdf

11 directories, 12 files
$
$ # Great! This is expected behaviour, per
$ # https://discuss.contentmine.org/t/extracting-data-from-tilburg-funnel-plot-diagrams/386/12
$ # Unfortunately, the next command shown at that URL is not successful:
$
$ java -jar ../norma-0.5.0-SNAPSHOT-jar-with-dependencies.jar --project publicPapers  -i fulltext.pdf -outputDir publicPapers --transform pdf2svg
0    [main] ERROR org.xmlcml.cproject.args.DefaultArgProcessor  - Unknown arg: (-outputDir), trying to recover
2    [main] ERROR org.xmlcml.cproject.args.DefaultArgProcessor  - Parsing failed at: (publicPapers), expected "-" trying to recover
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
48   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/10_1186_s13643-015-0004-8/fulltext.pdf
.java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
51   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/1749-8546-7-5-S2/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
56   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/6400831a/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
61   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/PHM_2011_9/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
63   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/Publication bias/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
65   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/copas/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
76   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/hetpub-compact/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
78   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/journal_club_-_spiegelhalter_stats_in_med_funnel_plots/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
80   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/pub_text/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
82   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/sjart_st0061/fulltext.pdf
java.lang.RuntimeException: Must give output directory
    at org.xmlcml.norma.NormaTransformer.applyPDF2SVGToCurrentInputFile(NormaTransformer.java:527)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput0(NormaTransformer.java:404)
    at org.xmlcml.norma.NormaTransformer.transformSingleInput(NormaTransformer.java:355)
    at org.xmlcml.norma.NormaTransformer.transformSingleInputFile(NormaTransformer.java:228)
    at org.xmlcml.norma.NormaTransformer.runTransform(NormaTransformer.java:220)
    at org.xmlcml.norma.NormaArgProcessor.runTransform(NormaArgProcessor.java:251)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.xmlcml.cproject.args.DefaultArgProcessor.instantiateAndRunMethod(DefaultArgProcessor.java:1177)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runMethodsOfType(DefaultArgProcessor.java:1072)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runRunMethodsOnChosenArgOptions(DefaultArgProcessor.java:1053)
    at org.xmlcml.cproject.args.DefaultArgProcessor.runAndOutput(DefaultArgProcessor.java:1241)
    at org.xmlcml.norma.Norma.run(Norma.java:25)
    at org.xmlcml.norma.Norma.main(Norma.java:20)
84   [main] ERROR org.xmlcml.norma.NormaTransformer  - BAD TRANSFORM (Must give output directory) publicPapers/uk09_palmer_handouts/fulltext.pdf
petermr commented 7 years ago

Please emend the typo

ghost commented 7 years ago

@petermr wrote:

Please emend the typo

I would if I could, but http://discuss.contentmine.org does not currently allow me to edit your posts, sorry. Therefore re-opening this until the typo has been fixed.

More generally, if you would like me to be able to emend your posts, perhaps we should use the Tilburg wiki for the open notebook, instead of discuss.contentmine.org ? This would also make my workflow much simpler and faster :+1: