-
Notifications
You must be signed in to change notification settings - Fork 12
Diagram selection based on name instead of index. #8
Comments
I'd like to add that currently there seems to be no way to get the number of pages in the diagram or to traverse over them. It would be very nice to have this feature as well as it facilitates automatic flows e.g. in documentation generation. |
@xnorme This could be done with a small XSLT script like this:
Save this as, e.g., For example, on linux, with the diagram from #9 (comment)
You get:
|
drawio-batch, so far, was never intended for multi page documents and complex workflows. For my own needs I never use multi-page documents and the current selection is a contribution I received. I am not sure whether I want to provide document inspection, which would require a completely different workflow with multiple calls to drawio-batch and a mode that only outputs page information. However, selection based on page name and an optional mode to output multiple (or all) pages of a document sounds reasonable. |
Thank you @NicolasRouquette, that works like a charm! |
@xnorme FYI: I was testing this fix #9 (comment) and found that the index changed from 1-based to 0-based. |
That might be an upstream change. I didn't do anything in that direction. |
The current
-d <index>
argument parses an integer diagram index.It isn't explained but the index starts from 1; which corresponds to the index of the diagram page in the UI.
I think it would be useful to have a diagram selection based on the diagram page name.
The text was updated successfully, but these errors were encountered: