-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
This issue report is based on using this JAR.
Suppose I have a source directory with some input PDFs:
$ tree
.
└── input
├── a.pdf
└── b.pdf
1 directory, 2 files
and I want to generate a CProject called "output" from that source directory, to end up with:
$ tree
.
├── input
│ ├── a.pdf
│ └── b.pdf
└── output
├── a
│ └── fulltext.pdf
└── b
└── fulltext.pdf
4 directories, 4 files
I would expect the following command to achieve it:
java -jar ~/.local/bin/norma-0.5.0-SNAPSHOT-jar-with-dependencies.jar --project input --fileFilter '.*/(.*).pdf' --makeProject '../output/(\1)/fulltext.pdf'
However, this instead gives:
$ tree
.
├── input
├── output
│ ├── a
│ │ └── fulltext.pdf
│ └── b
│ └── fulltext.pdf
└── target
└── log.xml
5 directories, 3 files
The deletion of the source directory's contents certainly violates the principle of least surprise.
According to a conversation I had with @petermr just now, this is a known issue. His workaround, which feels cumbersome to me, is to cp -a the source directory to the target directory, and then to invoke norma on the target directory alone:
java -jar ~/.local/bin/norma-0.5.0-SNAPSHOT-jar-with-dependencies.jar --project output --fileFilter '.*/(.*).pdf' --makeProject '(\1)/fulltext.pdf'