Giter Club home page Giter Club logo

archi-humaneimage's Introduction

README

What is this?

This is a set of Archi scripts for generating simple humane images from 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 jArchi compatible with Archi 4.9.x or later
  • The 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 jArchi wiki or 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.

ScriptDescription
ExportAllViewsToHumaneImages.ajsExport all model diagrams to humane images
ExportCurrentViewToHumaneImage_Cfg_Default.ajsExport the current diagram to a humane image
ExportCurrentViewToHumaneImage_Cfg_Override.ajsSame as the above with options dialog
ExportCurrentViewToPowerPoint.ajsExport a view to PowerPoint (pptx format)
ExportToHumaneImageModel.ajsExport 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:

archi-humaneimage's People

Contributors

yveszoundi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

archi-humaneimage's Issues

Streamline usage of humaneimage-model.lib.js

Background

  • Initially the set of "humaneimage" scripts only supported images (PNG/SVG) export.
  • Now there's also an export function to PowerPoint (pptx format), to allow non technical people to reuse/modify easily diagrams. The code of humaneimage-model.lib.js is used for PowerPoint export, it's based on humaneimage.lib.js.

Problem

humageimage-model.lib.js and humageimage.lib.js need to be kept in sync, which creates maintenance issues.

Proposed solution

Reuse humaneimage-model-lib.js for exporting images, instead of redundant logic.

  • "Crawl" the "model" to populate the SVG string
  • If PNG export was requested, convert the SVG to PNG

Support readwrite access relationships

Problem

As of now, we can only draw relationships for "read" or "write" access to "Data Object" or "Business Object" elements.

"Application Component" <--> "Data Object"

gets translated wrongly (Missing arrow pointing towards source node: "Application Component")

"Application Component" --> "Data Object"

Potential solution

Find better way to draw start/end arrows, and calculate appropriately arrow angles/directions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.