/HTML-Custom-Markup-Interpreter

Simple interpreter to translate a custom markup script into HTML code for blog posts

Primary LanguagePythonMIT LicenseMIT

HTML-Custom-Markup-Interpreter

Simple interpreter to translate a custom markup script into HTML code for a blog post

Installation

  1. Download the files for the project.
  2. Install required dependencies (ideally within a virtual environment - Tutorial).
  3. Create a stylesheet for your end-page and install prism.js (for code blocks). Place these within your project directory and (if necessary) modify the prefix string to reference the correct file path.
  4. (Optional) Install Notepad++ and import the .udl file file provided for custom syntax highlighting.

Usage

Import the .udl file as a custom language in Notepad++ (Language > User Defined Language > Define your language > Import).

Try opening the sample template included within the project files. Your window should look something like this (you might have to change your Notepad theme to Monokai with Settings > Style Configurator).

udl_screenshot

You can run the interpreter with the following command in your project directory.

python main.py [infile.txt] [outfile.html]

The css file I created, when paired with the output HTML file from the interpreter, produces an ouput which looks something like this. Customize your own page how you see fit.

post_screenshot

License

See the license here.