;; Variables. ;; Emacs-Time-stamp: "2007-11-22 10:44:50" (setq file-stamp "Emacs-File-stamp: \"/home/ysverdlov/leninist.biz/lb-defvar.el\"") (defvar lb-pf-defvar (file-stamp-get-stamp) "") (defvar lb-AZ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "") (defvar lb-az "abcdefghijklmnopqrstuvwxyz" "") (defvar lb-re-cr-as-line-break (concat "[\r]\\([-][0-9]+\\)?") "") (defvar lb-re-defvar-accented ;(_makunbound) (concat "^[ \t]*;+[ \t]+" "\\([0-9][0-9][0-9]\\)" "[ \t]+.[ \t]+" "\\([0-9][0-9][0-9][0-9]\\)" "[ \t]+.[ \t]+" "\\([" lb-az lb-AZ "]\\)" ;; 2007.08.22 - stopped working when notes added to end of line. ;; "[ \t\r]*$" ) "Regexp used to find lines in this file") ;; (sfr lb-re-defvar-accented) ;; last-coding-system-used (setq file-coding-system-alist (append (list (cons "\\.tx$" (cons 'iso-latin-1-unix 'iso-latin-1-unix))) file-coding-system-alist)) (setq history-length 300) (defvar _orig-case-fold-search t "") ;; fix! sync with tablenames in .index files (defvar lb-db-tablenames (list "BOOK" ) "") ;; NOTE: See "lb.el" for (defvar lbg-lang-english ;; NOTE: See "lb.el" for (defvar lbg-lang-espanol ;; Uses "setq" (not "defvar"), so last one takes precedence. (unless (featurep 'lb-es) (load "lb-es")) ;; (setq lb-lang (unless (featurep 'lb-en) (load "lb-en")) ;; (setq lb-lang (setq load-path (append (list "~/bin/") load-path)) (setq load-path (append (list "~/leninist.biz/") load-path)) (setq load-path (append (list "~/leninist.biz/stf") load-path)) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar tx-str-fill-paragraph-midline "" "") (defvar tx-re-fill-paragraph (concat "[ " tx-str-fill-paragraph-midline "]") "") (defvar lbg-max-levels-for-chunking "3" "") ;; 2007.02.17 (defvar lb-str-emacs-time-stamp "Emacs-Time-stamp:" "") (defvar t2h-regexp-src "v[0-9][0-9][a-z][a-z][0-9][0-9]h?[:]?[:]?x?t?p?9?7?" "*Regexp that matches a source's volume, publisher and year") (defvar t2h-regexp-vpst (concat "") "*Regexp that matches ") (if (not (boundp 'lb-home)) ;; (load "lb-defvar-home.el") (defvar lb-home ;(_makunbound) (let (x y) (setq x (file-stamp-get-stamp)) ;; Assume project is stored in a subdirectory just under ~. (if (string-match (setq y "^[^/]*/[^/]+/\\(.*\\)") x) (setq x (replace-match "" t t x 1)) (error "%s: %s" y x)) x) "Includes trailing slash b/c this is a base directory")) (setq default-directory (expand-file-name lb-home)) ;; 2007.08.13 (defvar lb-home-dat (if (string-match "[.]biz/" lb-home) (replace-match ".dat/" t t lb-home)) "") (defvar lb-str-footnote-cont-from "__NOTE__ Footnote cont. from page 0." "") (defvar lb-str-footnote-cont-on "__NOTE__ Footnote cont. on page 0." "") (progn (when nil ;; (set-buffer-multibyte t) ;; (set-buffer-multibyte nil) ;; (standard-display-european t) ;; lb-assoc-espanol-accented-to-numeric-entities ;; lb-assoc-espanol-accented-to-un ;; lb-str-espanol-accented-vowels ;; lb-str-espanol-accented-consonants ;; (string-as-multibyte "a") ) (when nil ;; (string 2291) will display as accented "o" even w/o European dislpay! ;; ;; (progn (standard-display-european t) (set-buffer-multibyte t)) ;; o'o' ;; (progn (standard-display-european nil) (set-buffer-multibyte t)) ;; \363o' ;; (progn (standard-display-european t) (set-buffer-multibyte nil)) ;; o'\201o' ;; (progn (standard-display-european nil) (set-buffer-multibyte nil)) ;; \363\201\363 (insert (string 243 2291))) ;; Try this search: ;; (sfs "ó" nil t) ;; (elt "ó" 1) ;; Signaling: (args-out-of-range "ó" 1) ;; (elt "ó" 1) ;; Signaling: (args-out-of-range "\x8f3" 1) ;; (string-to-char "\x8f3") _> 2291 ;; (string-to-char "ó") _> 2291 ;; ARG "nil" makes search work but it sticks those \201 before character! ;; (set-buffer-multibyte nil) ... \x8f3 ;; (set-buffer-multibyte t) ... "ó" ;; 2007.08.15 (defvar lb-octal-highest-acceptable 377 "") (defvar lb-octal-letters-not-azAZ ;(_makunbound) (concat ;;"[" "\300-\307" "\310-\317" "\320-\327" "\330-\337" "\340-\347" "\350-\357" "\360-\367" "\370-\377" ;;"]" ) "SEE: lb-assoc-espanol-accented-to-numeric-entities") ;;; set-buffer-multibyte is a built-in function. ;;; ;;; Set the multibyte flag of the current buffer to FLAG. ;;; If FLAG is t, this makes the buffer a multibyte buffer. ;;; If FLAG is nil, this makes the buffer a single-byte buffer. ;;; The buffer contents remain unchanged as a sequence of bytes ;;; but the contents viewed as characters do change. ;;; ;;; (set-buffer-multibyte FLAG) ;;(list "á" "á") ;;(list "é" "é") ;; 2007.08.07 - (string-to-char _msnp) _> 243 ;; fix! this is now useless since (string 225) gives the answer! ;; fix? why 2285 ?!?!?! (string-to-char "í") ;; (string-to-char (format "%c" 243)) _> 243 ;; 2007.08.07 - maybe solution is to search for both sets. ;;(list 225 "á") ;; "á" ;;(list 233 "é") ;; "é" ;;(list 237 "í") ;; "í" ;;... ;;(list 2273 "á") ;; "á" ;;(list 2281 "é") ;; "é" ;;(list 2285 "í") ;; "í" ;;... (defvar lb-assoc-espanol-accented-to-numeric-entities ;(_makunbound) (let (list 3s 4s Z) (with-temp-buffer (_-ifcl lb-pf-defvar) (goto-char (point-min)) (while (and (sfr lb-re-defvar-accented nil t) (setq 3s (match-string-no-properties 1)) (setq 4s (match-string-no-properties 2)) (setq Z (match-string-no-properties 3))) ;; Input for above search is... (when nil (loop for i from ;; 32 to 255 ;; 2208 to 2303 ;; GOOD RANGE: 2208 to 2303 192 to 255 ;; 2240 to 2303 ;; RANGE 192 to 255 plus 2048=2k. do (when (and (not (member i '(34 59 256))) ) (insert (concat "\n ;; " (int-to-string i) " " (string i) " " (int-to-string (+ i 2048)) " " (string (+ i 2048)) )))) ;;; http://www.cs.tut.fi/~jkorpela/ISO-table.html ;; (multibyte-char-to-unibyte 192) ;; (unibyte-char-to-multibyte 192) ;; 192 À 2240 À A octal= "\300" ;; 193 Á 2241 Á A octal= "\301" ;; 194 Â 2242 Â A octal= "\302" ;; 195 Ã 2243 Ã A octal= "\303" ;; 196 Ä 2244 Ä A octal= "\304" ;; 197 Å 2245 Å A octal= "\305" ;; 198 Æ 2246 Æ octal= "\306" ;; 199 Ç 2247 Ç C octal= "\307" ;; 200 È 2248 È E octal= "\310" ;; 201 É 2249 É E octal= "\311" ;; 202 Ê 2250 Ê E octal= "\312" ;; 203 Ë 2251 Ë E octal= "\313" ;; 204 Ì 2252 Ì I octal= "\314" ;; 205 Í 2253 Í I octal= "\315" ;; 206 Î 2254 Î I octal= "\316" ;; 207 Ï 2255 Ï I octal= "\317" ;; 208 Ð 2256 Ð octal= "\320" ;; 209 Ñ 2257 Ñ N octal= "\321" ;; 210 Ò 2258 Ò O octal= "\322" ;; 211 Ó 2259 Ó O octal= "\323" ;; 212 Ô 2260 Ô O octal= "\324" ;; 213 Õ 2261 Õ O octal= "\325" ;; 214 Ö 2262 Ö O octal= "\326" ;; 215 × 2263 × octal= "\327" ;; 216 Ø 2264 Ø octal= "\330" ;; 217 Ù 2265 Ù U octal= "\331" ;; 218 Ú 2266 Ú U octal= "\332" ;; 219 Û 2267 Û U octal= "\333" ;; 220 Ü 2268 Ü U octal= "\334" ;; 221 Ý 2269 Ý Y octal= "\335" ;; 222 Þ 2270 Þ octal= "\336" ;; 223 ß 2271 ß octal= "\337" ;; 224 à 2272 à a octal= "\340" ;; 225 á 2273 á a octal= "\341" ;; 226 â 2274 â a octal= "\342" ;; 227 ã 2275 ã a octal= "\343" ;; 228 ä 2276 ä a octal= "\344" ;; 229 å 2277 å a octal= "\345" ;; 230 æ 2278 æ octal= "\346" ;; 231 ç 2279 ç c octal= "\347" ;; 232 è 2280 è e octal= "\350" ;; 233 é 2281 é e octal= "\351" ;; 234 ê 2282 ê e octal= "\352" ;; 235 ë 2283 ë e octal= "\353" ;; 236 ì 2284 ì i octal= "\354" ;; 237 í 2285 í i octal= "\355" ;; 238 î 2286 î i octal= "\356" ;; 239 ï 2287 ï i octal= "\357" ;; 240 ð 2288 ð o octal= "\360" ;; 241 ñ 2289 ñ n octal= "\361" "" ;; 242 ò 2290 ò o octal= "\362" ;; 243 ó 2291 ó o octal= "\363" (char-to-string 2291) ;; 244 ô 2292 ô o octal= "\364" ;; 245 õ 2293 õ o octal= "\365" ;; 246 ö 2294 ö o octal= "\366" ;; 247 ÷ 2295 ÷ octal= "\367" ;; 248 ø 2296 ø octal= "\370" ;; 249 ù 2297 ù u octal= "\371" ;; 250 ú 2298 ú u octal= "\372" ;; 251 û 2299 û u octal= "\373" ;; 252 ü 2300 ü u octal= "\374" ;; 253 ý 2301 ý y octal= "\375" ;; 254 þ 2302 þ octal= "\376" ;; 255 ÿ 2303 ÿ y octal= "\377" ;; ... (255 "ÿ") (2303 "ÿ")) ) (setq list (append list (list (list (string-to-int 3s) (concat "" 3s ";"))))) (setq list (append list (list (list (string-to-int 4s) (concat "" 3s ";"))))))) list) "ASSOC list to convert accented letter's integer to HTML numeric entity") (defvar lb-assoc-espanol-accented-to-un ;(_makunbound) (let (list 3s 4s Z) (with-temp-buffer (_-ifcl lb-pf-defvar) (goto-char (point-min)) (while (and (sfr lb-re-defvar-accented nil t) (setq 3s (match-string-no-properties 1)) (setq 4s (match-string-no-properties 2)) (setq Z (match-string-no-properties 3))) ;; ... ;; 254 þ 2302 þ ;; 255 ÿ 2303 ÿ y ;; ... (255 "y") (2303 "y")) (setq list (append list (list (list (string-to-int 3s) Z)))) (setq list (append list (list (list (string-to-int 4s) Z)))))) list) "ASSOC list to convert accented letter's integer to unaccented letter") ;; 2007.08.15 - leave unbound! do not use in programs. (when nil ;; (lb-str-espanol-accented-vowels) (defvar lb-str-espanol-accented-vowels ;(_makunbound) nil ;;str) "NO DEFAULT: Use the function instead")) (defun lb-str-espanol-accented-vowels nil "" (let (str) ;; (set-buffer-multibyte t) (loop for list in lb-assoc-espanol-accented-to-un do ;; (set-buffer-multibyte (if (< (nth 0 list) 1000) nil t)) ;; (set-buffer-multibyte (if (< (nth 0 list) 1000) nil t)) (if (string-match (upcase (nth 1 list)) "AEIOU") (setq str (concat str ;; 2007.08.07 ;; (nth 0 list) (string (nth 0 list)) )))) str)) ;; 2007.08.15 - leave unbound! do not use in programs. (when nil ;; (lb-str-espanol-accented-consonants) (defvar lb-str-espanol-accented-consonants ;(_makunbound) nil ;;str) "NO DEFAULT: Use the function instead")) (defun lb-str-espanol-accented-consonants nil "" (let (str) ;; (set-buffer-multibyte t) (loop for list in lb-assoc-espanol-accented-to-un do ;; (set-buffer-multibyte (if (< (nth 0 list) 1000) nil t)) (if (not (string-match (upcase (nth 1 list)) "AEIOU")) (setq str (concat str ;; 2007.08.07 ;; (nth 0 list) (string (nth 0 list)) )))) str)) ) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (progn (defvar lb-re-__-titles ;(_makunbound) (concat "__" "\\(" "TITLE" "\\|" "SUBTITLE" "\\|" "SUBTITLE2" "\\)" "__") "") (defvar lb-re-__-lvl4chunking-skipover ;(_makunbound) (concat "__" "\\(" "AUTHOR" "\\|" "AUTHORS" "\\)" "__") "Paragraphs to skipover") (defvar lb-re-__-lvl-root ;(_makunbound) (concat "\\(" "NUMERIC" "\\|" "ALPHA" "\\)" "_LVL")) (defvar lb-re-__-lvl ;(_makunbound) (concat "__" ;; fix! auto-generate from ~/leninist.biz/__ lb-re-__-lvl-root ;; "\\([0-5]\\)" 1 thru 3: en/1981/PCM336/ ;; "\\([0-5]\\)" 1 thru 2: en/1976/UFPAA244/ ;; 2006.11.23 - Need 3rd level in: en/1976/HCFI758/ ;; 2006.11.23 - WARNING: Profound changes can happen now! ;; "\\([0-2]\\)" "\\([0-9]\\)" "__") "ALPHA or NUMERIC LVL from 0 to 9") (defvar lb-re-__-lvl4chunking ;(_makunbound) (if (string-match "[0-9][-]\\([0-9]\\)" lb-re-__-lvl) (replace-match lbg-max-levels-for-chunking t t lb-re-__-lvl 1) (error "%s: %s" "" "")) "Same as variable without '-real' only '0-' is '1-'") (defvar lb-re-__-lvl4chunking-real ;(_makunbound) (if (string-match "\\(0\\)[-][0-9]" lb-re-__-lvl4chunking) (replace-match "1" t t lb-re-__-lvl4chunking 1) (error "%s: %s" "" "")) "Same as variable without '-real' only '0-' is '1-'") ) ;; fix? ;; How is .pageobjs.tx different from index.txt.log ? (defvar TRIGGER-lb-tx-check-buffer4-trailing-dash ;(_makunbound) "2007-01-30T14:57:21-0800" "If non-nil, only do check after this _-timestamp") (if ;; not good idea - circumvents CSS. nil (defvar lbg-css-html-background-color (with-temp-buffer (insert-file-contents-literally (concat lb-home "default.css")) (search-forward-regexp "^[ \t]*html[^\n]*[{]") (search-forward-regexp "background-color:[ \t]*\\([a-zA-Z]+\\)") (match-string-no-properties 1)) "")) (defvar lbg-lftp-source nil "File to be sourced by lftp; buffer is live until killed by lb-ht") (defvar _-footnote-marker-style nil "SEE _-find-file-hooks-__-globals") (defvar _-where-page-numbers nil "SEE _-find-file-hooks-__-globals") (progn ;; (defvar lb-ext-html ".html" "") (defvar lb-ext-html "" "Was once: html ... no more") (defvar lb-ext-htmm "htmm" "") (defvar lb-ext-tab "tab" "") (defvar lb-ext-log "log" "") ;; fix? how about .txq files? (defvar lb-ext-tx "tx" "") (defvar lb-ext-txt "txt" "") (defvar lb-re-tx-odd-even (concat "\\([0-9][0-9][0-9]\\)" "\\(odd\\|even\\)" "[.]" lb-ext-tx) "") (defvar lb-ext-txlog "log" "") (defvar lb-file-page-objs ".pageobjs.tx" "") ;; fix! ;; Use .tx for internal text format. ;; Use .txt for whatever David Walters wants. (defvar lb-file-txt (concat "index" "." lb-ext-txt)) (defvar lb-file-tx (concat "index" "." lb-ext-tx)) (defvar lb-file-indextab (concat "index" "." lb-ext-tab)) (defvar lb-file-indexhtml (concat "index" ;; "" lb-ext-html ".html" lb-ext-html ) "")) ;; (lb-get-diskfilename ".index.list" "es" t) ;; (lb-get-diskfilename "taz" "en" ) ;; (lb-get-diskfilename "texto" "es" ) ;; (lb-get-diskfilename "autor" "es" ) ;; (lb-get-diskfilename "titulo" "es" ) ;; (lb-get-diskfilename ".index.list" "en" t) ;; (lb-get-diskfilename "title" "en" t) ;; (lb-get-diskfilename "titl" "en" t) ;; (lb-get-diskfilename "t" "en" t) ;; (lb-get-diskfilename "T" "en" t) (defun lb-get-diskfilename (arg1type &optional arg2lang arg3fl-domain arg4fl-fn) " If optional ARG2 is non-nil, use language ARG2 instead of lb-lang. If optional ARG3 is non-nil, prepend '~/DOMAIN/' to return value" ;; (let ( lb-rc) (if (not arg2lang) (setq arg2lang lb-lang)) ;; 2006.12.12 (setq arg1type (downcase arg1type)) (cond ((string= "T" (upcase arg1type)) (setq arg1type "titl")) ((string= "A" (upcase arg1type)) (setq arg1type "auth")) ((string= "Y" (upcase arg1type)) (setq arg1type "year")) ) (cond ((string= "txt" arg1type) (setq arg1type "text")) ) (cond ((string= "title" arg1type) (setq arg1type "titl")) ((string= "author" arg1type) (setq arg1type "auth")) ((string= "ascii" arg1type) (setq arg1type "text")) ) (cond ((string= "titulo" arg1type) (setq arg1type "titl")) ((string= "autor" arg1type) (setq arg1type "auth")) ((string= "ano" arg1type) (setq arg1type "year")) ((string= "correo" arg1type) (setq arg1type "mail")) ((string= "noticias" arg1type) (setq arg1type "news")) ((string= "texto" arg1type) (setq arg1type "text")) ((string= "finanzas" arg1type) (setq arg1type "ledger")) ((string= "porque" arg1type) (setq arg1type "why")) ) (save-match-data (setq lb-rc (if (not (setq lb-rc (cdr (assoc arg2lang (assoc arg1type lb-assoc-htmm))))) (error "%s: %s" "Not found" arg1type) lb-rc))) (if arg3fl-domain (setq lb-rc (concat "~/" lb-domain "/" lb-rc))) (when arg4fl-fn (setq lb-rc (setq lb-rc (file-name-sans-directory lb-rc))) (setq lb-rc (setq lb-rc (file-name-sans-extension lb-rc)))) lb-rc)) (defvar lb-re-roman-numerals-1-9 ;(_makunbound) (concat "\\(" "I" "\\|" "II" "\\|" "III" "\\|" "IV" "\\|" "V" "\\|" "VI" "\\|" "VII" "\\|" "VIII" "\\|" "IX" "\\)" ) "") (defvar lb-re-roman-numerals ;(_makunbound) (concat "\\(" lb-re-roman-numerals-1-9 "\\|" "\\(" "\\(" "X" "\\|XX" "\\|XXX" "\\|XL" "\\|L" "\\|LX" "\\|LXX" "\\|LXXX" "\\|XC" "\\)" "\\(" lb-re-roman-numerals-1-9 "\\)?" "\\)" "\\)" ) "") (defvar lb-list-roman-numerals ;(_makunbound) (progn (setq x (list)) (loop for i in '("" "X" "XX" "XXX" "XL" "L" "LX" "LXX" "LXXX" "XC") do (loop for j in '("" "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX") do (if (> (length (concat i j)) 0) (setq x (append x (list (concat i j))))))) x) "Roman numerals I through XCIX") (defvar lb-assoc-htmm ;(_makunbound) (list ;; fix! ;; Link w/ filenames used in lb.sh. (list ".db.list" ;; (defvar lb-pf-en-dblist (concat lb-home "en/.db.list") ;; "Refreshed by lb.sh") (cons "en" (concat "en/.db.list")) (cons "es" (concat "es/.db.list")) (cons "xx" (concat "en/aaaaaaaa"))) (list ".index.list" ;; (defvar lb-pf-en-indexlist (concat lb-home "en/.index.list") ;; "Refreshed by lb.sh") (cons "en" (concat "en/.index.list")) (cons "es" (concat "es/.index.list")) (cons "xx" (concat "en/aaaaaaaa"))) (list ".index.html.list" ;; (defvar lb-pf-en-index_html_list (concat lb-home "en/.index.html.list") ;; "Refreshed by lb.sh") (cons "en" (concat "en/.index.html.list")) (cons "es" (concat "es/.index.html.list")) (cons "xx" (concat "en/aaaaaaaa"))) ;; ------------------------------------------------------------------ ;; See DEPENDENCIES in lb-mu-make-webpage. (list "multilingual-ledger" (cons "en" (concat "htm/_multilingual-ledger" "."lb-ext-htmm)) (cons "es" (concat "htm/_multilingual-ledger" "."lb-ext-htmm)) (cons "xx" (concat "en/aaaaaaaa" "."lb-ext-htmm))) ;; ------------------------------------------------------------------ (list "aaaaaaaa" (cons "en" (concat "en/aaaaaaaa" "."lb-ext-htmm)) (cons "es" (concat "es/aaaaaaaa" "."lb-ext-htmm)) (cons "xx" (concat "en/aaaaaaaa" "."lb-ext-htmm))) ;; 2006.11.17 - "a" to "A". (list "auth" (cons "en" (concat "en/A" "."lb-ext-htmm)) (cons "es" (concat "es/A" "."lb-ext-htmm)) (cons "xx" (concat "en/A" "."lb-ext-htmm))) (list "book" ;; lbg-bindtype (cons "en" (concat "en/html/htmm/book" "."lb-ext-htmm)) (cons "es" (concat "es/html/htmm/book" "."lb-ext-htmm)) (cons "xx" (concat "es/html/htmm/book" "."lb-ext-htmm))) (list "faq" (cons "en" (concat "en/FAQ" "."lb-ext-htmm)) (cons "es" (concat "es/FAQ" "."lb-ext-htmm)) (cons "xx" (concat "en/FAQ" "."lb-ext-htmm))) (list "html" (cons "en" (concat "en/HTML" "."lb-ext-htmm)) (cons "es" (concat "es/HTML" "."lb-ext-htmm)) (cons "xx" (concat "en/HTML" "."lb-ext-htmm))) ;; Handle manually. Just point it to a page with real content! ;; (list "index" ;; (cons "en" (concat "en/index" "."lb-ext-htmm)) ;; (cons "es" (concat "es/index" "."lb-ext-htmm)) ;; (cons "xx" (concat "en/index" "."lb-ext-htmm))) (list "ledger" (cons "en" (concat "en/Ledger" "."lb-ext-htmm)) (cons "es" (concat "es/Finanzas" "."lb-ext-htmm)) (cons "xx" (concat "en/Ledger" "."lb-ext-htmm))) (list "links" (cons "en" (concat "en/Links" "."lb-ext-htmm)) (cons "es" (concat "es/Links" "."lb-ext-htmm)) (cons "xx" (concat "en/Links" "."lb-ext-htmm))) (list "sitemap" (cons "en" (concat "en/sitemap" "."lb-ext-htmm)) (cons "es" (concat "es/sitemap" "."lb-ext-htmm)) (cons "xx" (concat "en/sitemap" "."lb-ext-htmm))) ;;; (list "mail" ;;; (cons "en" (concat "en/Mail" "."lb-ext-htmm)) ;;; (cons "es" (concat "es/Correo" "."lb-ext-htmm)) ;;; (cons "xx" (concat "en/Mail" "."lb-ext-htmm))) (list "news" (cons "en" (concat "en/News" "."lb-ext-htmm)) (cons "es" (concat "es/Noticias" "."lb-ext-htmm)) (cons "xx" (concat "en/News" "."lb-ext-htmm))) (list "pdf" (cons "en" (concat "en/PDF" "."lb-ext-htmm)) (cons "es" (concat "es/PDF" "."lb-ext-htmm)) (cons "xx" (concat "en/PDF" "."lb-ext-htmm))) (list "ps" (cons "en" (concat "en/PS" "."lb-ext-htmm)) (cons "es" (concat "es/PS" "."lb-ext-htmm)) (cons "xx" (concat "en/PS" "."lb-ext-htmm))) (list "text" (cons "en" (concat "en/Text" "."lb-ext-htmm)) (cons "es" (concat "es/Texto" "."lb-ext-htmm)) (cons "xx" (concat "en/Text" "."lb-ext-htmm))) ;; 2006.11.17 - "t" to "T". ;; 2006.11.17 - Switch over from "title" to "T" (list "titl" ;; fix! index.html is symbolic link to titles page. (cons "en" (concat "en/T" "."lb-ext-htmm)) (cons "es" (concat "es/T" "."lb-ext-htmm)) (cons "xx" (concat "en/T" "."lb-ext-htmm))) (list "T" (cons "en" (concat "en/T" "."lb-ext-htmm)) (cons "es" (concat "es/T" "."lb-ext-htmm)) (cons "xx" (concat "en/T" "."lb-ext-htmm))) (list "TAZ" (cons "en" (concat "en/TAZ" "."lb-ext-htmm)) (cons "es" (concat "es/TAZ" "."lb-ext-htmm)) (cons "xx" (concat "en/TAZ" "."lb-ext-htmm))) (list "taz" (cons "en" (concat "en/TAZ" "."lb-ext-htmm)) (cons "es" (concat "es/TAZ" "."lb-ext-htmm)) (cons "xx" (concat "en/TAZ" "."lb-ext-htmm))) ;; Switch over from "year" to "19". (list "year" (cons "en" (concat "en/19" "."lb-ext-htmm)) (cons "es" (concat "es/19" "."lb-ext-htmm)) (cons "xx" (concat "en/19" "."lb-ext-htmm))) (list "19" (cons "en" (concat "en/19" "."lb-ext-htmm)) (cons "es" (concat "es/19" "."lb-ext-htmm)) (cons "xx" (concat "en/19" "."lb-ext-htmm))) (list "why" (cons "en" (concat "en/Why" "."lb-ext-htmm)) (cons "es" (concat "es/Porque" "."lb-ext-htmm)) (cons "xx" (concat "en/Why" "."lb-ext-htmm))) ) "List of HTMM files, associated by type, by 2-letter language") (defvar lb-list-href-ok-not-file-exist ;(_makunbound) (if nil (list "foobar.html") (list ;;; "ta.html" "tb.html" "tc.html" "td.html" "te.html" "tf.html" "tg.html" ;;; "th.html" "ti.html" "tj.html" "tk.html" ;;; "tl.html" "tm.html" "tn.html" "to.html" "tp.html" ;;; "tq.html" "tr.html" "ts.html" ;;; "tt.html" "tu.html" "tv.html" ;;; "tw.html" "tx.html" "ty.html" "tz.html" "TA" "TB" "TC" "TD" "TE" "TF" "TG" "TH" "TI" "TJ" "TK" "TL" "TM" "TN" "TO" "TP" "TQ" "TR" "TS" "TT" "TU" "TV" "TW" "TX" "TY" "TZ" ;;; "aa.html" "ab.html" "ac.html" "ad.html" "ae.html" "af.html" "ag.html" ;;; "ah.html" "ai.html" "aj.html" "ak.html" ;;; "al.html" "am.html" "an.html" "ao.html" "ap.html" ;;; "aq.html" "ar.html" "as.html" ;;; "at.html" "au.html" "av.html" ;;; "aw.html" "ax.html" "ay.html" "az.html" "AA" "AB" "AC" "AD" "AE" "AF" "AG" "AH" "AI" "AJ" "AK" "AL" "AM" "AN" "AO" "AP" "AQ" "AR" "AS" "AT" "AU" "AV" "AW" "AX" "AY" "AZ" ) ) "") (defvar lb-debug t "") (defvar lb-re-file-rawdata ;(_makunbound) "[.]index$" "") (defvar lb-re-lb-mu-recursive-replace ;(_makunbound) (concat "" ) "") (defvar lb-domain "leninist.biz" ;; fix! Link with /etc/domain* "DOCUMENTATION") (defvar lb-re-domain "[lL]eninist[.][bB]iz" "DOCUMENTATION") (defvar lb-re-flag-libr ;(_makunbound) (concat "\\(" "ysverdlov libr" "\\|" lb-re-domain " libr" "\\|" "IBM T30" "\\)" "") "") ;; fix! ;; See if there's a footnote dependency with previous + excluded section. (defvar lbg-ht-update-section-numbers ;(_makunbound) nil "If non-nil, update HTML for subset of sections") (defvar lb-re-footnote-start ;(_makunbound) ;; Bug fixed! Was missing "~" as in:
~^^1^^ Ibid. (concat "<" "\\(p\\|p[ \t\n][^>]+\\)" ">" "[~ \t\n]*") "") (defvar lb-re-footnote-continued-from-page ;(_makunbound) (concat "__NOTE__" "[ \t]+" "[Ff]ootnote cont\\(inued\\|[.]\\) " "\\(from\\) pa?ge?[.]? ") "Regexp used by lb-ht-footnote-pop-from-next-section") (defvar lb-re-footnote-continued ;(_makunbound) (concat "__NOTE__" "[ \t]+" "[Ff]ootnote cont\\(inued\\|[.]\\) " "\\(on\\|from\\) pa?ge?[.]? \\([0-9]+\\)") "Tagged paragraph to explicitly mark footnote text that crosses pages. Usually a footnote is split in the middle of a sentence; if a footnote is split between pages INBETWEEN paragraphs, this tag is needed, so, use it no matter how a footnote is split across two (or more) pages") (defvar lb-list-files-with-id-poundsigns ;(_makunbound) ;; 2006.11.17 ;; (list "year" "titl") (list "19" ;; fix! "1970" "1971" ... "T" "TA" "TB" "TC" "TD" "TE" "TF" "TG" "TH" "TI" "TJ" "TK" "TL" "TM" "TN" "TO" "TP" "TQ" "TR" "TS" "TT" "TU" "TV" "TW" "TX" "TY" "TZ" "A" "AA" "AB" "AC" "AD" "AE" "AF" "AG" "AH" "AI" "AJ" "AK" "AL" "AM" "AN" "AO" "AP" "AQ" "AR" "AS" "AT" "AU" "AV" "AW" "AX" "AY" "AZ" ) "Webpages with #ZZ999-1999 sub-URLs") (defvar lb-max-chars-who-fields-names ;(_makunbound) (with-temp-buffer (shell-command (concat "cut -f2 " lb-home ;; 2006.11.17 ;; "en/? " ;; 2007.01.29 - see dependencies at top of lb-abbyy.el (if (not (boundp 'lb-lang)) "en" lb-lang) "/" "T?-authors.tab" "| sed 's/[A-Z_]/A/g' | sort | tail -1 " "| awk '{print length($0);}'") t) ;; (message (buffer-string)) (goto-char (point-min)) (if (search-forward-regexp "[0-9]+" nil t) (string-to-int (match-string-no-properties 0)))) "ILLUSTRATOR is longest who-field name") (defvar lb-format-time-string "%Y-%m-%dT%T%z" "For example, to produce full ISO 8601 format, use \"%Y-%m-%dT%T%z\"") (unless (fboundp 'temp-directory) (if (file-exists-p (setq x "/usr/share/emacs/site-lisp/gnuserv/gnuserv-compat.el")) (load-file x))) (defvar lb-page-objs nil ;(_makunbound) "Array of page objects keyed by instance subpath and page") ;; If no "." in lb-file-* then assume ".html" will be added. ;; (defvar lb-file-indexcard "bibl" "") (defvar lb-file-indexcard "index.card" "") (defvar lb-file-book "book" "") (defvar lb-file-index "index" "") (defvar lb-file-db ".db" "") ;; marker bookmark ... perpetual updates. (defvar lb-list-title-nonsignif-first ;(_makunbound) (list ;; fix! ;; Divide by language. ;; fix! ;; Delete /en/.TITLE and/or /es/.TITLE if this var changes. "The" "An" "A" "If" "V.I." "V.~I." "La" "Las" "El" "Los" "V." ;; 2007.02.19 - ~/leninist.biz/en/1977/SOE347 ) "") (defvar lb-pf-__ (concat lb-home "__") "") (defvar lb-str-div-class-notes ;(_makunbound) "