MugilanGN / Flowchart-Generator

Automatically creates Flowcharts from IGCSE Pseudocode!
Apache License 2.0
64 stars 71 forks source link
flowchart flowchart-generator igcse pseudocode python

Flowchart-Generator

Automatically creates Flowcharts from Pseudocode!

Video Demo

https://www.youtube.com/watch?v=1gCqPBzU8Z0

Installing through Repl.it

If you don't want to download this or setup python, you can run this project directly from your browser with repl.it

This link will automatically clone the project and set it up for you. If you want to do it manually, you can import github.com/MugilanGN/Flowchart-Generator into repl.it yourself.

From here onwards, you can edit the enter.txt file in the repl project and replace it with your own custom pseudocode.

Once you are done, you can run the commands from the CLI Usage section of the README in the repl.it terminal.

Local Installation

This project was built on Python 3.7.4

Run this to install the necessary dependencies:

pip install Pillow==9.0.0 click

Next, clone this project onto your system.

Writing the Pseudocode

The Pseudocode is entered into a .txt file. It follows strict rules which must be obeyed

alt text

Rules

STOP and START are automatically input by the program, so do not need to be added

Indents don't affect the program, so nothing has to be indented, and incorrect indentation is allowed

The capitalization of the keywords is extremely important. If an error occurs, double check if you have capitalized the keywords like "TO" and "FOR" properly

ELSE IF is not available, but nested IFs are possible

The ENDIF, NEXT var, and ENDWHILE blocks are mandatory

Syntax Guide

Input and Output:

CLI usage

To run the code, simply execute the following command:

python Converter.py

Arguments

Arguments in the CLI are typed like so: --size=20 or --code="enter.txt"

Flowchart Image

This image contains the created flowchart which can be shared, printed, etc. Its size varies exactly on the size of the flowchart created, so it may even hit a resolution of 10k pixels! However if the generated flowchart is too big, then the image will be unopenable due to being too large. The user should be careful with flowchart sizes.

Support

If you are having issues, please let me know. You can contact me at mugi.ganesan@gmail.com