This project was a PHP prototype for what I hoped would someday be a compiled native application. Well, that day has come. I wrote the new version in the Nim language and have named it Bride of Text.

Check it out: https://bitbucket.org/ratfactor/bride-of-text


NoteGoat is an HTML generator which takes plaintext files as input.

I created it as a replacement for a personal wiki because, though I liked the readability of the wiki, I found myself going back to plaintext files again and again.


Install PHP. I've tested this with PHP version 5.5.12. If you're running a lower version and you get syntax errors, you'll need to update. Sorry.

If you run NoteGoat with out any command line parameters, it will give you these instructions:

  Usage: php ng.php <input> [<output_dir>] [<template>]
    <input>         textfile or directory (see note below)
    <output_dir>    optional output directory
    <template>      optional html template

    ng foo.txt
    ng text_files website/pages
    ng foo.txt ./ mytemplate.html

    If <input> is a file, it will always be processed. If it is
    a directory, NoteGoat will only process the files which have
    changed since previous output was generated (if any).


Syntax is documented in demo/html/goat-markup.html


NoteGoat has a default template internal to the .php script. However, as you can see in the above usage instructions, you can supply a .html template file to use instead.

Take a look at demo/my_template.html for a silly example template. As you can see, it simply uses {{variables}} to indicate where the title, table of contents, and body of the document should be placed. They're all optional. Feel free to abuse them as you see fit. :-)


Long live text files!

I find generating HTML content from plaintext to be almost perfect for personal notes and small websites because:

  • Plaintext is pretty good for readability and unmatched in writability
  • Simple HTML is wonderfully readable on a huge variety of devices and has readability advantages
  • Creating links in the HTML output allows the documents to function as a cohesive website
  • By borrowing liberally from all of the markup formats I could find, the syntax is unobtrusive and easy to remember
  • After all software has rotted away, the plaintext remains

NoteGoat is currently a PHP prototype, perhaps to be re-written someday in another language or as a standalone executable. Or perhaps not!

Long live text files!