mikitex70 / plantuml-markdown

PlantUML plugin for Python-Markdown
BSD 2-Clause "Simplified" License
196 stars 55 forks source link

config: missing parameter for include path #37

Closed christo-ph closed 4 years ago

christo-ph commented 4 years ago

I cannot find the plantuml.include.path parameter with this plugin.

Found here: https://forum.plantuml.net/1553/how-to-pass-a-search-path-for-include-files

Example call: java -Dplantuml.include.path="c:/mydir" -jar plantuml.jar atest1.txt

mikitex70 commented 4 years ago

I'm not sure to add a new configuration option to the plantuml_markdown extension is a good idea. First, added one option someone can ask for adding other options, which maybe very specific. Second, there are workarounds:

  1. modify the plantuml script (see README.md) which is called by this plugin adding the required options (-Dplantuml.include.path=some/custom/path in this case), or the use of an environment variable
  2. exporting the variable _JAVA_OPTIONS with the required options before running markdown_py:
    • export _JAVA_OPTIONS='-Dplantuml.include.path=some/custom/path' in Linux
    • set _JAVA_OPTIONS=-Dplantuml.include.path=C:/some/custom/path for Windows

With both methods would be easy add any custom option, such memory tuning.

If there is some specific use case for which an extension configuration option may be better let me known, I would implement it.

mikitex70 commented 4 years ago

Closing this issue as seems the workaround can be useful. I cannot inject Java properties through the plugin as it would break compatibility with the plantuml system command. Thanks for reporting this issue, it may be useful to others.