Ron Howard: It was _not_ the tool he needed to avoid doing all manual OpenAPI YAML wrangling
#TIL Press 't' when on a github repo's web page to activate the file finder!
#oneliner for pretty printing PATH:
tr ':' '\n' <<< "$PATH"
omg I'd totally forgotten about `printf`! If nothing else, trying to get this tilde server off the ground has helped _me_ get better at doing things the UNIX way.
pages.txt holds a newline separated list of the page names that I want to generate (index, codeofconduct, etc). We iterate over this list, using comrak (https://lib.rs/crates/comrak) to convert the MD to HTML, which is dumped in a temp file. The temp file is then `cat`ed together with the header and footer templates, which are just the top and bottom pieces of an HTML file.
Problem solved, in a very UNIXy way!
for page in $pages;
$(which comrak) $page.md > $page.temp.html
cat header.template $page.temp.html footer.template > $page.html
Oh lookie! I might follow along with this, but write it in Go. I wanna use this as a chance to brush up on my Go skills, since it looks like I'll be using it at work quite a bit. Thankfully Go has a nice API for tty things.
Ok, after reading this https://unix.stackexchange.com/questions/21752/what-s-the-difference-between-a-raw-and-a-cooked-device-driver
cooked vs raw makes more sense. So I guess I have to use raw mode and hook up my own functions to handle certain keypresses instead of the terminal handling them
Ok, the line at the tag office is awfully long so I'm gonna start looking into how to make a basic text editor, inspired by https://web.eecs.utk.edu/~azh/blog/challengingprojects.html