Coder Social home page Coder Social logo

mxmlnbln / structogramview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nigjo/structogramview

0.0 0.0 0.0 323 KB

A browser based structogram (Nassi-Shneiderman diagram) viewer (and creator)

Home Page: https://nigjo.github.io/structogramview/

License: Apache License 2.0

JavaScript 66.34% CSS 25.21% HTML 8.45%

structogramview's Introduction

Structogram Editor

A browser based structogram (Nassi-Shneiderman diagram) viewer (and creator)

screenshot with source- structure- and diagram view

You can type the Psdeudocode "StuctCode" in the "Sourcecode" block. The diagram and the tree view will be updated directly.

  • The pseudecode is not desigend to be compilable.

  • One line per Diagram-Element

  • line-merging is not supported

  • Every Command has to be at the start of a line and

  • A Command must be upper-case.

  • Indentation is ignored.

  • "Comments" are prefixed by a hash symbol (#)

  • Multiple Comments are merged to a single Element.

Commands

Every Command has to be at the start of a line and upper-case. Indentation is ignored.

CAPTION:

can be used once on diagram level to add a diagram title.

IF:, ELSE:, ENDIF:

Create an if-else-Block. write your condition in the same line as the IF: command.

SELECT:, CASE:, DEFAULT:, ENDSELECT:

create a "multiple branching block". The SELECT: and every CASE: should have a "condition" defined. The visual representation is not DIN 66261 compliant.

FOR:, ENDFOR:

create an iteration. No assumption is made on the text of the condition.

LOOP:, ENDLOOP:

create a loop or iteration. A condition set on LOOP: will create a "test first loop" (iteration). A condition set on ENDLOOP: will create a "test last loop" (loop).

REPEAT:, ENDREPEAT:

Defines an endless loop block. An optional "condition" can be defined after REPEAT: or ENDREPEAT: to set a "checked loop".

CONCURRENT:, ENDCONCURRENT: and THREAD:

define parallel tasks All Sequences are treated as on task. If there are more than one sequence element for one task use THREAD: to define the start of the task. To start the next task use THREAD: again.

CALL:

a call to another routine/method/function.

BREAK:, EXIT: or RETURN:

a break from the current block or diagram.

Every line not starting with a Command is treated as a simple sequence.

Export to SVG

Under the diagram is a small ๐Ÿ“ฅ Icon which will allow you to download the diagram as SVG Image. The SVG Image should be close (99%) to what the browser will show to you.

Next to the download Icon are some options to store the source code and the "Source Structure Tree" together with the SVG. These data is stored as "metadata" inside the SVG file.

Beside of that you may use your browsers or OS' functions to take screenshots.

Show Structograms on any web page

To display a Structogram as HTML in any web page only to the two files structoview.js and structoview.css are needed. The JS will introduce the custom elements struct-* and the css does the visual part. It is up to you to create the valid ("XML"-)structure.

structogramview's People

Contributors

nigjo avatar

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.