engyon / enprot

enprot command line tool for Engyon
1 stars 1 forks source link

Improve multi-file processing #18

Open dewyatt opened 4 years ago

dewyatt commented 4 years ago

Current method (from the README)

enprot$ ./target/debug/enprot -p output/ file.*

Will read files file.1, file.2, etc and write them into directory output (if it exists). However

enprot$ ./target/debug/enprot -p output file.*

Will produce files outputfile.1, outputfile.2, etc.

Issues

This is inconvenient when your input paths consist of more than just a filename.

enprot -p outputdir/ inputdir/*.ept
Failed to open outputdir/inputdir/test.ept for writing: No such file or directory (os error 2)

This would require the outputdir to share a similar directory structure to the inputdir.

Similarly, a full path would be an issue:

cargo run -- -p outputdir/ $PWD/inputdir/*
Failed to open outputdir//home/daniel/enprot/inputdir/test.ept for writing: No such file or directory (os error 2)