Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
-- This file:
--   http://anggtwu.net/blogme3/defs-2022.lua.html
--   http://anggtwu.net/blogme3/defs-2022.lua
--           (find-angg "blogme3/defs-2022.lua")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun e () (interactive) (find-angg "blogme3/defs-2022.lua"))
-- See: (find-fline "~/TH/emacsconf2021.blogme")
--      (find-THgrep "grep --color=auto -nH --null -e defs-2022  *.blogme")
--      (find-THgrep "grep --color=auto -nH --null -e short_:add *.blogme")
--      (find-THgrep "grep --color=auto -nH --null -e WGET_MP4   *.blogme")
--
-- «.stars-or-bullets»	(to "stars-or-bullets")
-- «.htmlize8»		(to "htmlize8")
-- «.load_caepro2»	(to "load_caepro2")
-- «.load_caepro3»	(to "load_caepro3")
-- «.load_caepro4»	(to "load_caepro4")
-- «.load_caepro5»	(to "load_caepro5")
-- «.Table-Row-Cell»	(to "Table-Row-Cell")
-- «.runbefore»		(to "runbefore")
-- «.NAME0»		(to "NAME0")


require "sandwiches-all"    -- (find-blogme3 "sandwiches-all.lua")
require "sandwiches-videos" -- (find-blogme3 "sandwiches-videos.lua")
require "code-etex-tlas"    -- (find-blogme3 "code-etex-tlas.lua")

def [[ _  2 shorthand,text R(short_:expand(shorthand), nilify(text) or shorthand) ]]
def [[ __ 1 shorthand        short_:expand(shorthand) ]]

-- (find-blogme3 "sandwiches-all.lua" "short_-tests")
-- (find-blogme3 "sandwiches-defs.lua" "Short_")
-- (find-blogme3 "sandwiches-defs.lua" "Short_-tests")
-- (find-fline "~/TH/eev-customize.blogme" "short_:add")
short_:add [[
  wget         -> https://en.wikipedia.org/wiki/Wget
  mpv          -> https://en.wikipedia.org/wiki/Mpv_(media_player)
  mpv-keys     -> eev-videos.html#mpv-keys
  links-curtos => (find-TH "2023-links-curtos")
]]

-- See: (find-fline "~/TH/2022eev-svg.blogme" "[PLEFT")
def [[ PLEFT 1 body "<p align=\"left\">$body</p>" ]]
def [[   FIG 2 link,img "<a href=\"$link\"><IMG SRC=\"$img\"></a>" ]]
def [[ TLFIG 3 title,link,fig "<a href=\"$link\" title=\"$title\"><IMG SRC=\"$fig\"></a>" ]]

def [[ KEY 1 body "&lt;$body&gt;" ]]
def [[ ITEM 1 body "&#8226; $body" ]]
def [[ BRITEM 1 body BR()..ITEM(body) ]]

