(c) 2018 Paulocarcy
P-Markup is a text markup language to generate simple interactive JavaScript&HTML5 files. The P-Markup program translates P-Markup text files into combined JavaScript&HTML5 files.
P-Markup is written in Python 3 using tkinter for its GUI. Therefore, you need Python 3 and the Python package tkinter in order to be able to run P-Markup.
All P-Markup text files must end with .txt. No non-markup files ending with .txt are allowed, as every file of the input folder is copied into the output_folder in order to preserve data which is linked in the P-Markup files.
In order to write a newline command in P-Markup, the character \ is used. Newlines written with RETURN are ignored.
All other P-Markup commands have the following structure:
[COMMAND arguments]
e.g.
[LINK path_to_link link_text]
->LINK creates a hyperlink to the given path_to_link and the text given in link_text.
The other P-Markup commands are:
[REM comment text]
-> Is ignored by P-Markup. It is used to explain markup files.
[IMG path]
-> Creates an image to the given apth.
[SET variable_name start_value]
-> Sets a global JavaScript variable with the given start value, which can be of any given type.
[INPUTNUMBER variable_name]
-> Creates an input field for a numeric variable (integer or float). Its start value is the variable's start value.
[INPUTSTRING variable_name]
-> Creates an input field for a string variable. Its start value is the variable's start value.
[SCRIPTBUTTON text script ]
-> Creates a button with the given text. In the string section, all created variables can be accessed. The script needs to return a value. This value will be the text ffor a text paragraph which is right behind the button.
You may also use any other simple HTML5 command using the following syntax:
[HTML5_COMMAND arguments]
e.g.
[H4 This is a text]
which will become
As you wrote your markup files, use the Python 3 module in ./submodules/p_markup.py or run the GUI in p_markup_GUI.py. The resulting HTML&JavaScript files will be created in the given output folder.
See ./Input_Example/markup.txt and ./Output_Example/markup.html as well as the associated ./Output_Example/index.html index file.
P-Markup is free and open-source. You can find its full license under ./LICENSE.