An open API service indexing awesome lists of open source software.

https://github.com/yveszoundi/archi-humaneimage

Archi "humane image" scripts
https://github.com/yveszoundi/archi-humaneimage

archimate archimatetool java javascript

Last synced: about 2 months ago
JSON representation

Archi "humane image" scripts

Awesome Lists containing this project

README

          

#+TITLE: README

* What is this?

This is a set of [[https://www.archimatetool.com/][Archi]] scripts for generating =simple humane images= from [[https://en.wikipedia.org/wiki/ArchiMate][Archimate]] diagrams:
- Design with the Archimate modelling language notation
- Share diagrams containing just =lines and rectangles= (no special figures)

[[./images/to_humane_image_scaled.png]]

/*This is not meant to export Archimate free-drawing views (Canvas or Sketch diagrams).*/

* Requirements

- Archi 4.9.x or later
- The latest version of [[https://www.archimatetool.com/plugins/#jArchi][jArchi]] compatible with Archi 4.9.x or later
- The [[https://www.graalvm.org/][GraalVM]] JavaScript engine selected in =Archi= preferences (=Scripting > JavaScript Engine=)
- This is not required for recent versions of =Archi=, as =GraalVM= is now the default JavaScript engine
- Please note that supporting =Java= code is loaded by =Archi= scripts

* How to use it?

Please clone this repository under your jArchi scripts folder (=Preferences >Scriting > Scripts folder:=): if you still don't understand the procedure, please visit the [[https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Quick-Start][jArchi wiki]] or [[https://forum.archimatetool.com/index.php?board=5.0][forum]].

You can then right-click on any diagram in Archi and explore available scripts (=Scripts > humaneimage=).

* How does it work?

** PNG export

There's just a little bit of custom drawing happening with few hooks into Java, instead of "pure JavaScript".

[[./images/humane_image_process.png]]

** PowerPoint export

This generates PowerPoint shapes and the deck can be changed easily by non-technical users (accordingly to the audience and message to convey).

[[./images/to_ppt.jpg]]

** Scripts description

The main library is under =lib/humaneimage.lib.js= and the scripts under the =humageimage= folder are just interfaces to it.

|---------------------------------------------------+------------------------------------------------|
| Script | Description |
|---------------------------------------------------+------------------------------------------------|
| =ExportAllViewsToHumaneImages.ajs= | Export all model diagrams to =humane images= |
| =ExportCurrentViewToHumaneImage_Cfg_Default.ajs= | Export the current diagram to a =humane image= |
| =ExportCurrentViewToHumaneImage_Cfg_Override.ajs= | Same as the above with options dialog |
| =ExportCurrentViewToPowerPoint.ajs= | Export a view to PowerPoint (=pptx= format) |
| =ExportToHumaneImageModel.ajs= | Export a view model for custom processing |
|---------------------------------------------------+------------------------------------------------|

* Contributing

The best way to contribute is via a pull request.

* Notes

I did not write the whole functionality from scratch:
- [[https://github.com/yveszoundi/edraw2d][edraw2d.lib.jar]] is a utility class with a *subset* of [[https://github.com/eclipse/gef-legacy/tree/master/org.eclipse.draw2d][Eclipse draw2d classes]] (no [[https://www.eclipse.org/swt/][SWT]] dependencies)
- [[https://github.com/yveszoundi/svg2png][svgtopng.lib.jar]] is a utility class with bundled [[https://xmlgraphics.apache.org/batik/][Apache Batik]] dependencies
- =archi2ppt.lib.jar= is a utility class leveraging Apache POI to generate PowerPoint files