-- https://emojibase.dev/shortcodes/?
def [[ =)        0 _    "&#128522;" ]]
def [[ (=        0 _    "&#128579;" ]]
def [[ =(        0 _    "&#128577;" ]]
def [[ =/        0 _    "&#128533;" ]]
def [[ :no_face: 0 _    "&#128566;" ]]
def [[ .         0 _    "&nbsp;" ]]
def [[ ..        0 _    "&nbsp;&nbsp;" ]]
def [[ ...       0 _    "&nbsp;&nbsp;&nbsp;" ]]
def [[ ....      0 _    "&nbsp;&nbsp;&nbsp;&nbsp;" ]]

-- (find-THgrep "grep --color=auto -nH --null -e wget_mp4 *.blogme")
-- (find-THgrep "grep --color=auto -nH --null -e WGET_MP4_VTT *.blogme")
--
wget_mp4_body = function (c, mp4stem)
    return '# (find-video-links-intro "5. Local copies")'
      .. '\n# (find-1stclassvideo-links "'..c..'")'
      .. '\n# (find-1stclassvideoindex  "'..c..'")'
      .. '\nwget -nc http://anggtwu.net/eev-videos/'..mp4stem..'.mp4'
  end
wget_mp4_vtt_body = function (c, mp4stem)
    return '# See:  http://anggtwu.net/eev-videos.html'
      .. '\n#       http://anggtwu.net/eev-videos.html#mpv-keys'
      .. '\n# Play: (find-'..c..'video "0:00")'
      .. '\n# Info: (find-1stclassvideo-links "'..c..'")'
      .. '\n# Subs: (find-1stclassvideolsubs  "'..c..'")'
      .. '\n'
      .. '\nwget -nc http://anggtwu.net/eev-videos/'..mp4stem..'.mp4'
      .. '\nwget -N  http://anggtwu.net/eev-videos/'..mp4stem..'.vtt'
      .. '\nmpv --fs --osd-level=2 '..mp4stem..'.mp4'
  end

def [[ WGET_MP4     2 c,mp4stem
         PREBOXBLOGME(htmlizelines(wget_mp4_body    (c, mp4stem)))
    ]]
def [[ WGET_MP4_VTT 2 c,mp4stem
         PREBOXBLOGME(htmlizelines(wget_mp4_vtt_body(c, mp4stem)))
    ]]


-- «stars-or-bullets»  (to ".stars-or-bullets")
-- See: (find-TH "eepitch" "bullets")
-- sgmlify_table["\15"]  = "<font color=\"red\"><strong>*</strong></font>"
-- sgmlify_table["\15"]  = "<font color=\"red\">&#8226;</font>"
def [[ redstar     0 _ "<font color=\"red\"><strong>*</strong></font>" ]]
def [[ redbullet   0 _ "<font color=\"red\">&#8226;</font>" ]]
def [[ blackbullet 0 _ "&#8226;" ]]


-- «htmlize8»  (to ".htmlize8")
-- See: (find-blogme3 "anggdefs.lua" "headers" " htmlize ")
--      (find-blogme3 "options.lua" "htmlizefile_utf8" "dtd_encoding_utf8")
--      (find-THgrep "grep --color=auto -nH --null -e htmlize8 *.blogme")
def_ [[ htmlize8   2 title,body
          html_dtd = dtd_transitional .. dtd_encoding_utf8
          blogme_output = html_all(title, body)
     ]]

-- «load_caepro2»  (to ".load_caepro2")
-- (find-THgrep "grep --color=auto -nH --null -e 'require \"Caepro2\"' *.blogme")
-- (find-THgrep "grep --color=auto -nH --null -e load_caepro2 *.blogme")
load_caepro2 = function ()
    Path.prependtopath "~/LUA/?.lua"
    require "Caepro2"        -- (find-angg "LUA/Caepro2.lua")
    caeprourl = function (abbr) return Abbrev.from(abbr):url() end
    def [[ C   2 abbr,body   HREF(caeprourl(abbr), nilify(body) or abbr)  ]]
  end

-- «load_caepro3»  (to ".load_caepro3")
load_caepro3 = function ()
    Path.prependtopath "~/LUA/?.lua"
    require "Caepro3"      -- (find-angg "LUA/Caepro3.lua")
    caeprourl = function (abbr) return (Abbrevs {}):anggurl(abbr) end
    caeproR   = function (abbr,body0)
      local url = caeprourl(abbr)
      local body = nilify(body0) or abbr
      return url and HREF(url, body) or body
    end
    def [[ C  2 abbr,body   caeproR(abbr,body)  ]]
    def [[ R  2 url,body  HREF(url, nilify(body) or url) ]] -- Restore after lpeg
  end

-- «load_caepro4»  (to ".load_caepro4")
-- (find-THgrep "grep --color=auto -nH --null -e load_caepro4 *.blogme")
load_caepro4 = function ()
    Path.prependtopath "~/LUA/?.lua"
    require "Caepro4"      -- (find-angg "LUA/Caepro4.lua")
    caeprourl = function (abbr) return Abbrev.anggurl(abbr) end
    caeproR   = function (abbr,body0)
      local url = caeprourl(abbr)
      local body = nilify(body0) or abbr
      return url and HREF(url, body) or body
    end
    def [[ C  2 abbr,body   caeproR(abbr,body)  ]]
    def [[ R  2 url,body  HREF(url, nilify(body) or url) ]] -- Restore after lpeg
  end

-- «load_caepro5»  (to ".load_caepro5")
-- (find-THgrep "grep --color=auto -nH --null -e load_caepro5 *.blogme")
load_caepro5 = function ()
    Path.prependtopath "~/LUA/?.lua"
    require "Caepro5"      -- (find-angg "LUA/Caepro5.lua")
    caeprourl = function (abbr) return Enrichen.pgeturl(preprocess(abbr)) end
    caeproR   = function (abbr,body0)
      local url = caeprourl(abbr)
      local body = nilify(body0) or abbr
      return url and HREF(url, body) or body
    end
    def [[ C  2 abbr,body   caeproR(abbr,body)  ]]
    def [[ R  2 url,body  HREF(url, nilify(body) or url) ]] -- Restore after lpeg
  end

-- «Table-Row-Cell»  (to ".Table-Row-Cell")
def  [[ Table 1 body "<table border=\"0\">\n$body\n</table>" ]]
def  [[ Row   1 body "<tr>$body</tr>" ]]
def  [[ Cell  1 body "<td>$body</td>" ]]
def  [[ TableRowCells 1L cells Table(Row(mapconcat(Cell, cells, " "))) ]]

-- (find-blogme3 "anggdefs.lua" "HTMLIZELINES")
angtosq = function (str) return (str:gsub("[<>]", {["<"]="[", [">"]="]"})) end
def [[ BE<>'  1Q body PREBOXBLOGME(htmlizelines(angtosq(body))) ]]

-- «runbefore»  (to ".runbefore")
-- (find-es "blogme" "runbefore")

-- «NAME0»  (to ".NAME0")
-- Redefines: (find-blogme3 "anggdefs.lua" "basic-html" "NAME0")
NAME0_last_ = "(NAME0 hasn't been run)"
def  [[ NAME0_last 1 _      NAME0_last_ ]]
def_ [[ NAME0      2 tag,_  NAME0_last_ = tag; return "<a name=\"$tag\"></a>" ]]
def_ [[ sec2       2 f,sectionname
                            pushindex  (ANCHOR_I(NAME0_last(), sectionname))
                            return _G[f](R("#."..NAME0_last(), sectionname)) ]]
def_ [[ DELAY2    2Q a0,b0  local b1 = doblogme(b0) or ""
                            local a1 = doblogme(a0) or ""
                            return a1.."\n"..b1           ]]

def  [[ INDEX2     1 _      LIST2(secindex)               ]]
def  [[ DLINDEX2   1 _      DLIST(secindex)               ]]





-- Local Variables:
-- coding:  utf-8-unix
-- End: