pinetr2e / napkin

Python as DSL for writing PlantUML sequence diagrams
MIT License
195 stars 10 forks source link

Simple Style Incorporation #14

Closed nathanvercaemert closed 3 years ago

nathanvercaemert commented 3 years ago

Maybe I'm just missing something simple, but I can't find a way to include basic changes to the styles. I'm talking about something like:

skinparam monochrome true

at the top of the puml output under @startuml. Does it already exist? Cool program by the way!

pinetr2e commented 3 years ago

At the moment, there is no such customization point. It will be useful to add some "hook". For example, it can be a simple command line option to specify the file or string to prepend right after @startuml.

Please feel free to implement it.

nathanvercaemert commented 3 years ago

I'm on it. I'm going to call it "--global-style" (unless you specify otherwise) with the idea that someday I'll get around to implementing styles with smaller scope as well.

pinetr2e commented 3 years ago

With version 0.6.9, a new command line option '--raw-header-file' or '-H' was added to specify file containing text to prepend right after @startuml.

A new interface, c.raw_header() can be also used from script level. Please check https://github.com/pinetr2e/napkin/blob/master/DEMO_EXAMPLES.md#raw-header

Thanks for raising the issue.