SMOLNET PORTAL home about changes
iimprove tttml-html qualityness and replace markup->tttml again - tttml - converters for a simpler syntax than markdown	Err	bitreich.org	70
hgit clone git://bitreich.org/tttml git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tttml	URL:git://bitreich.org/tttml git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tttml	bitreich.org	70
1Log	/scm/tttml/log.gph	bitreich.org	70
1Files	/scm/tttml/files.gph	bitreich.org	70
1Refs	/scm/tttml/refs.gph	bitreich.org	70
1Tags	/scm/tttml/tag	bitreich.org	70
1README	/scm/tttml/file/README.gph	bitreich.org	70
i---	Err	bitreich.org	70
1commit 83b0368ca37208587a5abadefd12628d80374ab4	/scm/tttml/commit/83b0368ca37208587a5abadefd12628d80374ab4.gph	bitreich.org	70
1parent fd08ceaed88288f846c89bbb7b191379064625ee	/scm/tttml/commit/fd08ceaed88288f846c89bbb7b191379064625ee.gph	bitreich.org	70
hAuthor: Josuah Demangeon <mail@josuah.net>	URL:mailto:mail@josuah.net	bitreich.org	70
iDate:   Fri, 11 May 2018 19:57:26 +0200	Err	bitreich.org	70
i	Err	bitreich.org	70
iimprove tttml-html qualityness and replace markup->tttml again	Err	bitreich.org	70
i	Err	bitreich.org	70
iIn awk, even if a match() happen in an external funciton, it sets	Err	bitreich.org	70
iRLENGTH an friends, so these variables needs to be saved before	Err	bitreich.org	70
icalling other functions.	Err	bitreich.org	70
i	Err	bitreich.org	70
i        match(string, /patttttern/);	Err	bitreich.org	70
i        match_inside™();	Err	bitreich.org	70
i        substr(string, 1, RLENGTH);	Err	bitreich.org	70
i	Err	bitreich.org	70
ibecomes:	Err	bitreich.org	70
i	Err	bitreich.org	70
i        match(string, /patttttern/);	Err	bitreich.org	70
i        len = RLENGTH;	Err	bitreich.org	70
i        match_inside™();	Err	bitreich.org	70
i        substr(string, 1, len);	Err	bitreich.org	70
i	Err	bitreich.org	70
iDiffstat:	Err	bitreich.org	70
i  M Makefile                            |       2 +-	Err	bitreich.org	70
i  M README                              |      56 ++++++++++++++++----------------	Err	bitreich.org	70
i  M tttml-gopher                        |       2 +-	Err	bitreich.org	70
i  M tttml-html                          |      24 +++++++++++++++++++-----	Err	bitreich.org	70
i  M tttml.5                             |      10 +++++-----	Err	bitreich.org	70
i	Err	bitreich.org	70
i5 files changed, 54 insertions(+), 40 deletions(-)	Err	bitreich.org	70
i---	Err	bitreich.org	70
1diff --git a/Makefile b/Makefile	/scm/tttml/file/Makefile.gph	bitreich.org	70
i@@ -5,7 +5,7 @@ MAN5        = tttml.5	Err	bitreich.org	70
i all:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i README: Makefile $(MAN1) $(MAN5)	Err	bitreich.org	70
i-        mandoc -T utf8 $(MAN5) $(MAN1) | col -bx >$@	Err	bitreich.org	70
i+        mandoc -T ascii $(MAN5) $(MAN1) | col -bx >$@	Err	bitreich.org	70
i 	Err	bitreich.org	70
i install:	Err	bitreich.org	70
i         mkdir -p $(PREFIX)/bin	Err	bitreich.org	70
1diff --git a/README b/README	/scm/tttml/file/README.gph	bitreich.org	70
i@@ -1,14 +1,14 @@	Err	bitreich.org	70
i-MARKUP(5)                     File Formats Manual                    MARKUP(5)	Err	bitreich.org	70
i+TTTML(5)                      File Formats Manual                     TTTML(5)	Err	bitreich.org	70
i 	Err	bitreich.org	70
i NAME	Err	bitreich.org	70
i-     markup  simpler markup syntax than markdown	Err	bitreich.org	70
i+     tttml - simpler markup syntax than markdown	Err	bitreich.org	70
i 	Err	bitreich.org	70
i SYNOPSIS	Err	bitreich.org	70
i-     markup.md	Err	bitreich.org	70
i+     file.md	Err	bitreich.org	70
i 	Err	bitreich.org	70
i DESCRIPTION	Err	bitreich.org	70
i-     The markup format is a very simple format for writiing text that look	Err	bitreich.org	70
i-     good enough to be published without conversion.  It lacks the markdown	Err	bitreich.org	70
i+     The tttml format is a very simple format for writiing text that look good	Err	bitreich.org	70
i+     enough to be published without conversion.  It lacks the markdown	Err	bitreich.org	70
i      recursive syntax (such as recursive lists anb quotes) which also remove	Err	bitreich.org	70
i      markdown ambiguities.  Each block of text is separated from anotherone by	Err	bitreich.org	70
i      an empty line.	Err	bitreich.org	70
i@@ -20,22 +20,22 @@ DESCRIPTION	Err	bitreich.org	70
i 	Err	bitreich.org	70
i                 Second paragraph of text.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-     title   Block that ends by a line with only =:	Err	bitreich.org	70
i+     title   Block that ends by a line with only `=':	Err	bitreich.org	70
i 	Err	bitreich.org	70
i                 Title can therefore have multiple lines if required	Err	bitreich.org	70
i                 although it is not advised.	Err	bitreich.org	70
i                 ======================================================	Err	bitreich.org	70
i 	Err	bitreich.org	70
i      heading	Err	bitreich.org	70
i-             Block that ends with a line with only -:	Err	bitreich.org	70
i+             Block that ends with a line with only `-':	Err	bitreich.org	70
i 	Err	bitreich.org	70
i                 Heading can also have multiple lines	Err	bitreich.org	70
i                 ------------------------------------------------------	Err	bitreich.org	70
i 	Err	bitreich.org	70
i      subheading	Err	bitreich.org	70
i-             Block with a single line with at least 3 leading # characters	Err	bitreich.org	70
i+             Block with a single line with at least 3 leading `#' characters	Err	bitreich.org	70
i              starting at subheading and going down the outline (subheading,	Err	bitreich.org	70
i-             subsubheading ...) every time an additionnal # is added:	Err	bitreich.org	70
i+             subsubheading ...) every time an additionnal `#' is added:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i                 ### Subheading	Err	bitreich.org	70
i 	Err	bitreich.org	70
i@@ -56,7 +56,7 @@ DESCRIPTION	Err	bitreich.org	70
i 	Err	bitreich.org	70
i                 - Note that multi-paragraph lists are not handled	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-     quote   Block that has a leading > on every line:	Err	bitreich.org	70
i+     quote   Block that has a leading `>' on every line:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i                 > Mail-style quoting.  Note that nested quotes	Err	bitreich.org	70
i                 > are not handled.	Err	bitreich.org	70
i@@ -71,14 +71,14 @@ DESCRIPTION	Err	bitreich.org	70
i      link    Block that start with a label line and eventual subsequent	Err	bitreich.org	70
i              description lines:	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-                [label]: git://josuah.net/git/markup.git	Err	bitreich.org	70
i-                git repository for the markup set of tools	Err	bitreich.org	70
i+                [label]: git://josuah.net/git/tttml	Err	bitreich.org	70
i+                git repository for the tttml set of tools	Err	bitreich.org	70
i 	Err	bitreich.org	70
i                 [label2]: /url/without/description.txt	Err	bitreich.org	70
i 	Err	bitreich.org	70
i SEE ALSO	Err	bitreich.org	70
i      smu(1), simple markup - markdown like syntax:	Err	bitreich.org	70
i-           https://github.com/Gottox/smu	Err	bitreich.org	70
i+     https://github.com/Gottox/smu	Err	bitreich.org	70
i 	Err	bitreich.org	70
i AUTHORS	Err	bitreich.org	70
i      Josuah Demangeon <mail@josuah.net>	Err	bitreich.org	70
i@@ -90,7 +90,7 @@ OpenBSD 6.3                     April 19, 2018                     OpenBSD 6.3	Err	bitreich.org	70
i TTTML-FMT(1)                General Commands Manual               TTTML-FMT(1)	Err	bitreich.org	70
i 	Err	bitreich.org	70
i NAME	Err	bitreich.org	70
i-     tttml-fmt  format/pretty-print a tttml file	Err	bitreich.org	70
i+     tttml-fmt - format/pretty-print a tttml file	Err	bitreich.org	70
i 	Err	bitreich.org	70
i SYNOPSIS	Err	bitreich.org	70
i      tttml-fmt [file...]	Err	bitreich.org	70
i@@ -102,22 +102,22 @@ DESCRIPTION	Err	bitreich.org	70
i      Most markdown documents can be converted to tttml(5) with if they do not	Err	bitreich.org	70
i      have recursive elents such as nested lists or nested quotes.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           The paragraphs are being filled to 80 columns,	Err	bitreich.org	70
i+     o       The paragraphs are being filled to 80 columns,	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           The empty lines are set as apropriate	Err	bitreich.org	70
i+     o       The empty lines are set as apropriate	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           The blocks merged together are separated, such as lists without	Err	bitreich.org	70
i+     o       The blocks merged together are separated, such as lists without	Err	bitreich.org	70
i              separating blank spaces.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           The title and heading horizontal lines are expanded to 80	Err	bitreich.org	70
i+     o       The title and heading horizontal lines are expanded to 80	Err	bitreich.org	70
i              columns.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           The tags with the tagline merged with the paragraph are separated	Err	bitreich.org	70
i+     o       The tags with the tagline merged with the paragraph are separated	Err	bitreich.org	70
i              on their own line.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i SEE ALSO	Err	bitreich.org	70
i      tttml-gopher(1), smu(1), tttml(5), simple tttml - markdown like syntax:	Err	bitreich.org	70
i-           https://github.com/Gottox/smu	Err	bitreich.org	70
i+     https://github.com/Gottox/smu	Err	bitreich.org	70
i 	Err	bitreich.org	70
i AUTHORS	Err	bitreich.org	70
i      Josuah Demangeon <mail@josuah.net>	Err	bitreich.org	70
i@@ -129,7 +129,7 @@ OpenBSD 6.3                     April 19, 2018                     OpenBSD 6.3	Err	bitreich.org	70
i TTTML-GOPHER(1)             General Commands Manual            TTTML-GOPHER(1)	Err	bitreich.org	70
i 	Err	bitreich.org	70
i NAME	Err	bitreich.org	70
i-     tttml-gopher  generate a gophermap from a tttml file	Err	bitreich.org	70
i+     tttml-gopher - generate a gophermap from a tttml file	Err	bitreich.org	70
i 	Err	bitreich.org	70
i SYNOPSIS	Err	bitreich.org	70
i      tttml-gopher host port [file...]	Err	bitreich.org	70
i@@ -140,17 +140,17 @@ DESCRIPTION	Err	bitreich.org	70
i      rest.  host and port is used to set the host in links that do not have a	Err	bitreich.org	70
i      host, such as /path/to/file.txt	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           All URI starting with a / and ending with a / are printed	Err	bitreich.org	70
i-             using the 1 entry type	Err	bitreich.org	70
i+     o       All URI starting with a `/' and ending with a `/' are printed	Err	bitreich.org	70
i+             using the `1' entry type	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           All URI starting with a / and not ending with a / are printed	Err	bitreich.org	70
i-             using the 0	Err	bitreich.org	70
i+     o       All URI starting with a `/' and not ending with a `/' are printed	Err	bitreich.org	70
i+             using the `0'	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           All URI starting with 0, 1, 7, 8, 9, a, g, h or	Err	bitreich.org	70
i-             I followed by a / and all gopher:// URI are printed using	Err	bitreich.org	70
i+     o       All URI starting with `0', `1', `7', `8', `9', `a', `g', `h' or	Err	bitreich.org	70
i+             `I' followed by a `/' and all "gopher://&; URI are printed using	Err	bitreich.org	70
i              the corresponding entry type.	Err	bitreich.org	70
i 	Err	bitreich.org	70
i-           All other URI are printed using the h entry type	Err	bitreich.org	70
i+     o       All other URI are printed using the `h' entry type	Err	bitreich.org	70
i 	Err	bitreich.org	70
i AUTHORS	Err	bitreich.org	70
i      Josuah Demangeon <mail@josuah.net>	Err	bitreich.org	70
1diff --git a/tttml-gopher b/tttml-gopher	/scm/tttml/file/tttml-gopher.gph	bitreich.org	70
i@@ -13,7 +13,7 @@	Err	bitreich.org	70
i 	Err	bitreich.org	70
i BEGIN {	Err	bitreich.org	70
i         if (ARGC < 3 || 4 < ARGC) {	Err	bitreich.org	70
i-                print("usage: markup-gph <host> <port> [<file>]");	Err	bitreich.org	70
i+                print("usage: tttml-gph <host> <port> [<file>]");	Err	bitreich.org	70
i                 exit(1);	Err	bitreich.org	70
i         }	Err	bitreich.org	70
i         HOST = ARGV[1];	Err	bitreich.org	70
1diff --git a/tttml-html b/tttml-html	/scm/tttml/file/tttml-html.gph	bitreich.org	70
i@@ -6,12 +6,13 @@ function esc(str)	Err	bitreich.org	70
i         gsub("<", "\\&lt;", str);	Err	bitreich.org	70
i         gsub(">", "\\&gt;", str);	Err	bitreich.org	70
i         gsub("\"", "\\&quot;", str);	Err	bitreich.org	70
i+        gsub("'", "\\&apos;", str);	Err	bitreich.org	70
i         return str;	Err	bitreich.org	70
i }	Err	bitreich.org	70
i 	Err	bitreich.org	70
i function format(blk)	Err	bitreich.org	70
i {	Err	bitreich.org	70
i-        gsub("[*_]", "", blk);	Err	bitreich.org	70
i+        gsub("[*_/]", "", blk);	Err	bitreich.org	70
i 	Err	bitreich.org	70
i         for (out = ""; match(blk, /\[[^]]+\]/);) {	Err	bitreich.org	70
i                 out = out substr(blk, 1, RSTART - 1);	Err	bitreich.org	70
i@@ -29,6 +30,18 @@ function paragraph(blk)	Err	bitreich.org	70
i                 print("<p>" format(esc(blk)) "</p>");	Err	bitreich.org	70
i }	Err	bitreich.org	70
i 	Err	bitreich.org	70
i+function blockquote(blk)	Err	bitreich.org	70
i+{	Err	bitreich.org	70
i+        if (blk)	Err	bitreich.org	70
i+                print("<blockquote>" format(esc(blk)) "</blockquote>");	Err	bitreich.org	70
i+}	Err	bitreich.org	70
i+	Err	bitreich.org	70
i+function list(blk)	Err	bitreich.org	70
i+{	Err	bitreich.org	70
i+        if (blk)	Err	bitreich.org	70
i+                print("<ul><li>" format(esc(blk)) "</li></ul>");	Err	bitreich.org	70
i+}	Err	bitreich.org	70
i+	Err	bitreich.org	70
i function title(blk)	Err	bitreich.org	70
i {	Err	bitreich.org	70
i         print("\n<h1>" esc(blk) "</h1>\n");	Err	bitreich.org	70
i@@ -48,8 +61,9 @@ function tag(blk)	Err	bitreich.org	70
i {	Err	bitreich.org	70
i         print("");	Err	bitreich.org	70
i         match(blk, /^\*[^*]*\*:/);	Err	bitreich.org	70
i-        print("<dt>" esc(substr(blk, 1, RLENGTH)) "</dt>");	Err	bitreich.org	70
i-        print("<dd>" esc(substr(blk, RLENGTH + 1)) "</dd>");	Err	bitreich.org	70
i+        len = RLENGTH;	Err	bitreich.org	70
i+        print("<dt>" format(esc(substr(blk, 1, len - 2))) "</dt>");	Err	bitreich.org	70
i+        print("<dd>" format(esc(substr(blk, len + 2))) "</dd>");	Err	bitreich.org	70
i }	Err	bitreich.org	70
i 	Err	bitreich.org	70
i function link(blk)	Err	bitreich.org	70
i@@ -78,8 +92,8 @@ function literal()	Err	bitreich.org	70
i function printblk(blk)	Err	bitreich.org	70
i {	Err	bitreich.org	70
i         if        (type == PARAGRAPH)        paragraph(blk);	Err	bitreich.org	70
i-        else if (type == QUOTE)                quote(blk, "> ", "> ");	Err	bitreich.org	70
i-        else if (type == LIST)                list(blk, "- ", "  ");	Err	bitreich.org	70
i+        else if (type == QUOTE)                blockquote(blk);	Err	bitreich.org	70
i+        else if (type == LIST)                list(blk);	Err	bitreich.org	70
i         else if (type == TAG)                tag(blk);	Err	bitreich.org	70
i         else if (type == LINK)                link(blk);	Err	bitreich.org	70
i }	Err	bitreich.org	70
1diff --git a/tttml.5 b/tttml.5	/scm/tttml/file/tttml.5.gph	bitreich.org	70
i@@ -1,17 +1,17 @@	Err	bitreich.org	70
i .Dd $Mdocdate: April 19 2018$	Err	bitreich.org	70
i-.Dt MARKUP 5	Err	bitreich.org	70
i+.Dt TTTML 5	Err	bitreich.org	70
i .Os	Err	bitreich.org	70
i .	Err	bitreich.org	70
i .	Err	bitreich.org	70
i .Sh NAME	Err	bitreich.org	70
i .	Err	bitreich.org	70
i-.Nm markup	Err	bitreich.org	70
i+.Nm tttml	Err	bitreich.org	70
i .Nd simpler markup syntax than markdown	Err	bitreich.org	70
i .	Err	bitreich.org	70
i .	Err	bitreich.org	70
i .Sh SYNOPSIS	Err	bitreich.org	70
i .	Err	bitreich.org	70
i-.Pa markup.md	Err	bitreich.org	70
i+.Pa file.md	Err	bitreich.org	70
i .	Err	bitreich.org	70
i .	Err	bitreich.org	70
i .Sh DESCRIPTION	Err	bitreich.org	70
i@@ -115,8 +115,8 @@ Block that start with a label line and eventual subsequent description	Err	bitreich.org	70
i lines:	Err	bitreich.org	70
i .	Err	bitreich.org	70
i .Bd -literal -offset 3n	Err	bitreich.org	70
i-[label]: git://josuah.net/git/markup.git	Err	bitreich.org	70
i-git repository for the markup set of tools	Err	bitreich.org	70
i+[label]: git://josuah.net/git/tttml	Err	bitreich.org	70
i+git repository for the tttml set of tools	Err	bitreich.org	70
i 	Err	bitreich.org	70
i [label2]: /url/without/description.txt	Err	bitreich.org	70
i .Ed	Err	bitreich.org	70
.
Response: text/plain
Original URLgopher://bitreich.org/0/scm/tttml/commit/83b0368ca3720858...
Content-Typetext/plain; charset=utf-8