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

document attributes from the command line? #484

Closed
gdamore opened this issue Jan 23, 2020 · 5 comments · Fixed by #495
Closed

document attributes from the command line? #484

gdamore opened this issue Jan 23, 2020 · 5 comments · Fixed by #495
Assignees
Milestone

Comments

@gdamore
Copy link
Collaborator

gdamore commented Jan 23, 2020

I sometimes want to supply different attributes on the same document, depending on whether I'm rendering for print or for online use. Therefore it's somewhat inconvenient to require that attributes only appear inline.

With the command line tool, I'd like to be able to e.g. supply "-aicons=font" to enable font icons.

@xcoulon xcoulon self-assigned this Jan 25, 2020
@xcoulon xcoulon added this to the v0.3.0 milestone Jan 25, 2020
@xcoulon
Copy link
Member

xcoulon commented Jan 25, 2020

thanks for opening this issue @gdamore, I will work on it.

@gdamore
Copy link
Collaborator Author

gdamore commented Mar 1, 2020

I can probably put together a PR that at least provides an option for this so that it can be used with ConvertToHTML. This would allow me to use it in my own Go code, which would get about 95% of the way to what I need. But if you're already working on it, I'll wait.

@xcoulon
Copy link
Member

xcoulon commented Mar 3, 2020

thanks for the proposal but yes I've started working on it, but I'm not fully done yet. Hopefully soon ;)

xcoulon added a commit to xcoulon/libasciidoc that referenced this issue Mar 7, 2020
API break: using a new 'configuration.Configuration' parameter to wrap
all the settings at the `libasciidoc.ConvertToHTML`
level

Fixes bytesparadise#484

Signed-off-by: Xavier Coulon <[email protected]>
xcoulon added a commit that referenced this issue Mar 7, 2020
API break: using a new 'configuration.Configuration' parameter to wrap
all the settings at the `libasciidoc.ConvertToHTML`
level

Fixes #484

Signed-off-by: Xavier Coulon <[email protected]>
@xcoulon
Copy link
Member

xcoulon commented Mar 7, 2020

@gdamore it should work now, including the -a!foo syntax to unset the foo attribute in the document. Could you give it a try and let me know if it works for you, please?

Note that the API changed (in case you also embed the library in one of your Go projects): https://github.com/bytesparadise/libasciidoc/pull/495/files#diff-4f72c4c2b08ab8542e4a8babeb3ac735

@gdamore
Copy link
Collaborator Author

gdamore commented Mar 7, 2020

Thanks I will give it a shot.

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

Successfully merging a pull request may close this issue.

2 participants