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

create --inputDir and --outputDir for --transform #39

Open
petermr opened this issue May 8, 2016 · 3 comments
Open

create --inputDir and --outputDir for --transform #39

petermr opened this issue May 8, 2016 · 3 comments

Comments

@petermr
Copy link
Member

petermr commented May 8, 2016

These arguments would allow transformation of subdirectories (e.g. table/, image) which contain multiple files of the same type.

@petermr
Copy link
Member Author

petermr commented May 8, 2016

added to norma-dev in args.xml.

The transformation has been split into options transformDirectory() and transformSingleInput().

The transformation loops over all files of type myInputDir/plugh.foo and converts them to myOutputDir/plugh.bar.

The directory names are defaulted from the NormaTransformer.Type enum.
The file sufffixes are also defaulted from the enum.

We will wait for reaction and bugs before closing

@tarrow
Copy link
Contributor

tarrow commented May 9, 2016

I don't think you have committed your code. I couldn't see it either here or on your petermr fork.

I think I can see the use of this option but I'm not sure that adding yet another two options to our very long list is a good idea. For example having --inputDir is very similar to the CProject concept. Could the same effect not be achieved with file globbing?

Also, I'm hesitant (since I've not seen the code) as to what transformDirectory and transformSingleInput do. I think all the transforms should probably really be a "single input" and we should just run many of these to transform a whole directory.

I think having a table of what we can do and what the default input and output options are stored in an enum is probably a good idea but it does reduce the consistency considering all of the command line options are stored in args.xml.

@petermr
Copy link
Member Author

petermr commented May 9, 2016

Code compiles and doesn't test.
Tried to commit but problem with branches.
Happy to think about globbing - worried about inetraction with the shells (e.g. * metacharacters have to be escaped. Maybe this is OK
Note that --inputDir is actually subdirectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants