a technical notebook
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.1 KiB

  1. workings: a technical notebook
  2. ===============================
  3. This is the source for some text which can be found here:
  4. [http://squiggle.city/~brennen/workings-book/](//squiggle.city/~brennen/workings-book/)
  5. ...which is probably the best place to read it.
  6. what
  7. ----
  8. I attempt to keep a notebook about the technical problems I encounter and solve
  9. (or attempt to solve), the research I conduct along the way, and the patterns
  10. or general principles I try to extract from my work.
  11. how
  12. ---
  13. This is mostly just some Markdown files and a handful of scripts. Chapters are
  14. listed in a file called `chapters`; each chapter is a directory containing an
  15. `index.md` and any supplemental files. These are pushed through `render.pl`
  16. and concatenated with `header.html` & `footer.html`. For convenience, this is
  17. handled by a basic `Makefile`:
  18. $ make
  19. cat chapters | xargs ./render.pl | cat header.html - footer.html > index.html
  20. `render.pl` wraps up a library called `Text::Markdown::Discount`, which in turn
  21. wraps up the Discount Markdown parser. Aside from this, it also generates a
  22. table of contents and expands code of the form
  23. <!-- exec -->
  24. $ [some command]
  25. <!-- end -->
  26. to include the output of the command executed in the directory containing the
  27. rendered file, which is how most of the example commands in the text are
  28. rendered. In keeping with long tradition, this is done with cheeseball regex
  29. substitution. **Be aware that, by running make, you are implicitly trusting
  30. most of the commands found in the text to run on your system.** This is no
  31. weirder than the level of trust extended to most any build process, but I don't
  32. want it to catch anyone by surprise.
  33. There's also a `links.md`, which should contain all links to external
  34. resources.
  35. To build the whole thing without errors, you'd need to be on a system with a
  36. couple of external repos, Bash and the GNU coreutils, and miscellaneous
  37. utilities (notably `cowsay`, `dict`, `figlet`, `aspell`, `curl`, `lynx`, and
  38. `w3m`). A recent Debian or some derivative would probably work best. One of
  39. these days I'll wrap up all the dependencies in a package.
  40. author
  41. ------
  42. Brennen Bearnes (p1k3.com / @brennen)