( Oh time thy pyramids ) |a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |b0 @File2 &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |100 @on-reset ( -> ) ( | clear old copies ) ;dict/journal-path .File2/name DEO2 [ LIT2 01 -File2/delete ] DEO ( | setup output ) [ LIT2 01 -File2/append ] DEO #0001 .File2/length DEO2 ( | lexicon ) ;dict/sitemap-path .File2/name DEO2 [ LIT2 01 -File2/delete ] DEO ;dict/ul-tag ;dict/ul-tag ( | diary ) ;dict/calendar-path .File2/name DEO2 [ LIT2 01 -File2/delete ] DEO ;header-txt ;dict/p-tag ;dict/p-tag ( | print next available id ) ;dict/available-txt / find-available #0a18 DEO ( | halt. ) #800f DEO BRK ( @|lexicon ) @ ( addr* length* path* -- ) .File/name DEO2 DUP2 .File/length DEO2 SWP2 .File/read DEO2 ( check for size ) .File/success DEI2 NEQ2 ?{ .File/name DEI2 ! } JMP2r @ ( -- ) ;lexicon ( load ) DUP2 #2000 ;dict/lexicon-path ( swap ) DUP2 #0a00 ( range ) .File/success DEI2 ADD2k NIP2 SWP2 &>l ( -- ) INC2 INC2 ( | do incoming ) DUP2 #0001 SUB2 LDA [ LIT "? ] EQU ?{ DUP2 } scap/ INC2 GTH2k ?&>l POP2 POP2 ( | sitemap ) ;dict/sitemap-path .File2/name DEO2 ( start at home ) ;lexicon POP2 JMP2r @ ( addr* -- next* ) ( | take depth ) LDAk STH ( | name ) ;dict/li-tag INC2 INC2 DUP2 ;dict/li-tag #0a scap/ INC2 ( | children ) LDAk STHkr INC NEQ ?{ ;dict/ul-tag ;dict/ul-tag } ( | sibling ) LDAk STHkr EQU ?{ POPr JMP2r } POPr ! @ ( src* -- ) DUP2 ;&term ;&term [ LIT2 20 "_ ] ;dict/htm-ext ;&term scap/ ( res ) get-workarea-length ;&htm-path ,&src STR2 ;workarea .File/success DEI2 ADD2k NIP2 SWP2 &>l ( -- ) ;dict/href-attr OVR2 sseg #00 EQU ?{ [ LIT2 &src $2 ] OVR2 #0006 ADD2 } INC2 GTH2k ?&>l POP2 POP2 JMP2r &htm-path [ "src/htm/ &term $30 ] @ ( src* link* -- ) ( external ) ;dict/http-txt OVR2 sseg ?&end ( hash ) LDAk [ LIT "# ] EQU ?&end ( rel ) LDAk [ LIT ". ] EQU ?&end ( | find broken links ) DUP2 ;&buf ;&buf [ LIT2 "_ 20 ] ;&buf find-term INC2 ORA ?{ ;dict/redlink / ;&buf / ;dict/in / OVR2 #010f DEO BRK } DUP2 ;&term ;&term [ LIT2 20 "_ ] ( res ) ;&map-path .File2/name DEO2 OVR2 #0a &end ( -- ) POP2 POP2 JMP2r &buf $30 &map-path [ "tmp/map- &term $30 ] @find-term ( link* -- term* ) ,&t STR2 ;lexicon &>w ( -- ) INC2 INC2 DUP2 [ LIT2 &t $2 ] scmp ?&end scap/ INC2 LDAk ?&>w POP2 #ffff &end ( -- term* ) JMP2r ( @|diary ) @ ( -- ) #4000 .File/length DEO2 ;diary-path-pages/end ;diary-path-pages &>l ( -- ) LDA2k get-workarea-length ROT2 #0000 ( to* from* ) ;workarea .File/success DEI2 ADD2 ( cap ) STA2k NIP2 ;workarea INC2 INC2 GTH2k ?&>l POP2 POP2 JMP2r @ ( to* from* -- ) DUP2 #0a00 &>l ( -- ) INC2 GTH2k ?&>l POP2 POP2 JMP2r @ ( line* -- next* ) DUP2k #000a ADD2 ;&term ( | does it exists? ) ;&term find-term INC2 ORA ?{ ;dict/warn-unknown DUP2 / #0a18 DEO } ;&term [ LIT2 20 "_ ] ( res ) ;&log-path .File2/name DEO2 #0a ( split ) DUP2 #0900 DUP2 set-diary ( event ) DUP2 #0005 ADD2 LDA [ LIT "+ ] NEQ ?{ DUP2 } ;dict/no-photo OVR2 #0006 ADD2 scmp ?{ DUP2 } ( eol ) scap/ INC2 scap/ INC2 !scap/ &log-path [ "tmp/log- &term $30 ] @ ( event* -- ) ( | add to calendar ) ;dict/calendar-path .File2/name DEO2 ( year ) LDAk2 ,&last LDR2 EQU2 ?{ ;dict/br-tag LDA2k ,&last STR2 } ( | date ) ;dict/code-tag DUP2 #0005 ;dict/code-tag #20 scap/ INC2 ( | term ) DUP2 ;dict/spacer scap/ INC2 ( | name ) ;dict/br-tag #0a ! &last "17 $1 @ ( photo* -- ) ( | limit to 20 entries ) [ LIT2 &len $2 ] #0020 LTH2 ?{ POP2 JMP2r } ;dict/journal-path .File2/name DEO2 DUP2 #0006 ADD2 ,&pict STR2 #000a ADD2 DUP2 ,&term STR2 scap/ INC2 ,&title STR2 ;dict/figure-tag ( src ) [ LIT2 &pict $2 ] ( alt ) [ LIT2 &title $2 ] ;dict/figcaption-tag [ LIT2 &term $2 ] ;dict/spacer ,&title LDR2 ;dict/figcaption-tag ;dict/figure-tag ,&len LDR2 INC2 ,&len STR2 #0a ! @get-workarea-length ( -- buf* length* ) ;workarea #0000 ;workarea SUB2 JMP2r ( @|validate ) @set-diary ( log* -- ) ( | validate photo id ) #0006 ADD2 sdec ORAk ?{ POP2 JMP2r } DUP2 get-diary ?{ ( bit ) #01 OVR #07 AND #40 SFT SFT STH ( res ) #03 SFT2 ;diaries ADD2 LDAk STHr ORA ROT ROT STA JMP2r } ;dict/warn-duplicate / #0a18 DEO JMP2r @get-diary ( id* -- mask ) ( bit ) #01 OVR #07 AND #40 SFT SFT STH ( res ) #03 SFT2 ;diaries ADD2 LDA STHr AND JMP2r @find-available ( -- id* ) #0001 &>w ( -- ) DUP2 get-diary ?{ JMP2r } INC2 !&>w ( @|framework ) @ ( name* -- ) [ LIT "< ] [ LIT "> ] ! @ ( name* -- ) [ LIT "< ] [ LIT "/ ] [ LIT "> ] ! @ ( src* alt* -- ) ;&a ;&b ;&c ! &a " $1 @ ( str* -- ) ;&a DUP2 ;&b ;&c ! &a " $1 &c " $1 @ ( str* -- ) LDAk [ LIT "_ ] OVR #20 NEQ [ JMP SWP POP ] INC2 LDAk ? POP2 JMP2r @ ( str* -- ) DUP2 scap/ OVR2 SUB2 ( >> ) @ ( str* len* -- ) .File2/length DEO2 .File2/write DEO2 ( restore ) #0001 .File2/length DEO2 JMP2r @ ( chr -- ) ;&b STA ;&b .File2/write DEO2 JMP2r &b $1 ( @|stdlib ) @ ( str* a b -- ) ,&b STR ,&a STR &>w ( -- ) LDAk [ LIT &a $1 ] NEQ ?{ STH2k [ LIT &b $1 ] STH2r STA } INC2 LDAk ?&>w POP2 JMP2r @sdec ( str* -- val* ) [ LIT2r 0000 ] &>w ( -- ) LIT2r 000a MUL2r LITr 00 LDAk #30 SUB STH ADD2r INC2 LDAk ?&>w POP2 STH2r JMP2r @sseg ( a* b* -- f ) STH2 &>l ( a* -- f ) LDAk LDAkr STHr NEQ ?{ INC2k LDA #00 EQU ?{ INC2 INC2r !&>l } } LDA LDAr STHr EQU JMP2r @ ( src* dst* -- ) STH2 &>w ( -- ) LDAk STH2kr STA INC2r INC2 LDAk DUP #1f GTH SWP LIT ". NEQ AND ?&>w POP2 #00 STH2r STA JMP2r @scmp ( a* b* -- f ) STH2 &>l ( -- ) LDAk ?{ &d LDA LDAr STHr EQU JMP2r } LDAk LDAkr STHr NEQ ?&d INC2 INC2r !&>l @scap ( str* -- end* ) INC2 & LDAk ?scap JMP2r @ ( hex* -- ) SWP /b &b ( b -- ) DUP #04 SFT /c &c ( c -- ) #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO JMP2r @ ( str* -- ) &>w ( -- ) LDAk #18 DEO INC2 & LDAk ?&>w POP2 JMP2r @ ( str* -- ) / #0a18 DEO JMP2r @ ( short* -- ) #2710 [ LIT2r 00fb ] &>w ( -- ) DIV2k #000a DIV2k MUL2 SUB2 SWPr EQUk OVR STHkr EQU AND ?{ DUP LIT "0 ADD #18 DEO INCr } POP2 #000a DIV2 SWPr INCr STHkr ?&>w POP2r POP2 POP2 JMP2r ( @|assets ) @dict &no-photo "000 $1 &spacer 20 "— 20 $1 &journal-path "src/htm/journal.htm $1 &http-txt "http $1 &htm-ext ".htm $1 &p-tag "p $1 &ul-tag "ul $1 &li-tag "li $1 &br-tag "br $1 &code-tag "code $1 &figure-tag "figure $1 &figcaption-tag "figcaption $1 &href-attr "href $1 &lexicon-path "src/tables/lexicon $1 &sitemap-path "src/htm/sitemap.htm $1 &calendar-path "src/htm/calendar.htm $1 &redlink "!! 20 "Redlink: 20 $1 &available-txt ".. 20 "Available 20 "diary: 20 $1 &warn-duplicate "-- 20 "Duplicate 20 "diary: 20 $1 &warn-unknown "-- 20 "Unknown 20 "diary: 20 $1 &in 20 "in 20 $1 @diary-paths &3 "src/tables/diary/15-19 $1 &2 "src/tables/diary/10-14 $1 &1 "src/tables/diary/05-09 $1 &0 "src/tables/diary/00-04 $1 @diary-path-pages =diary-paths/3 =diary-paths/2 =diary-paths/1 =diary-paths/0 &end @header-txt [ 3c68 323e 5468 6520 4361 6c65 6e64 6172 2073 686f 7773 2075 7063 6f6d 696e 6720 616e 6420 7061 7374 2065 7665 6e74 7320 6672 6f6d 2074 6865 206a 6f75 726e 616c 2e3c 2f68 323e 0a0a 3c70 3e54 6869 7320 7769 6b69 2075 7365 7320 7468 6520 3c61 2068 7265 663d 2761 7276 656c 6965 2e68 746d 6c27 3e41 7276 656c 6965 3c2f 613e 2074 696d 6520 666f 726d 6174 2c20 7768 6572 6520 7468 6520 7965 6172 2069 7320 6469 7669 6465 6420 696e 2032 3620 7065 7269 6f64 732c 206f 7220 3c69 3e6d 6f6e 7468 733c 2f69 3e2c 206f 6620 3134 2064 6179 732c 206e 756d 6265 7265 6420 6672 6f6d 2041 2074 6f20 5a2e 2054 6865 2069 6e69 7469 616c 206c 6f67 6769 6e67 2079 6561 7220 616e 6420 7468 6520 4172 7665 6c69 6520 6461 7465 7320 636f 756e 7420 7570 7761 7264 2066 726f 6d20 3230 3036 2e20 596f 7520 6361 6e20 7365 6520 6d6f 7265 2075 7064 6174 6573 2069 6e20 7468 6520 3c61 2068 7265 663d 276a 6f75 726e 616c 2e68 746d 6c27 3e6a 6f75 726e 616c 3c2f 613e 2061 6e64 203c 6120 6872 6566 3d27 6e6f 772e 6874 6d6c 273e 6e6f 773c 2f61 3e20 7061 6765 733c 2f70 3e0a 0a00 ] ( @|memory ) @lexicon $2000 @diaries $100 @workarea