Quick
index
main
eev
eepitch
maths
angg
blogme
dednat6
littlelangs
PURO
(C2,C3,C4,
 λ,ES,
 GA,MD,
 Caepro,
 textos,
 Chapa 1)

emacs
lua
(la)tex
maxima
 qdraw
git
lean4
agda
forth
squeak
icon
tcl
tikz
fvwm
debian
irc
contact

How blogme3 htmlizes ascii files

Practically all the HTML files at http://angg.twu.net/ are generated by blogme3. The trickiest part of blogme3 is the code that htmlizes ascii code with elisp hyperlinks and achors, like this:

# (find-eev-quick-intro "3. Elisp hyperlinks")
# (find-eev-quick-intro "9. Shorter hyperlinks")
# (find-eev-quick-intro "9.1. `code-c-d'")
# (find-eev-quick-intro "8. Anchors")
# (find-eev-quick-intro "8.1. Introduction: `to'")

# «.an-anchor»	(to "an-anchor")
# «an-anchor»  (to ".an-anchor")

# http://angg.twu.net/e/
# http://angg.twu.net/emacsconf2019.html
# http://angg.twu.net/LATEX/2019emacsconf.pdf#page=8

# (find-blogme3 "sexp.lua")
# (find-eev-quick-intro "6.4. Red stars")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
cat > o <<'%%%'
  FOO
%%%
make |& tee om

# http://angg.twu.net/emacsconf2019.html
# http://angg.twu.net/LATEX/2019emacsconf.pdf#page=8
# http://angg.twu.net/e/           <- htmlized with -a2html
# http://angg.twu.net/eev-intros/  <- htmlized with -ei2html

# (find-blogme3 "options.lua" "basic-options")
# (find-blogme3 "options.lua" "basic-options" "dooption_a2html =")
# (find-blogme3 "options.lua" "basic-options" "dooption_ei2html =")
# (find-blogme3 "options.lua" "htmlizefile")
# (find-blogme3 "escripts.lua" "htmlizelines")
# (find-blogme3 "eevintros.lua")
# (find-blogme3 "anggmake.lua" "makefileauto_template")
# (find-blogme3 "anggmake.lua" "makefileauto_template" "E_HTMLS =")
# (find-blogme3 "anggmake.lua" "makefileauto_template" "e/_.e.html: e/_.e" "-a2html")
# (find-blogme3 "anggmake.lua" "makefileauto_template" "EI_HTMLS =")
# (find-blogme3 "anggmake.lua" "makefileauto_template" "eev_intros" "-ei2html")

# (code-eevvideo  "eev2020" "emacsconf2020" "hOAqBc42Gg8")
# (find-eev2020video "8:20" "`code-c-d' defines several new functions")

Note that most sexp hyperlinks get two links: one at the function name, pointing to help about that function, and one at the last two characters, pointing to the target of the sexp hyperlink. Note also that URLs are htmlized as links as expected, that some non-obvious shell constructs are hyperlinked, and that the glyphs *«» are rendered as they appear in Emacs with eev, but in anchors the middle part becomes green.

The function that does most of the work here is htmlizeline, that has three different implementations:

# The original htmlizeline (from 2007):
# (find-blogme3 "escripts.lua")
# (find-blogme3 "escripts.lua" "htmlizeline")
# (find-blogme3 "escripts.lua" "assexplink")
# (find-blogme3 "charset.lua")
#
# A reimplementation (from 2019):
# (find-blogme3 "sexp.lua")
# (find-angg "LUA/lua50init.lua" "ELispH")
# (find-angg "LUA/lua50init.lua" "ELispHF")
# (find-angg "LUA/lua50init.lua" "SexpSkel")
#
# Another reimplementation (2021):
# (find-blogme3 "sandwiches.lua")
# (find-blogme3 "sandwiches-defs.lua")
# (code-pdf-page "iconbook" "$S/https/www2.cs.arizona.edu/icon/ftp/doc/lb1up.pdf")
# (code-pdf-text "iconbook" "$S/https/www2.cs.arizona.edu/icon/ftp/doc/lb1up.pdf" 22)
# (find-iconbookpage (+ 22 44) "&subject")
# (find-iconbooktext (+ 22 44) "&subject")