####### # # E-scripts on BlogMe. # # Note 1: use the eev command (defined in eev.el) and the # ee alias (in my .zshrc) to execute parts of this file. # Executing this file as a whole makes no sense. # # Note 2: be VERY careful and make sure you understand what # you're doing. # # Note 3: If you use a shell other than zsh things like |& # and the for loops may not work. # # Note 4: I always run as root. # # Note 5: some parts are too old and don't work anymore. Some # never worked. # # Note 6: the definitions for the find-xxxfile commands are on my # .emacs. # # Note 7: if you see a strange command check my .zshrc -- it may # be defined there as a function or an alias. # # Note 8: the sections without dates are always older than the # sections with dates. # # This file is at # or at . # See also , # , # , # and . # ####### # «.square-brackets» (to "square-brackets") # «.other-glyphs» (to "other-glyphs") # «.withindex» (to "withindex") # «._» (to "_") # «._TARGETS» (to "_TARGETS") # «.parselspaces» (to "parselspaces") # «.patched-listings» (to "patched-listings") # «.invoking-blogme» (to "invoking-blogme") # «.MDEF» (to "MDEF") # «.lua2html» (to "lua2html") # «.org2html» (to "org2html") # «.diagrams-with-words» (to "diagrams-with-words") # «.traffic-lights» (to "traffic-lights") # «.traffic-lights-glyphs» (to "traffic-lights-glyphs") # «.blogme3.tgz» (to "blogme3.tgz") # «.blogme3-at-caramelo» (to "blogme3-at-caramelo") # «.blogme3-at-zumbi» (to "blogme3-at-zumbi") # «.makefile-a2html» (to "makefile-a2html") # «.a2html-at-zumbi» (to "a2html-at-zumbi") # «.parsechangelog-tests» (to "parsechangelog-tests") # «.cgis» (to "cgis") # «.cgis-at-zumbi» (to "cgis-at-zumbi") # «.wikirefs» (to "wikirefs") # «.blogme3-in-macosx» (to "blogme3-in-macosx") ##### # # square brackets # 2007aug29 # ##### # «square-brackets» (to ".square-brackets") # (find-angg ".emacs" "square-brackets") ⟦⟧ # (find-eoutput '(insert 300006 300007)) # (find-eoutput '(insert 300006 300007) "" '(switch-to-buffer (htmlize-buffer))) # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: sgmlify_table["\17"] = "⟦" sgmlify_table["\16"] = "⟧" sgmlify_re = "([\15\16\17\161-\254])" ] [PRE [' Foo! abefghijklmn abcdefghijklmn O ]] # ##### # # other glyphs # 2007sep15 # ##### # «other-glyphs» (to ".other-glyphs") # (find-angg ".emacs" "square-brackets") # (find-eoutput '(insert 300006 300007)) # (find-eoutput '(insert 300006 300007) "" '(switch-to-buffer (htmlize-buffer))) # (find-eoutput '(insert 332731 332736)) # (find-eoutput '(insert 332731 332736) "" '(switch-to-buffer (htmlize-buffer))) # (find-eleimfile "quail/sgml-input.el") # (find-eleimfile "quail/latin-ltx.el") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: sgmlify_table["\17"] = "⟦" sgmlify_table["\16"] = "⟧" sgmlify_table["\21"] = "π" sgmlify_table["\221"] = "∈" sgmlify_table["\240"] = "λ" sgmlify_table["\206"] = "∃" sgmlify_table["\253"] = "∀" sgmlify_re = "([\15-\31\161-\254])" ] [PRE [' abcdefghijklmn abλπefghijklmn abλπ∈fghi∃∀lmn abcdefghijklmn abðÝfghiÎýlmn ]] # # (find-eoutput '(insert 21 221 240 206 253)) ##### # # WITHINDEX # 2007aug29 # ##### # «withindex» (to ".withindex") # (find-angg "TH/davinci.blogme" "withindex") # (find-blogme3file "anggdefs.lua" " Sec ") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: -- (find-blogme3file "definers.lua" "5 readvvvvvrest") -- (find-blogme3file "brackets.lua" "readvvvvvrest =") readvvvvvvrest = function () return readvword(), readvvvvvrest() end _AA["6"] = readvvvvvvrest secindex = {} unanchor = function (str) return string.sub(str, 2, -2) end pushindex = function (indexentry, body) table.insert(secindex, indexentry) return body end def [[ ANCHOR 3 anchor,target,body NAME(anchor, HREF("#"..target, body)) ]] def [[ Sec 6 n,anchor,to,totarget,f,title pushindex( ANCHOR("."..unanchor(anchor), unanchor(anchor), n.." "..title), ANCHOR(unanchor(anchor), "."..unanchor(anchor), _G[f](n.." "..title)) ) ]] def [[ INDEX 1 _ HLIST2(BF("Quick index:"), secindex) ]] def [[ WITHINDEX 1 body INDEX()..body ]] ] [# «.foo» (to "foo") «.bar» (to "bar") #] [WITHINDEX [Sec 1 «foo» (to ".foo") H2 Section foo] [Sec 2 «bar» (to ".bar") H3 Section bar] [# INDEX] [# lua: PP(secindex) ] ] # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [# «.plic» (to "plic") «.bletch» (to "bletch") #] [WITHINDEX [Sec 1 «plic» (to ".plic") H2 Section plic] [Sec 2 «bletch» (to ".bletch") H3 Section bletch] ] # ##### # # _ # 2007sep12 # ##### # «_» (to "._") # (find-angg "TH/davinci.blogme") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: _target = {} _target.IUP = "http://www.tecgraf.puc-rio.br/iup/" _target.CD = "http://www.tecgraf.puc-rio.br/cd/" _target.IM = "http://www.tecgraf.puc-rio.br/im/" _target.LuaCmd = "http://www.tecgraf.puc-rio.br/luacmd/" _target.Emacs = "emacs.html" _target.Lua = "luaforth.html" _target.CNPq = "http://www.cnpq.br/" _target.TecGraf = "http://www.tecgraf.puc-rio.br/im/" _target["Tcl/Tk"] = "tcltk.html" def [[ _ 2 str,text _target[str] and HREF(_target[str], nilify(text) or str) or BF("{"..str.."}") ]] ] [P Foo! [_ IUP] [_ IUP blah blah]] # ##### # # _TARGETS # 2007sep29 # ##### # «_TARGETS» (to "._TARGETS") # (find-luamanualw3m "#5.4.1" "%s: represents all space characters") # (find-blogme3file "blogme3.lua") # (find-blogme3file "escripts.lua") # (find-blogme3file "elisp.lua" "TGT 1 sexp") # (find-blogme3file "elisp.lua" "full TGT") # (find-blogme3file "anggdefs.lua" "two_d_trim =") # (find-blogme3grep "grep -niH -e tgt *") # (find-blogme3grep "grep -niH -e '\"_\"' *") # (find-anggfile "TH/emacs.blogme" " _ 1 body ") # (find-anggfile "TH/davinci.blogme" " _ 2 str,text ")  (eepitch-lua51) process_pointer_line = function (str) -- str = gsub(str, "[ \t]+$", "") local word, sexp = string.match(str, "^%s*(%S+)%s+%->%s+(%(.*%))%s*$") if word then -- _target[word] = TGT(sexp) print("<<"..word..">> :: "..sexp.." ::") end end ppl = process_pointer_line ppl [=[ foo -> (bar plic) ]=] ppl [=[ foo -> (bar plic)]=] # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: -- (find-es "blogme" "_") _target = {} _target.IUP = "http://www.tecgraf.puc-rio.br/iup/" _target["Tcl/Tk"] = "tcltk.html" def [[ _ 2 str,text _target[str] and HREF(_target[str], nilify(text) or str) or BF("{"..str.."}") ]] ] [lua: -- (find-blogme3file "elisp.lua" "full TGT") require "escripts" def [[ TGT 1 sexp Tgt(SexpLink:match(sexp)) ]] process_TARGET_line = function (linestr) local word, sexp = string.match(linestr, "^%s*(%S+)%s+%->%s+(%(.*%))%s*$") if word then _target[word] = TGT(sexp) end end process_TARGET_lines = function (bigstr) string.gsub(bigstr, "([^\n]+)", process_TARGET_line) end def [[ _TARGETS 1 lines process_TARGET_lines(lines) ]] ] [_TARGETS ttt -> (find-es "blogme" "_TARGETS") ttto -> (find-es "blogme") ] [P Foo: [_ IUP], [_ ttt].] # process_TARGET = function (str) local word, sexp = string.match(str, "^%s*(%S+)%s+%->%s+(%(.*%))%s*$") if word then print("<<"..word..">> :: "..sexp.." ::") end end ##### # # sec # 2007oct08 # ##### -- (find-blogme3file "anggdefs.lua" "Sec, INDEX, WITHINDEX") -- (find-blogme3file "brackets.lua" "parsewchars =") -- (find-blogme3file "anggdefs.lua" "unanchor =") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: -- For simplicity, the "rest of line" in readqline cannot include []s. -- Note that the newline is optional; "readqline" never fails. readqline = function () return parsebypattern("^[ \t]*([^\n%[%]]*)\n?()") end readlvvrest = function () return readqline(), readvword(), readvrest() end _AA["lvv"] = readlvvrest unanchor = function (str) return string.match(str, "\171([!-~]+)\187") or "" end def [[ sec lvv line,f,title pushindex( ANCHOR("."..unanchor(line), unanchor(line), title), ANCHOR(unanchor(line), "."..unanchor(line), _G[f](title)) ) ]] def [[ Sec lvv line,f,title sec(line, f, title) ]] ] [# «.foo» (to "foo") «.bar» (to "bar") #] [WITHINDEX [Sec «foo» (to ".foo") H2 1. Section foo] [Sec «bar» (to ".bar") H3 2. Section bar] [# INDEX] [# lua: PP(secindex) ] ] # ##### # # patched listings (notes to cannibalize and discard) # 2007oct23 # ##### # [# (eeblogme-now-bounded) # file:///tmp/ee.html #]
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Bad: too much" 4 5 * .
1 2 + . ." vertical space" 4 5 * .
# [# (eeblogme-now-bounded) # file:///tmp/ee.html #]
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .

 

Foo bar
   ." Hello" 4 5 * .

 ooo
      plic plic pluic plic

 

Foo bar
  plic ploc
    tick tock
# [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: def [[ T0BG 2 bg,body '' .. body .. '
' ]] ]
Foo
  bar
    plic
1 2 + . ." Hello" 4 5 * .
1 2 + . ." Hello" 4 5 * .
Foo
bar
plic

 

In a "pre" block that is
 not inside a "table"
  the background spills out
   to the right side.

 Blank lines
are always respected (in "pre"s)

 

Original
  code
    here

# patch starts here
# orig code # commented out
my new version
# patch ends here Rest of the original code

 

Original
  code
    here

# patch starts here
# orig code # commented out
my new version
# patch ends here Rest of the original code
# ##### # # patched listings # 2007oct23 # ##### # «parselspaces» (to ".parselspaces") # «patched-listings» (to ".patched-listings") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: -- (find-blogme3file "definers.lua" "_AA[short] = _G[long]") -- (find-blogme3file "brackets.lua" "readqrest_ =") -- (find-blogme3file "brackets.lua" "parsespaces =") parselspaces = function () return parsebypattern("^([ \t]*\n?)()") end _AA["_1Q"] = function () parselspaces(); return readqrest__() or "" end def [[ L' _1Q body body ]] def [[ PRERECTBG 2 bg,body "
" .. "$body
" ]] _listing_parts = {} _listing_add = function (text) tinsert(_listing_parts, text) return text end def [[ PATCH' _1Q body PRERECTBG("orange", _listing_add(body)) ]] def [[ OUT' _1Q body PRERECTBG("red", _listing_add(body)) ]] def [[ ORIG' _1Q body _listing_add(body) ]] def [[ PLISTING 1 body "
$body
" ]] def [[ PLISTING 1 body PRE(body) ]] ] [PLISTING [set _listing_body [ORIG' Original code here ][PATCH' # patch starts here ][OUT' # orig code # commented out ][PATCH' my new version # patch ends here ][ORIG' Rest of the original code ]]] [PREBOXBLOGME [$ _listing_body]] [P [set foo Foo foo foo] [BR] [$ foo] [$ foo]] [PREBOXBLOGME [expr: table.concat(_listing_parts)]] # ##### # # invoking blogme # 2007oct25 # ##### # «invoking-blogme» (to ".invoking-blogme")  (eepitch-shell)  (eepitch-kill)  (eepitch-shell) echo $PS1 export PS1='%d# ' cd /tmp/ cat > foo.blogme <<'%%%' [lua: print("Hello!") PP(arg) ] [htmlize [J Foo Bar] [P A paragraph] ] Blah %%% lua51 ~/blogme3/blogme3.lua -o foo.html -i foo.blogme cat foo.html ##### # # MDEF # 2007oct27 # ##### # «MDEF» (to ".MDEF") # (find-blogme3 "") # (find-blogme3file "brackets.lua") # (find-blogme3file "definers.lua") # (find-blogme3file "definers.lua" "runwithvars =") # (find-blogme3file "options.lua") # (find-a2ps "~/blogme3/definers.lua") # (find-a2ps "~/blogme3/options.lua") # (find-blogme3file "brackets.lua" "withsubj =") # (find-THgrep "grep -nwH -e 'set' *.blogme") # (find-THgrep "grep -nwH -e 'DEF' *.blogme") # (find-THgrep "grep -nH -e 'DEF' *.blogme") # (find-blogme3grep "grep -nwH -e set *.lua") # (find-blogme3grep "grep -nwH -e DEF *.lua") # (find-blogme3grep "grep -nH -e DEF *.lua") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: _V = _V or {} def_ [[ set 2 varname,text _G[varname] = text; return text ]] def [[ $ 1 varname _V[varname] or _G[varname] ]] printlayers = function (T) for depth,tbl in layers(T) do PP(depth, tbl) end end printlayers_V = function () for depth,tbl in layers(_V) do PP(depth, tbl) end end runwithlocalvars = function (varnames, values, f, ...) _V = over(_V, {}) -- create a new frame for local vars for i,varname in ipairs(split("a,b", "([^,]+)")) do -- for each varname _V[varname] = values[i] -- set its value in the new frame end local results = pack(f(...)) -- run f (with the new local vars) _V = under(_V) -- drop the new frame return unpack(results) end PP(over, under) -- PP(runwithlocalvars, "a,b", {44, 55}, printlayers_V) -- PP(runwithlocalvars("a,b", {44, 55}, printlayers_V)) PP(runwithlocalvars("a,b", {44, 55}, doblogme, "(a: [$ a], b: [$ b])")) -- (find-blogme3file "definers.lua" "def_set_B =") -- (find-blogme3file "definers.lua" "def_set_G =") -- (find-blogme3file "definers.lua" "def_as_lua =") def_set_A("AB", "2") def_set_G("AB", [=[function (a,b) return runwithlocalvars("a,b", {a,b}, doblogme, "(a: [$ a], b: [$ b])") end]=]) print(AB(66, 77)) def_set_AG("AB", "2", [=[function (a,b) return runwithlocalvars("a,b", {a,b}, doblogme, "(a: [$ a], b: [$ b])") end]=]) def [=[ MDEF 4Q name,apspec,arglist,body def_set_AG(name, apspec, format([==[function (%s) return runwithlocalvars(%q, {%s}, doblogme, %q) end]==], arglist, arglist, arglist, body)) ]=] MDEF("AC", "2", "a,c", "(a: [$ a], c: [$ c])") print(defs_as_lua()) ] # ##### # # lua2html and org2html # 2007nov11 # ##### # «lua2html» (to ".lua2html") # «org2html» (to ".org2html") # I haven't used these options in a while... # Tests:  (eepitch-shell) cd /tmp/ cp -v ~/blogme3/blogme3.lua . lua51 ~/blogme3/blogme3.lua -o blogme3.lua.html -lua2html blogme3.lua cp -v ~/ORG/index.org . lua51 ~/blogme3/blogme3.lua -o index.org.html -org2html index.org  (eepitch-lua51)  (eepitch-kill)  (eepitch-lua51) blogmedir = ee_expand("~/blogme3/") dofile(ee_expand("~/blogme3/blogme3.lua")) loada2html() = ("foo = function"):match"^([A-Za-z0-9_.]+)([ \t]+=.*)$" = htmlizeline_lua("foo = function") ##### # # diagrams with (hyperlinked) words # 2007nov27 # ##### # «diagrams-with-words» (to ".diagrams-with-words") # (find-blogme3 "anggdefs.lua" "_TARGETS") # (find-TH "emacs" "call-diagrams") # (find-TH "plurall") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: lpeg.togsub = lpeg_togsub lpeg.gsub_ = lpeg_gsub_ lpeg.gsub = lpeg_gsub f = function (s) return BG("blue", Q(s)) end f = function (s) return _target[s] and BG("blue", Q(s)) or Q(s) end f = function (s) return _target[s] and __(s, Q(s)) or Q(s) end Word = lpeg.R("az")^1 Dash = lpeg.P("-") Words = (Word * (Dash * Word)^0) / f WordsGsubt = Words:togsub():Ct() def [[ TRANSWORDS 1q body WordsGsubt:gsub_(body, Q) ]] def [[ TRANSWORDS 1q body Words:gsub(body, Q) ]] ] [_TARGETS code-c-d -> (find-eev "eev.el" "code-c-d") ] [PREBOXBLOGME [TRANSWORDS . code-c-d find-code-c-d | / | v v v find-fline <----- ee-code-c-d find-estring-elisp / | / | v | v v ee-expand | find-node find-eoutput-rerun | | v v ee-goto-position | v ee-goto-rest Top-level words: find-fline - hyperlink to a file find-node - hyperlink to an info node code-c-d - to define `find-xxxfile' and `find-xxxnode' words find-code-c-d - inspect the code that `code-c-d' would run ]] # ##### # # logs with traffic-light chars (^A-^E) # 2007dec05 # ##### # «traffic-lights» (to ".traffic-lights") # (find-angg ".emacs" "find-epalette") # (find-epalette my-palette) # (find-ecolors) (insert (propertize "a" 'face '(:foreground "firebrick1" :background "firebrick")) (propertize "b" 'face '(:foreground "purple1" :background "purple4")) (propertize "b" 'face '(:foreground "orange1" :background "orange4")) (propertize "c" 'face '(:foreground "darkolivegreen1" :background "darkolivegreen4")) ) (insert (propertize "a" 'face '(:foreground "firebrick1" :background "firebrick")) "(gdb)" (propertize "b" 'face '(:foreground "orange1" :background "orange4")) " command" (propertize "c" 'face '(:foreground "darkolivegreen1" :background "darkolivegreen4")) "\noutput output\noutput" ) ;; «traffic-lights-glyphs» (to ".traffic-lights-glyphs") ;; (find-angg ".emacs" "eev-traffic-light-glyphs") ;; (find-blogme3 "anggdefs.lua" "TRAFFIC") ;; (eev-traffic-light-glyphs) ;; (find-eevfile "eev-math-glyphs.el" "eev-glyphs-set-face 'eev-glyph-face-Greek") ;; (find-eevfile "eev-math-glyphs.el" "defvar eev-math-glyphs-name-to-char") ;; (eev-math-glyphs-edrx) ;; (add-to-alist 'eev-math-glyphs-name-to-char '("^a" . ?a)) (add-to-alist 'eev-math-glyphs-name-to-char '("^b" . ?b)) (add-to-alist 'eev-math-glyphs-name-to-char '("^c" . ?c)) (eev-glyphs-set-face 'eev-glyph-face-cfont-a "firebrick1" "firebrick") (eev-glyphs-set-face 'eev-glyph-face-cfont-b "orange1" "orange4") (eev-glyphs-set-face 'eev-glyph-face-cfont-c "darkolivegreen1" "darkolivegreen4") (eev-math-glyphs-set 'eev-glyph-face-cfont-a "^a" "^a" "") (eev-math-glyphs-set 'eev-glyph-face-cfont-b "^b" "^b" "") (eev-math-glyphs-set 'eev-glyph-face-cfont-c "^c" "^c" "") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: traffic = function (char, str) if char == "\01" then return COLOR("red", Q(str)) end if char == "\02" then return COLOR("green", Q(str)) end return Q(str) end def [[ TRAFFIC 1 body ("\03"..body):gsub("([\01-\03])([^\01-\03]*)", traffic) ]] ] [PRE [TRAFFIC [' Current directory is /home/edrx/usrc/lua-5.1.2/src/ Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) set args /tmp/foo.lua (gdb) br math_sin Breakpoint 1 at 0x80673ef: file lmathlib.c, line 32. (gdb) run Starting program: /home/edrx/usrc/lua-5.1.2/src/lua_O0 /tmp/foo.lua Breakpoint 1, math_sin (L=0x8071008) at lmathlib.c:32 (gdb) call lua_pushstring(L, "print") (gdb) call lua_gettable(L, -10002) (gdb) call lua_pushstring(L, "Foo!") (gdb) call lua_pushstring(L, "Bar!") (gdb) p lua_gettop(L) $1 = 4 (gdb) call lua_call(L, 2, 0) Foo! Bar! (gdb) p lua_gettop(L) $2 = 1 (gdb) ]]] # ##### # # dump_E4s # 2007dec11 # ##### # (find-blogme3 "elisp.lua" "_E4s_as_lua") ##### # # build a blogme.tgz, test on a NetBSD box # 2007dec27 # ##### # «blogme3.tgz» (to ".blogme3.tgz") # (find-angg ".emacs" "caramelo") # (find-blogme3 "Makefile") # (find-blogme3file "") # (find-blogme3file "anggmake.lua" " blogme3/") # (find-THfile "") # (find-blogme3file "Makefile") # (find-es "lua5") # (find-node "(make)Automatic Variables")  (eepitch-shell)  (eepitch-kill)  (eepitch-shell) rm -Rv /tmp/blogmetest/ mkdir /tmp/blogmetest/ mkdir /tmp/blogmetest/TH/ cd /tmp/blogmetest/ cp -v ~/blogme3/*.lua /tmp/blogmetest/ cp -v ~/blogme3/Makefile /tmp/blogmetest/ cp -v ~/LUA/lua50init.lua /tmp/blogmetest/ cp -v ~/TH/speedbar.blogme /tmp/blogmetest/TH/ cp -v ~/TH/blogme3.blogme /tmp/blogmetest/TH/ # cp -v ~/blogme3/testcgi.blogme /tmp/blogmetest/TH/ cd /tmp/blogmetest/ {TZ=GMT date; date;} > VERSION tar -cvzf ~/blogme3/blogme3.tgz * # Note that we build a tgz in ~/blogme3/blogme3.tgz, but then we # upload it to http://angg.twu.net/blogme3.tgz - no "/blogme3/". # (find-twusfile "" "blogme3") # (ee-cp "~/blogme3/blogme3.tgz" (ee-twupfile "blogme3.tgz") 'over) # (ee-cp "~/blogme3/blogme3.tgz" (ee-twusfile "blogme3.tgz") 'over) # (eev "Scp ~/blogme3/blogme3.tgz edrx@angg.twu.net:slow_html/") # (eev "Scp ~/blogme3/blogme3.tgz edrx@angg.twu.net:public_html/") # (find-blogme3 "Makefile") rm -Rv /tmp/blogmetest/usrc/ make S=$S testb # Older tests: make S=$S |& tee om make S=$S luatest make S=$S lpegtest make S=$S test # (find-blogme3file "Makefile") ##### # # testing blogme3 at caramelo # 2007dec28 # ##### # «blogme3-at-caramelo» (to ".blogme3-at-caramelo")  (eepitch-caramelo)  (eepitch-kill)  (eepitch-caramelo)  (ee-cp "~/blogme3/blogme3.tgz" (ee-caramelofile "tmp/blogme3.tgz") 'over) rm -Rv /tmp/blogmetest/ mkdir /tmp/blogmetest/ cd /tmp/blogmetest/ tar -xvzf ~edrx/tmp/blogme3.tgz make LUAOS=bsd luatest make LUAOS=bsd lpegtest make LUAOS=bsd test make LUAOS=bsd testb # (find-blogme3 "Makefile") # (find-es "lua5" "install-5.1.2") # (find-es "make" "environment") # (find-node "(make)Instead of Execution" "`-n'") # (find-node "(make)Setting" "FOO ?= bar") ##### # # blogme3 at zumbi # 2007dec28 # ##### # «blogme3-at-zumbi» (to ".blogme3-at-zumbi") # http://zumbi/~edrx/tmp/ # http://zumbi/~edrx/tmp/foo # http://zumbi/~edrx/tmp/foo.html # (find-zumbipagefile "tmp/foo") # (find-zumbifile "") # (find-fline "~/blogme3/blogme3.tgz") # (find-caramelofile "") # (find-zumbifile "") # (find-caramelofile "blogme3/") # (find-zumbifile "blogme3/") # (find-caramelofile "blogme3/blogme3.tgz") # (find-zumbifile "blogme3/blogme3.tgz")  (ee-cp "~/blogme3/blogme3.tgz" (ee-caramelofile "blogme3/blogme3.tgz") 'over)  (ee-cp "~/blogme3/blogme3.tgz" (ee-zumbifile "blogme3/blogme3.tgz") 'over)  (eepitch-caramelo)  (eepitch-kill)  (eepitch-caramelo) cd ~/blogme3/ tar -xvzf blogme3.tgz cat VERSION make clean make LUAOS=bsd ANGGBASE=http://10.1.0.101/TH/R/  (eepitch-zumbi)  (eepitch-kill)  (eepitch-zumbi) cd ~/blogme3/ tar -xvzf blogme3.tgz cat VERSION make clean make LUAOS=bsd ANGGBASE=http://10.1.0.101/TH/R/  (eepitch-zumbi)  (eepitch-kill)  (eepitch-zumbi) cd ~/public_html/ rm -Rv www/wiki/ rm -Rv www/ export 'CVSROOT=:ext:edrx@_zumbi:/omnisys/cvsroot' export 'CVSROOT=/omnisys/cvsroot' cvs checkout www/wiki cd ~/public_html/www/wiki/ cvs --help cvs --help-commands for i in note* project*; do ~edrx/blogme3/w2html $i done  (ee-cp "~/e/netbsd.e" (ee-zumbipagefile "www/wiki/") 'over) ~edrx/blogme3/t2html netbsd.e # ^ Too slow!!! # (find-blogme3 "anggdefs.lua" "wikirefs") # (find-zumbipagefile "www/wiki/") # http://zumbi/~edrx/www/wiki/project.cla-tlm.GuiIoMessages.html # http://zumbi/~edrx/www/wiki/netbsd.e.html # file:///home/edrx/TH/L/e/netbsd.e.html # (find-zumbifile "") # (find-zumbipagefile "www/wiki/") # (find-es "netbsd") # old stuff: # (find-es "ssh" "sshaskpass") # (find-es "blogme" "blogme3.tgz")  (eepitch-zumbi)  (eepitch-kill)  (eepitch-zumbi)  (ee-cp "~/blogme3/blogme3.tgz" (ee-zumbifile "tmp/blogme3.tgz") 'over) # (find-es "blogme" "blogme3.tgz") cd ~/public_html/tmp/ ~edrx/blogme3/blogme3 -anggat -o http://10.1.0.101/TH/R/ foo.html -a2html foo ##### # # the ".a2html" target in makefiles # 2007dec28 # ##### # «makefile-a2html» (to ".makefile-a2html")  (eepitch-shell)  (eepitch-kill)  (eepitch-shell) rm -Rv /tmp/fooo mkdir /tmp/fooo cd /tmp/fooo cat > Makefile <<'%%%' BLOGME3 = ~edrx/blogme3/blogme3 BLOGME3A2HTML = $(BLOGME3) -anggat http://10.1.0.101/TH/R/ %.a2html: $(BLOGME3A2HTML) -o $*.html -a2html $* %%% echo "http://angg.twu.net/" > foo make foo.a2html # file:///tmp/fooo/foo.html ##### # # running a2html at zumbi # 2007dec28 # ##### # «a2html-at-zumbi» (to ".a2html-at-zumbi") # (find-zumbifile "") # (find-zumbifile "bin/a2html") # (find-zumbipagefile "tmp/")  (eepitch-zumbi)  (eepitch-kill)  (eepitch-zumbi) cd ~/public_html/tmp/ ls ls | grep -v '\.html$' | grep -v '~$' for i in $(ls | grep -v '\.html$' | grep -v '~$'); do echo $i; done for i in $(ls | grep -v '\.html$' | grep -v '~$'); do ~/bin/a2html $i; done # http:///zumbi/~edrx/tmp/ # http:///zumbi/~edrx/tmp/TODO.html ##### # # tests for the parsechangelog module # 2007dec27 # ##### # «parsechangelog-tests» (to ".parsechangelog-tests") # (find-blogme3 "") # (find-blogme3 "escripts.lua") # (find-es "lua5" "lpeg-quickref") # (find-es "blogme") # (find-angg "LUA/parsechangelog.lua")  (eepitch-lua51)  (eepitch-kill)  (eepitch-lua51) -- (find-angg "LUA/parsechangelog.lua") -- (find-es "lua5" "lpeg-quickref") -- HOME = os.getenv "HOME" dofile(ee_expand "~/LUA/parsechangelog.lua") changelog = readfile(ee_expand "~/tmp/Changelog") c = ((SeparatorT * FieldsT)^0):Ct():match(changelog) = #c PP(c[1]) PP(c[2]) for fieldname, body in prfields(fields) do PP(fieldname, body) end PP(c[2]) for fieldname, body in changelogfields(c[2]) do PP(fieldname, body) end PP(fieldsandvalues(fields, changelogfields)) PP(changelogfieldsandvalues(fields)) PP(prfieldsandvalues(fields)) PP(changelogfieldsandvalues(c[2])) print(sqlizefields("tbl1", changelogfieldsandvalues(c[2]))) -- (find-angg "LUA/parsechangelog.lua") -- (find-es "sqlite" "pr.sqlitedb") -- (find-es "lua5") ##### # # CGIs in blogme3 # 2008jan02 # ##### # «cgis» (to ".cgis") # (find-blogme3 "blogme3") # (find-blogme3file "Makefile") # (find-blogme3file "Makefile" "blogme3:") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [PRE [Q [expr: getoutput("set")] ]] # ##### # # CGIs in blogme, at zumbi # 2008jan03 # ##### # «cgis-at-zumbi» (to ".cgis-at-zumbi") # (find-zumbipagefile "tmp/set.cgi") ##### # # wikirefs # 2008jan03 # ##### # «wikirefs» (to ".wikirefs") # (find-blogme3 "anggdefs.lua" "wikirefs") # (find-blogme3 "anggdefs.lua" "wikirefs" "replacewikirefs =") # [# (eeblogme-now-bounded) # file:///tmp/ee.html #] [lua: def [[ WIKIREFS 1 bigstr replacewikirefs(bigstr) ]] ] [PRE [WIKIREFS [' # $Id: project.cla-tlm.GuiIoMessages,v 1.2 2008/01/02 22:30:55 silas Exp $ This is the document that describes the algorithms responsible for transfering messages from IO to Gui and vice-versa. This process is similar to the communication between IO and Recorder. In main() an object of TlmGuiMain is created and its method init() is called. This method creates almost all the object intances of the program, including d_gio, which is an object of the type TlmGuiIO [_ tlmguiio]. After creating this object, its method init(s) have to be called. "s" is an string which has the path for the socket. -- TODO: talk about the difference in TlmRecIO::init() and TlmGuiIO::init() The init() method calls _init(), which is a method of the TlmUnixSock class, implemented in [_ tlm_gui-io]. As TlmGuiIO inherites TlmUnixSock, its protected methods and variables are also accessible. -- TODO: tell why TlmRecIO::init() don't call _init(). tell that it receives -- the ready file descriptor from tlmgui, that called tlmrec. _init(), then, creates the socket with socket() and return a valid filedescriptor. init() resumes the process, configuring the socket and dup()ing, so it can use it for reading and writing. -- TODO: continue... # refs # tlmgui_io http://zumbi/cgi-bin/cvsweb.cgi/cla-telemedidas/ihmtelm/tlmgui_io.cpp # tlm_gui-io http://zumbi/cgi-bin/cvsweb.cgi/cla-telemedidas/ihmtelm/tlm_gui-io.cpp # sfer # vim: tw=78 ts=4 et: ]]] # ##### # # blogme3 in macosx # 2008feb17 # ##### # «blogme3-in-macosx» (to ".blogme3-in-macosx") # (find-eev "find-eev-update-links") # (find-blogme3 "Makefile") # (find-blogme3file "Makefile" "luaunpack:") # (find-efunction 'mkto) # Local Variables: # coding: raw-text-unix # ee-delimiter-hash: "\n#\n" # ee-delimiter-percent: "\n%\n" # ee-anchor-format: "«%s»" # End: