Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Bump version number |
---|---|
Timelines: | family | ancestors | descendants | both | trunk | 0.8.8-20190214 |
Files: | files | file ages | folders |
SHA1: |
3dceb0c3b99ab435cc6744b407bc6f7d |
User & Date: | bernd 2019-02-14 18:50:35.107 |
Context
2019-02-15
| ||
14:12 | Biggest breaches image check-in: 5ab605318d user: bernd tags: trunk | |
2019-02-14
| ||
18:50 | Bump version number check-in: 3dceb0c3b9 user: bernd tags: trunk, 0.8.8-20190214 | |
2019-02-12
| ||
00:03 | Improve conversion to markdown check-in: 3efc821069 user: bernd tags: trunk | |
Changes
Changes to Makefile.in.
︙ | ︙ | |||
44 45 46 47 48 49 50 | $(FORTHLIB) ed25519-donnalib.fs keccaklib.fs threefishlib.fs \ startn2o.fs doc/net2o-logo.png version.fs.in android/net.fs \ android/notify.fs linux/net.fs linux/notify.fs dhtroot.fs dvcs.fs \ qrscan.fs android/qrscan-android.fs linux/qrscan-linux.fs \ doc/net2o-200.png doc/net2o.png json/parser.fs json/g+-schema.fs \ json/g+-import.fs json/fb-schema.fs json/twitter-schema.fs \ json/test.fs json/test.json json/diaspora-schema.fs html/parser.fs \ | | | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | $(FORTHLIB) ed25519-donnalib.fs keccaklib.fs threefishlib.fs \ startn2o.fs doc/net2o-logo.png version.fs.in android/net.fs \ android/notify.fs linux/net.fs linux/notify.fs dhtroot.fs dvcs.fs \ qrscan.fs android/qrscan-android.fs linux/qrscan-linux.fs \ doc/net2o-200.png doc/net2o.png json/parser.fs json/g+-schema.fs \ json/g+-import.fs json/fb-schema.fs json/twitter-schema.fs \ json/test.fs json/test.json json/diaspora-schema.fs html/parser.fs \ xml/parser.fs xml/blogger-atom.fs md-viewer.fs LANGS = lang/en lang/de lang/zh ifeq "$(FAST)" "yes" FORTHLIB += ed25519-donnafast.fs keccakfast.fs threefishfast.fs else SOURCES += ed25519-donnafast.fs keccakfast.fs threefishfast.fs |
︙ | ︙ |
Changes to configure.ac.
︙ | ︙ | |||
11 12 13 14 15 16 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. AC_INIT([net2o], [0.8.8-20190214], [bernd@net2o.de], [net2o], [https://fossil.net2o.de/net2o/reportlist]) AC_PREREQ([2.59]) AC_CONFIG_MACRO_DIR([m4]) AC_USE_SYSTEM_EXTENSIONS LT_INIT AC_MSG_CHECKING([for gforth]) |
︙ | ︙ |
Changes to do.
1 2 3 4 | #!/bin/bash echo "This script builds net2o from scratch" | | | 1 2 3 4 5 6 7 8 9 10 11 12 | #!/bin/bash echo "This script builds net2o from scratch" GFORTH=gforth-0.7.9_20190214 if [ "$(uname -o)" = "Cygwin" ] then CONFOPT="--prefix=/usr $*" else CONFOPT="$*" fi |
︙ | ︙ |
Changes to json/g+-import.fs.
︙ | ︙ | |||
118 119 120 121 122 123 124 | avatars[] $[]# 0= ?EXIT \ nothing to do "avatars" .net2o-cache/ { d: dir } dir $1FF init-dir drop dir [: ." cd " type ." ; sort -k 3 | split -l128 - avatars.sh." ;] $tmp w/o open-pipe throw >r avatars[] ['] $[]. r@ outfile-execute r> close-pipe throw to $? | | | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | avatars[] $[]# 0= ?EXIT \ nothing to do "avatars" .net2o-cache/ { d: dir } dir $1FF init-dir drop dir [: ." cd " type ." ; sort -k 3 | split -l128 - avatars.sh." ;] $tmp w/o open-pipe throw >r avatars[] ['] $[]. r@ outfile-execute r> close-pipe throw to $? dir [: ." cd " type ." ;time eval '(for i in avatars.sh.*; do curl -s $(cat $i) & done; wait)'; #rm avatars.sh.*" ;] $tmp system ; : .avatar-file ( o:author -- addr u ) [: ." avatars/g+:" author:resourceName$ basename type ." .png" ;] $tmp .net2o-cache/ ; : hash-in-avatars ( -- ) authors# [: cell+ $@ drop @ >o |
︙ | ︙ | |||
140 141 142 143 144 145 146 147 148 149 150 151 152 | first-key? IF my-key-default false to first-key? ELSE author:resourceName$ basename author:displayName$ 0 .dummy-key THEN to author:mapped-key ; : +avatar-author ( o:author -- ) author:avatarImageUrl$ dup IF .avatar-file file-status 0= IF drop 2drop ELSE drop [: ." -o g+:" author:resourceName$ basename type ." .png " | > > > > | | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | first-key? IF my-key-default false to first-key? ELSE author:resourceName$ basename author:displayName$ 0 .dummy-key THEN to author:mapped-key ; : .url ( addr u -- ) 2dup "http" string-prefix? 0= IF ." https:" THEN type ; : +avatar-author ( o:author -- ) author:avatarImageUrl$ dup IF .avatar-file file-status 0= IF drop 2drop ELSE drop [: ." -o g+:" author:resourceName$ basename type ." .png " .url ;] $tmp avatars[] $+[]! THEN ELSE 2drop THEN ; : execute>file ( ... xt addr u -- ) r/w create-file throw dup >r outfile-execute r> close-file throw ; |
︙ | ︙ | |||
170 171 172 173 174 175 176 | : .plain ( -- ) comments:content$ html>text ; : .link ( -- ) comments:link{} ?dup-IF cr >o '[' emit link:title$ type ." ](" link:url$ type ')' emit cr o> THEN ; | > > | | | > | | > > | < < | | > > > > > > > > > > > > > > > > > > > > > > > > | | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | : .plain ( -- ) comments:content$ html>text ; : .link ( -- ) comments:link{} ?dup-IF cr >o '[' emit link:title$ type ." ](" link:url$ type ')' emit cr o> THEN ; 0 Value img-req-fid : .mfile { d: fn -- } fn basedir+name pics# #@ 2dup d0= IF 2drop fn .url fn [: .url cr ;] img-req-fid outfile-execute ELSE ." file:" picbase# #@ type THEN ; : .csv-link { d: fn -- } ." " cr ; : .media ( -- ) comments:media{} ?dup-IF cr >o ." ' emit cr o> THEN ; : .album ( -- ) comments:album{} ?dup-IF cr .album:media[] $@ over @ .media:url$ basedir+name pics# #@ d0= IF bounds U+DO I @ >o ." ' emit cr o> cell +LOOP ELSE 2drop last# cell+ $@ 5 umin album# #@ bounds U+DO I $@ .csv-link cell +LOOP THEN THEN ; : .post ( o:comments -- ) ." post:" comments:author{} ..key64 '/' emit ." g+:" comments:url$ basename type ; : .project ( o:comments -- ) comments:author{} .key-pk@ type ." g+:" comments:url$ basename type ; : .author ( o:author -- ) ." +[" author:displayName$ type ." ](key:" .key64 ." )" ; : .reshared ( o:comments -- ) comments:resharedPost{} ?dup-IF cr >o ." > " comments:author{} ?dup-IF ..author ." : " THEN '[' emit comments:content$ ['] html>text $tmp $40 umin .simple-text ." ](" .post ') emit cr cr .html .link .media .album o> THEN ; : .choice ( total o:choices -- ) '#' emit choices:voteCount# 0 .r '/' emit 0 .r ." #  " choices:votes[] $@ bounds U+DO I @ .votes:voter{} ..author space cell +LOOP ; : .polls ( o:comments -- ) comments:poll{} ?dup-IF cr >o poll:choices[] $@ bounds U+DO poll:totalVotes# I @ ..choice cr cell +LOOP o> THEN ; : .com/col ( o:collection -- ) cr collectionAttachment:displayName$ ." [](chat:g+:" type collectionAttachment:owner{} ?dup-IF '@' emit ..key64 THEN ')' emit ; : .collection ( o:comments -- ) comments:collectionAttachment{} ?dup-IF ..com/col THEN ; : .community ( o:comments -- ) comments:communityAttachment{} ?dup-IF ..com/col THEN ; : add-file { dvcs d: file -- } [: .html .link .media .reshared .album .polls .collection .community ;] file execute>file file dvcs .dvcs-add ; Variable pfile$ : $pfile ( xt -- addr u ) pfile$ $free pfile$ $exec pfile$ $@ ; : post-file ( -- ) [: ." post-" project:project$ $. ." .md" ;] $pfile ; |
︙ | ︙ | |||
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | dvcs-o add-comments dvcs-o .dvcs:dispose-dvcs create>never dvcs-o add-collection dir> redate-mode off ; : write-articles ( -- ) { | nn } entries[] $@ bounds ?DO nn [: ." write " 6 .r ." postings" ;] warning-color color-execute #-21 0 at-deltaxy I @ .write-out-article 1 +to nn cell +LOOP nn [: ." write " 6 .r ." postings in " .time ;] success-color color-execute cr ; [IFUNDEF] json-load-dir forward json-load-dir [THEN] | > > | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | dvcs-o add-comments dvcs-o .dvcs:dispose-dvcs create>never dvcs-o add-collection dir> redate-mode off ; : write-articles ( -- ) { | nn } "img-req.lst" w/o create-file throw to img-req-fid entries[] $@ bounds ?DO nn [: ." write " 6 .r ." postings" ;] warning-color color-execute #-21 0 at-deltaxy I @ .write-out-article 1 +to nn cell +LOOP img-req-fid close-file throw 0 to img-req-fid nn [: ." write " 6 .r ." postings in " .time ;] success-color color-execute cr ; [IFUNDEF] json-load-dir forward json-load-dir [THEN] |
︙ | ︙ |
Changes to json/g+-schema.fs.
︙ | ︙ | |||
210 211 212 213 214 215 216 | I @ >o recurse o> cell +LOOP comments:plusOnes[] $@ bounds U+DO I @ >o addr plusOnes:plusOner{} dedup-author o> cell +LOOP comments:reshares[] $@ bounds U+DO I @ >o addr reshares:resharer{} dedup-author o> | | > > > > > > > > > > | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | I @ >o recurse o> cell +LOOP comments:plusOnes[] $@ bounds U+DO I @ >o addr plusOnes:plusOner{} dedup-author o> cell +LOOP comments:reshares[] $@ bounds U+DO I @ >o addr reshares:resharer{} dedup-author o> cell +LOOP comments:poll{} ?dup-IF .poll:choices[] $@ bounds U+DO I @ .choices:votes[] $@ bounds U+DO I @ >o addr votes:voter{} dedup-author o> cell +LOOP cell +LOOP THEN comments:collectionAttachment{} ?dup-IF >o addr collectionAttachment:owner{} dedup-author o> THEN ; : g+-scan ( -- ) iso-date ['] g+ >body to schema-scope g+:comments-class to outer-class ['] g+:comments >body to schema-wid ['] dedup-authors is process-element ; |
︙ | ︙ |
Added md-viewer.fs.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | \ net2o GUI, markdown viewer \ Copyright (C) 2019 Bernd Paysan \ This program is free software: you can redistribute it and/or modify \ it under the terms of the GNU Affero General Public License as published by \ the Free Software Foundation, either version 3 of the License, or \ (at your option) any later version. \ This program is distributed in the hope that it will be useful, \ but WITHOUT ANY WARRANTY; without even the implied warranty of \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \ GNU Affero General Public License for more details. \ You should have received a copy of the GNU Affero General Public License \ along with this program. If not, see <http://www.gnu.org/licenses/>. \ Inspiration: wf.fs, a markdown-like parser, which converts to HTML Defer .char Variable md-text$ Variable last-cchar Variable last-emph-flags Variable emph-flags \ emphasis flags Variable up-emph Variable count-emph Variable us-state 0 Value p-box \ paragraph box 0 Value v-box \ vertical box 1 7 bits italic underline 2underline sitalic bold mono strikethrough : +emphs ( flags -- ) \regular \sans dup [ underline 2underline or ]L and 2/ us-state ! dup strikethrough and 4 rshift us-state +! dup mono and IF \mono THEN [ italic sitalic bold or or ]L and dup 1 and swap 3 rshift xor case 1 of \italic endof 2 of \bold endof 3 of \bold-italic endof endcase ; : .md-text ( -- ) us-state @ md-text$ $@ }}text-us p-box .+childs md-text$ $free ; : default-char ( char -- ) emph-flags @ last-emph-flags @ over last-emph-flags ! <> IF .md-text emph-flags @ +emphs THEN md-text$ c$+! last-cchar off ; ' default-char is .char Create do-char $100 0 [DO] ' .char , [LOOP] : md-char ( xt "char" -- ) char cells do-char + ! ; : md-char: ( "char" -- ) depth >r :noname depth r> - 1- roll md-char ; : ?count-emph ( flag char -- ) last-cchar @ over last-cchar ! <> IF count-emph off emph-flags @ and 0= up-emph ! ELSE 1 count-emph +! drop THEN ; md-char: * ( char -- ) [ sitalic bold or ]L swap ?count-emph sitalic up-emph @ 0= IF negate THEN emph-flags +! ; md-char: _ ( char -- ) [ italic underline 2underline or or ]L swap ?count-emph italic up-emph @ 0= IF negate THEN emph-flags +! ; md-char: ` ( char -- ) mono swap ?count-emph count-emph @ 2 = IF mono up-emph @ 0= IF negate THEN emph-flags +! THEN ; md-char: ~ ( char -- ) strikethrough swap ?count-emph count-emph @ 1 = IF strikethrough up-emph @ 0= IF negate THEN emph-flags +! THEN ; md-char: \ ( char -- ) drop source >in @ /string IF c@ .char 1 >in +! ELSE drop ( add line break ) THEN ; : render-line ( addr u -- ) \G render a line 0 +emphs bounds U+DO I c@ dup cells do-char + perform LOOP .md-text ; : >indent ( n -- ) >in @ + 2/ 4 * spaces ; scope: markdown \ headlines limited to h1..h3 : # ( -- ) source 2dup + 2 - 2 " #" str= -2 and + \huge \bold \sans render-line \normal \regular ; : ## ( -- ) source 2dup + 3 - 3 " ##" str= -3 and + \large \bold \sans render-line \normal \regular ; : ### ( -- ) source 2dup + 4 - 4 " ###" str= -4 and + \normal \bold \sans render-line \normal \regular ; : 1. ( -- ) \ render counted line -3 >indent ; synonym 2. 1. synonym 3. 1. synonym 4. 1. synonym 5. 1. synonym 6. 1. synonym 7. 1. synonym 8. 1. synonym 9. 1. : * ( -- ) -2 >indent \ "•‒⋆‧" ; synonym + * synonym - * synonym ± * }scope : +p-box ( -- ) {{ }}p dup v-box .+childs .subbox to p-box ; : markdown-loop ( -- ) BEGIN refill WHILE source nip 0= IF p-box ?dup-IF .subbox .par-init THEN +p-box ELSE parse-name ['] markdown >body find-name-in ?dup-IF name?int execute ELSE >in off source render-line THEN THEN REPEAT ; : markdown-parse ( addr u -- ) {{ }}v to v-box +p-box ['] markdown-loop execute-parsing-named-file ; \\\ Local Variables: forth-local-words: ( (("md-char:") definition-starter (font-lock-keyword-face . 1) "[ \t\n]" t name (font-lock-function-name-face . 3)) ) forth-local-indent-words: ( (("md-char:") (0 . 2) (0 . 2) non-immediate) ) End: [THEN] |
Changes to tools.fs.
︙ | ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | \ enum : enum ( n "name" -- n+1 ) dup Constant 1+ ; : enums ( start n "name1" .. "namen" -- ) 0 ?DO enum LOOP drop ; : bit ( n "name" -- n*2 ) dup Constant 2* ; \ argument handling that works transparent from OS and Forth command line user-o arg-o object uclass arg-o umethod ?nextarg | > > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | \ enum : enum ( n "name" -- n+1 ) dup Constant 1+ ; : enums ( start n "name1" .. "namen" -- ) 0 ?DO enum LOOP drop ; : bit ( n "name" -- n*2 ) dup Constant 2* ; : bits ( start n "name1" .. "namen" -- ) 0 ?DO bit LOOP drop ; \ argument handling that works transparent from OS and Forth command line user-o arg-o object uclass arg-o umethod ?nextarg |
︙ | ︙ |
Changes to wiki/commands.md.
1 2 | # Commands # | | | 1 2 3 4 5 6 7 8 9 10 | # Commands # Version 0.8.8-20190214. net2o separates data and commands. Data is passed through to higher layers, commands are interpreted when they arrive. For connection requests, a special bit is set, and the address then isn't used as address, but as IV for the opportunistic encoding. The command interpreter is a stack machine with two data types: 64 |
︙ | ︙ |