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

Adding support to define attribues using command line arguments #206

Closed
abelsromero opened this issue Feb 18, 2016 · 4 comments
Closed

Adding support to define attribues using command line arguments #206

abelsromero opened this issue Feb 18, 2016 · 4 comments

Comments

@abelsromero
Copy link
Member

As mentioned in #200 by @Mogztter, it would would be nice to be able to pass asciidoctor attributes using command line arguments like

mvn asciidoctor:process-asciidoc -Dasciidoctor.attributes="stylesheet=my-theme.css toc"

It is easy to implement, it only requires adding a new attribute and some maven anotations.

I have a working version https://github.com/abelsromero/asciidoctor-maven-plugin/blob/attributes_command/src/main/java/org/asciidoctor/maven/AsciidoctorMojo.java#L88-L89, and it works perfectly on all OS (Win, Lin, Mac). However, there is an open issue with the tests (https://issues.apache.org/jira/browse/MINVOKER-198).
To make things clear, only test fail, if I install the plugin in my local repo and use it, attributes can be passes as requested.

So, wdyt? Should we add it without an it-test for now?

@mojavelinux
Copy link
Member

I like it!

My only request is that we simplify the name. I'm not a fan of "attributesMap". First, it's not a map, so that's confusing. Second, it's too long. If we can't get "attributes" to work (using some Maven trickery), then perhaps we can just make it "attrs" or "attrlist". wdyt?

@abelsromero
Copy link
Member Author

Sure, the current implementation uses attributes in fact.
I updated the issue description to make it clear.

@mojavelinux
Copy link
Member

Super!!

abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Feb 20, 2016
abelsromero added a commit that referenced this issue Feb 21, 2016
fixes #206 - adds the option to set attributes through command line an…
@ggrossetie
Copy link
Member

This is great! Thanks @abelsromero, I will give it a try 👍

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

3 participants