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

Cannot generate CProject without deleting source directory contents? #68

Open
ghost opened this issue Jun 15, 2017 · 2 comments
Open

Cannot generate CProject without deleting source directory contents? #68

ghost opened this issue Jun 15, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 15, 2017

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'
@petermr
Copy link
Member

petermr commented Jun 15, 2017

The client is used to the current interface and does not require any change. Pleaes document the system as it is rather than as you would like it to be

@petermr petermr closed this as completed Jun 15, 2017
@ghost
Copy link
Author

ghost commented Jun 15, 2017

@petermr wrote:

The client is used to the current interface and does not require any change.

Straw man 😞

This is a norma issue. I have not at any point stated that it is specific to any particular ContentMine client.

Pleaes document the system as it is rather than as you would like it to be

That is not how bug reports or feature requests work 😉

@ghost ghost reopened this Jun 15, 2017
@ghost ghost added the enhancement label Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant