GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - andreaval/FlowgorithmJS: *.fprg file viewer for the Web

BranchesTags
Open more actions menu

Latest commit

 

History

57 Commits
57 Commits

Folders and files

NameName
Last commit message
Last commit date
fprg
fprg
 
 
img
img
 
 
lib
lib
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
_config.yml
_config.yml
 
 
allElements.html
allElements.html
 
 
drawLocal.html
drawLocal.html
 
 
drawWeb.html
drawWeb.html
 
 
flowgorithm.js
flowgorithm.js
 
 
flowgorithm_0.js
flowgorithm_0.js
 
 
sourceEditor.html
sourceEditor.html
 
 
todo.md
todo.md
 
 

Repository files navigation

FlowgorithmJS

Flowgorithm is an excellent software for drawing flowcharts. To save the data, it use an XML format stored in files with the .fprg extension.

FlowgorithmJS is a third-party tool written in Javascript that can read and display the .fprg files on a web page using SVG format.

All elements supported by FlowgorithmJS (version 0.16) and their design:

Elements 0.16

(Image generated by the following file: fprg/_elements.fprg )

Include library

<script src="lib/jquery-3.5.0.min.js"></script>
<script src="flowgorithm.js"></script>

Using

drawFlowchartFromSource(xmlString,tagId,options);

or

drawFlowchartFromUrl(fprgUrl,tagId,options);

Example 1

http://domain/file.fprg

<?xml version="1.0"?>
<flowgorithm fileversion="2.11">
  <attributes>
    <attribute name="name" value="Next number"/>
    <attribute name="authors" value="Andrea Vallorani"/>
    <attribute name="about" value="Print the next of a given number"/>
    <attribute name="saved" value="2018-01-23 06:36:28 PM"/>
    <attribute name="created" value="YW5kcmVhO3VidW50dTsyMDE4LTAxLTIzOzA1OjMxOjMxIFBNOzI1Njg="/>
    <attribute name="edited" value="YW5kcmVhO3VidW50dTsyMDE4LTAxLTIzOzA2OjM2OjI4IFBNOzQ7MjY5MQ=="/>
  </attributes>
  <function name="Main" type="None" variable="">
    <parameters/>
    <body>
      <declare name="N, NEXT" type="Integer" array="False" size=""/>
      <input variable="N"/>
      <assign variable="NEXT" expression="N+1"/>
      <output expression="NEXT"/>
    </body>
  </function>
</flowgorithm>

http://domain/home.html

<!DOCTYPE html>
<html>
<head>
  <script src="lib/jquery-3.5.0.min.js"></script>
  <script src="flowgorithm.js"></script>
  <script>
    $(function(){
      drawFlowchartFromUrl('http://domain/file.fprg','#f');
    });
  </script>
</head>
<body>
    <div id="f"></div>
</body>
</html>

Example 2

<!DOCTYPE html>
<html>
<head>
  <script src="lib/jquery-3.5.0.min.js"></script>
  <script src="flowgorithm.js"></script>
  <script>
    var xml = `<?xml version="1.0"?>
    <flowgorithm fileversion="2.6">
      <attributes>
        <attribute name="name" value="Next number"/>
        <attribute name="authors" value="Andrea Vallorani"/>
        <attribute name="about" value="Print the next of a given number"/>
      </attributes>
      <function name="Main" type="None" variable="">
        <parameters/>
        <body>
          <declare name="N, NEXT" type="Integer" array="False" size=""/>
          <input variable="N"/>
          <assign variable="NEXT" expression="N+1"/>
          <output expression="NEXT"/>
        </body>
      </function>
    </flowgorithm>`;
    $(function(){
      drawFlowchartFromSource(xml,'#f');
    });
  </script>
</head>
<body>
    <div id="f"></div>
</body>
</html>

Demo

  • View file from local computer: https://andreaval.github.io/FlowgorithmJS/drawLocal.html
  • View file from online folder: https://andreaval.github.io/FlowgorithmJS/drawWeb.html

About

*.fprg file viewer for the Web

andreaval.github.io/FlowgorithmJS

Topics

algorithmscodeflowgorithmjs

Resources

Readme
GPL-3.0 license
Activity

Stars

19 stars

Watchers

1 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.