asciidoctor / asciidoctor-confluence

Push Asciidoctor file to Confluence
https://rubygems.org/gems/asciidoctor-confluence
MIT License
82 stars 28 forks source link

Using the --attribute option to specify paths for included files #12

Open mattadamson opened 8 years ago

mattadamson commented 8 years ago

I love this project however I'm trying to add a property to be used when the application parses ascii doctor files which contain the include directive with a specific value e.g. {generated} in the path. This is set when the script is called to point to a specify file path actually part of this project

https://github.com/Swagger2Markup/swagger2markup

I thought the --attribute was intended for this however if I specify in this way

--attribute generated="d:/files/generated"

I get an error unknown attribute --attribute although the help from -? indicates --attribute is an option for a key value pair.

I am using this correctly or is there a better way to replace this ascii doctor variable?

Many thanks

Kabhal commented 7 years ago

This is not explicit in the usage, but you have to use '--' between asciidoctor-confluence options and Asciidoctor options like this :

{noformat} asciidoctor-confluence --host HOST --spaceKey SPACE --title TITLE --username USER --password PASS -- --attribute generated="d:/files/generated" file.adoc {noformat}