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

Add customizable Jinja context configuration option #95

Open
bkryza opened this issue Feb 8, 2023 · 0 comments
Open

Add customizable Jinja context configuration option #95

bkryza opened this issue Feb 8, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@bkryza
Copy link
Owner

bkryza commented Feb 8, 2023

For configuration files with large number of diagrams which rely on Jinja templates, it would be useful to add context option to the inheritable config option set, which would enable for instance the following use case:

...
context:
  author: bkryza
  copyright: Copyright (C) 2023
  my_condition_1: true
...
diagrams:
  my_class_diagram:
    type: class
    ...
    plantuml:
      after:
        - >
          note left of {{ alias("ClassA") }}
             {{ author }} {{ copyright }}
          end note
        - >
          {% if my_condition_1 %}
          note left of {{ alias("ClassB") }}
             {{ author }} {{ copyright }}
          end note
          {% endif %}

There should be also a command line option to override/add any context variable, e.g.:

clang-uml -n my_class_diagram --context "my_condition_1: false"
@bkryza bkryza added the enhancement New feature or request label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant