-
Notifications
You must be signed in to change notification settings - Fork 173
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
Added embedding UML diagrams and images in HTML #24
Comments
On Mon, Oct 29, 2012 at 5:43 AM, Tysen Moore [email protected] wrote:
Thanks, Tysen - this does seem like generally useful functionality. I
Why not simply put all images in a standard subdir of the output directory?
That seems clear. These tags do behave differently from the others,
Since these would probably apply for the whole project, I think that Interesting possibilties:
Let me think about this, but yes definitely this is something that steve d. |
Steve, Thanks for the feedback. Some comments:
I have forked so I can put up my changes. As I refine this I can check out on my branch. Keep me posted on your thoughts. |
Steve, I posted my code to my forked project. The following changes are:
|
Steve,
I have added a new set of features to the LDoc code and wanted to pass them on for integration assuming you find it as useful as I do. I have added the ability to embed images or generate UML diagrams and embed the image in the document.
The UML can be part of a LDoc section using the syntax from plantUml or various other text to UML parsers. I setup plantUml as the default. This allows the user to embed nice UML images in the generated documents by using simple text within you code comments. For example embedding a UML sequence diagram by using:
I have added the ability to alter some of the default capability by adding some JSON text after the "@startuml" tag. The options are:
-- This allows you to alter the UML generation engine and path for execution. You can specify a different path/executable for the UML parser. For example,
"exec":"/usr/bin/msvc %s"
NOTE: The "%s" is where the temp UML text will be placed (within a temp file). The default is "plantuml %s".
-- if true (no quotes), the @startuml and @enduml are removed, this makes it possible to support other UML parsers that do not use these tags. The default is false.
-- This defines a different file type that is generated by the UML parsers. The default is "png", but you can specify a "gif" (for example) if the UML parser generates a png.
Again, I have tested with plantUml but have hopefully left it flexible enough to use different UML parsers.
I also added the ability to embed images in your generated documents. To embed an image you add:
@embed_XXX{"/path/to/file.XXX"} XXX specifies the extension type. For example,
This will embed the base64 image in the document.
This does add a dependency to Lua sockets. However, if the module is not found it will just report the error.
I have tried to follow the original intent of the code. I preprocess the text prior to extracting tags. So there is no use for adding tags or anything. This way the original tag handling stays intact. I'd love to see this as part of the latest source code. Please let me know what you think.
Tysen Moore
Diff is:
The text was updated successfully, but these errors were encountered: