From ea99dcd1aedd4cbb25747122d361d61f4c285480 Mon Sep 17 00:00:00 2001 From: Cyrille LOUARN Date: Fri, 13 Oct 2023 12:13:38 +0200 Subject: [PATCH] [1.9.22] - cleaner code, updated DBs managements --- CHANGELOG.md | 3 +- README.md | 3 +- src/usr/bin/tyto | 2 +- .../program/__pycache__/check.cpython-311.pyc | Bin 34603 -> 34781 bytes .../__pycache__/domain.cpython-311.pyc | Bin 24780 -> 24645 bytes .../program/__pycache__/post.cpython-311.pyc | Bin 9259 -> 9401 bytes .../program/__pycache__/wip.cpython-311.pyc | Bin 1399 -> 1601 bytes src/var/lib/tyto/program/check.py | 187 +++++++++------ src/var/lib/tyto/program/domain.py | 213 ++++++++---------- src/var/lib/tyto/program/post.py | 23 +- src/var/lib/tyto/program/wip.py | 10 + 11 files changed, 236 insertions(+), 205 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 886fd5c..69ac60a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,12 @@ Tyto - Littérateur # CURRENTLY IN DEV ! -## [1.9.22] (Not Yet push) +## [1.9.22] - new bcode process (html prepared for wip) - new post database management values - new icode process (html prepared for wip) - bcodes and icodes are FIRST processed in text article +- generic check fonction for bcodes, quotes, lists, paragraphs - lots more ## [1.9.21] diff --git a/README.md b/README.md index 882618b..75e361f 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,10 @@ tyto ## ToDo next (working on) - 'check' action processes +- - wip quotes - - support for words tags (bolds...) - - support lists, anchors - - thinking about creating an auto top article menu from titles - - stats for article words -- manage template post database -- - check valid database - Translate logs in english ! diff --git a/src/usr/bin/tyto b/src/usr/bin/tyto index d5f0e32..30ad4a3 100755 --- a/src/usr/bin/tyto +++ b/src/usr/bin/tyto @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Version: 1.9.22 -# Updated: 2023-10-11 1697039459 +# Updated: 2023-10-13 1697190846 # Tyto - Littérateur # Copyright (C) 2023 Cyrille Louarn diff --git a/src/var/lib/tyto/program/__pycache__/check.cpython-311.pyc b/src/var/lib/tyto/program/__pycache__/check.cpython-311.pyc index 20bf5f14402daf1f778b992297f688cdc40dcc85..1500ab5def8b815c7229a2cc43f56e3caafc21c8 100644 GIT binary patch delta 6200 zcmb_g4NzOxmDYPt|2zQ#i6>;lj{t+fPzxNBU=s{B*v2567#m_66YQtj*!-9$IS?WR zyR}=57dMKpyJizIRd$?I8Pil9@DAHL6TD5j?PjJcd9)L%DN}cLJgK|8S-e@#xSrW& z&$;49b{r>}_FeeyednBa?>XoGoTGc?d+hwnZ1N9vI;{+z_cLrxU*AuXN4aDNlIopESp(4rq=u_1y!tES(yJBirZ`TQT_Yqf25wDazhX+KbE2bLg?V@y5-(mwrT}YBvK|hH$ z8?j%6PGtOy{5I(q1?Ar#ep7x~8?;~6MTGLGP#)%5uNF?1yxabP`2Mj-MQgO8m0aV$ z)spx9;a5g3j)b`_Z|=Fg@2cuu!!>iHa7(ms%e}iwnOuFQ+OPjsZJ7Hi9o{4V*Cmh> zx@Q>w)X#Mt8YYKi37fKG8fX8>KBv^}c1mkN#h4cCkle1J9`{knMBG9lvw^%SoGp#9 zz5OwHZ%@B7rs^FyGSJoA@4^+4o4Yu>74RY?sRPtXMl5r6NVZjwZeO& zbP%x3rlzJ)w@FWTcyNhEmF2%(?J4OK})F!nyKs7+dA<6m9^#I+SuCfGTG#i zz2zD7K6RAT2CbO#`R?A6PWxhA@r8=VN5-CGy2a(#)z>W@cS&W0sjxBiq_kokV`v*o~ptzJ|Z*0dKr-&X1uJIbE`;QY6eN|%V0&0?2;SW{A}l~10d~{dlep5 zlpj~%XHuC*`5GfCJc`$t*Ez4!BNLUlYT}QmI!^nS%%a+@UZTom9=XVkz$u0O^Vrx3 zJdYxvBB!&gY(P!kC^d32Q4Z%!rvANz(fUD1gWMG0CX9oUCf>s?4!6y1B;6&(F3p4L zfTCKD3NXnd2jqdvt#kqu-Ro*MXtVSjLx<5vOcs@5%3E;MUcuv*K5i|!o@(G3n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j{cn9)@AyOmk(>x-{E;{<|vjUYy(QMR##aw+-#Z z1KrP;t;GrYicHUFHT}5DWyhv5G8}@7omT}|NP3H;|Hn8 z$jFE|4|c%zD6sxou492yUE3QBOb*_A;XSupbSP4ASS~mm;f~1MkuY~;38!7(f?vP(_vo+i z@b&Flx``+oR{Yj=`*RjhYXE>(Ec(@qe)*ywti&>C>jJ0+pl>5I;gsXwTz4TI&i(C= zbF?UPnOOz*Hk7)|tipM$`dZ**FKR&0oP-zIHrkYgqwI6Yu*|H2gc=dbSZ1D#qMDfW E|9BxW;Q#;t diff --git a/src/var/lib/tyto/program/__pycache__/domain.cpython-311.pyc b/src/var/lib/tyto/program/__pycache__/domain.cpython-311.pyc index fa9f0dfbcf7c4e274952cd9d3d6d4bba6c397b38..f6bf54b6afd16b40b089b3894a1d67328af72c0c 100644 GIT binary patch delta 3205 zcmds1Urbxq8TaKl7#ptZYZ(8GvEwAzzSq7${1?-V8E`{LO47Os&BGRGYz&MP1~(zl zY<4ScO83|5=~f;>=7)GgU5T9fAy1V?rS_>0_pE19X9+ExRB6(rja8~NwVSqc?zJ6< zFm(@;Ce4!Xch2wrzVG{;@B8lgV263{*NpL(ENjq^-%ri11=B01oQ&toFz-nST;9t9}aLUzm$eieuMEEV26PB#= zN`zb8O`LUKgia*_dBb!=o6UO2mat35sTWxtmi%-HOyA(Ui2jOjZH!TqC;_ZsP#ZSSv`7k%WuQbE(9zVdH-iMA*6ix{yW|XduJiYII z?2+?MB+g2&&|-jz#5wq~ptfcr;gi0n6l)^!jC7N(mMqo4fp)(M_8nIh-aW1=6Md?^ zTehNK9mYL>cR5QFywhi5Cd-kUU}wLHdA_>)Mv$t0Q&D}9sD4Y)m<_0^FA~)SiWF}I z?Yax=+SR$GUh-UB?Jdu2T` zh%Gfto;r7F^whKQQbUDRs#i(HPfz@S;nts!)}+Ntv&rd1a#>uSUWNCDj<98PW^qwU zF2l7U8&|4VDJ9*?Tq60x^m6gfL*HfU!(^nFCAbz%HI}q1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u-{^4JNvveenuN8VqAW*&l{CiNc^rIUGAvhtFRLn-74k1hLU?bUu^Ym@8nD@`sSNkl$~SxUg!Jol zh9d^qX2eh#jx>SIz9vJsUja7z6_w$Bm3*_GCc^!Ms_@3)3Uh diff --git a/src/var/lib/tyto/program/__pycache__/post.cpython-311.pyc b/src/var/lib/tyto/program/__pycache__/post.cpython-311.pyc index c310828b802ce7c0b73f278e8ed7a5d79be096e5..324c0db008ed07d429619f706915fbfe195faafb 100644 GIT binary patch delta 479 zcmZ4OvD1@pIWI340}v<+Yo^AkPvnzeys}Zfl(9ZlEL9>^GF2)?bq-6Eb&6V)O^SMo zMv7*NR*H6t+8ov>+Z3HByA<6h`xLz>hg6Fc21$@HV34Ap#uViU6q800GXRP?r5Hvz zrx-=Kq%a0EXd1r+srGYAW`t-1lN>;jnSo(5FB7j+{V%5K>R(K?wVF)7n4+V9F~!D$ zSQ;9?m^3vtS$;9u*!*I$v-`zp`-@RqlSPxcs0ygNs2WJzVoOTSPf0BXiq(L`YQbWK zrTHabu{w}gJy@(Du_!Seq^zrY6uAko16 gL16MO(b#L^-7xMmeW21~X_HZDP`p z(y3yquC8LLt<_|zVv3HgVv3Cgu{1QQm^3vtS*n<9Y^s>-?0zxY{$kXgyj$iO$1kSp z_+L!%wUg(|y6_a$0&Oj-0}@r@lQ+tWPiB!5W4t(7TCQ;NG`U1Zm(4%qe3@i#u_Yzv zr=%9&Vk<1oF9Fd7iA9O&#kW{szZBi{!Rbpe(J9uO>211bdoM83!~HIL>6VH z62{3|j8buo3^fcu8799fmh#L3#g&Y=SPP0W^Ga4S76}85DrN){3PqAY@)m1hX?{s+ zkphtI3B<*+K%#-+E;C1mSfg!=ZG$a{DcWe$V$)#rfQ!Gurbv3SJBu%S5lCT?{N#l! zqO3|lX6WSIEGmp_lOM2%YAJxEK!Ph7iljkokWIfhY;yBcN^?@}id2AHkQ0iNCrh!~ S3)rwQ3VdLI6B3i7S!Dn+D>$|Q delta 180 zcmX@e^PP)tIWI340}x2&tETSZn8+u=s5MbtiV8}SymHuO~zZS1x1;8 zC7O&y!a&8vj6g!6ND@fiVoAH", ln, line) print() + """ # Write to post database cf_update_values() @@ -113,7 +115,7 @@ def valid(target): # Text article # ============ # Process bcodes and icodes first to protect their contents - post.error == 0 and bcodes() or tools.exit(targets, post.error) + post.error == 0 and sl_ptags(post.ptags[0]) or tools.exit(targets, post.error) post.error == 0 and icodes() or tools.exit(targets, post.error) # ============= @@ -128,8 +130,11 @@ def valid(target): # Text article # ============ # Single tags - post.error == 0 and sl_tags() or tools.exit(targets, post.error) + post.error == 0 and sl_stags() or tools.exit(targets, post.error) + # Quotes + post.error == 0 and sl_ptags(post.ptags[1]) or tools.exit(targets, post.error) + return True @@ -467,23 +472,40 @@ def is_value2_file_exists(ln, tag, val2): #=====================# #=======================================# # bcodes: first process ! # -# Check if opened and closed tags match # -# Count bcodes for stats # -# Remove bcodes lines # -# - Create new post "texts" contents # -# Return True/False # -#---------------------------------------# -def bcodes(): - global texts - markers = post.bcodes - index0 = index1 = -1 + + +#---------------------------------------# + + +#=========================================# +# start line paired tags # +# Generic check for all paired markers # +# Check if opened and closed tags match # +# Count markers for stats # +# bcodes: remove lines from texts # +# Convert content between markers to html # +# (except for paragraphs) # +# convert html content to base64 # +# create sections, keys values to post DB # +# Return True/False # +#-----------------------------------------# +def sl_ptags(markers): + global texts + + convert = { + "bcodes" : wip.bcode, + "quotes" : wip.quote, + } + + index0 = index1 = -1 for ln, line in enumerate(texts, post.head_lines + 1): + # Marker is opened if index0 >= 0 : - #print(">>>", ln, line) - bcode = "%s\n%s"%(bcode, line) - texts[ln - 1 - post.head_lines] = "" + content = "%s\n%s"%(content, line) + if markers[2] == "bcodes": + texts[ln - 1 - post.head_lines] = "" # Opened mark if line.lstrip().startswith(markers[0]): @@ -492,23 +514,23 @@ def bcodes(): # at the same position if line.index(markers[0][0]) == index0: post.error = \ - debug.out(53, '%s...%s) "%s"'%( - tag_ln, ln, markers[1] + debug.out(53, '%s: %s...%s) "%s"'%( + markers[2], tag_ln, ln, markers[1] ), post.uri, True, 2, False) return False continue index0 = line.index(markers[0][0]) tag_ln = ln - bcode = line - #print(">>>", ln, line) - texts[ln - 1 - post.head_lines] = "" - + content = line + if markers[2] == "bcodes": + texts[ln - 1 - post.head_lines] = "" + # Closed mark if line.lstrip().startswith(markers[1]): if index0 < 0: post.error = \ - debug.out(53, '%s) "%s"...'%( - ln, markers[0] + debug.out(53, '%s: %s) "%s"...'%( + markers[2], ln, markers[0] ), post.uri, True, 2, False) return False index1 = line.index(markers[1][0]) @@ -516,55 +538,73 @@ def bcodes(): if index1 == index0: index0 = index1 = -1 tag_ln = "" - post.stats_bcodes += 1 + post.ptags_stats[markers[2]] += 1 - # create ini values for this bcode - var_name = "bcode_%s"%post.stats_bcodes - val_raws = tools.b64_convert("encode", bcode) - var_html = "html_%s"%post.stats_bcodes - val_html = tools.b64_convert("encode", wip.bcode(bcode)) - post.cf_set("BCODES", var_name, val_raws) - post.cf_set("BCODES", var_html, val_html) - + # paragraphs don't need html wip yet + if markers[2] == "parags": + continue + + # Generic db Keys and values + var_name = "%s_%s"%(markers[2][:-1], post.ptags_stats[markers[2]]) + val_raws = tools.b64_convert("encode", content) + var_html = "html_%s"%post.ptags_stats[markers[2]] + + # Specific values from marker + val_html = tools.b64_convert("encode", convert[markers[2]](content)) + + # Set keys, values to post database + post.cf_set(markers[2].upper(), var_name, val_raws) + post.cf_set(markers[2].upper(), var_html, val_html) + # bcode not opened, but closed tag found elif index0 < 0: tag_ln = ln - # Check if markers match # ---------------------- if index1 >= 0 and index0 < 0: post.error = \ - debug.out(53, '%s) "%s"...'%(tag_ln, markers[0]), post.uri, True,2, False) + debug.out(53, '%s: %s) "%s"...'%( + markers[2], tag_ln, markers[0] + ), post.uri, True,2, False) return False if index0 >= 0 and index1 < 0: post.error = \ - debug.out(53, '%s) ..."%s"'%(tag_ln, markers[1]), post.uri, True,2, False) + debug.out(53, '%s: %s) ..."%s"'%( + markers[2], tag_ln, markers[1] + ), post.uri, True,2, False) return False if index0 != index1: post.error = \ - debug.out(53, '%s) "%s"..."%s"'%( - tag_ln, markers[0], markers[1] + debug.out(53, '%s: %s) "%s"..."%s"'%( + markers[2], tag_ln, markers[0], markers[1] ), post.uri, True,2, False) return False + + print(": stats", markers[2], post.ptags_stats[markers[2]]) return True - -# -# icodes (SAME LINE) + + +#==========================================# +# icodes (SAME LINE) # # Check if opened and closed markers match # -# +# Convert double marks, then single markes # +# replace icodes with "" in texts article # +# Add source text and html converted to DB # +#------------------------------------------# def icodes(): global texts - markers = post.icodes + markers = post.words_markers + for ln, line in enumerate(texts, post.head_lines + 1): # Search for opened, closed markers # markers cannot be at same position on line - m0 = line.find(markers[0]) - m1 = line.find(markers[1]) + m0 = line.find(markers[1][0]) + m1 = line.find(markers[1][1]) if m0 == m1: continue @@ -574,7 +614,7 @@ def icodes(): if m1 < m0: post.error = \ debug.out(53, '%s) "%s"..."%s"'%( - ln, markers[1], markers[0] + ln, markers[1][1], markers[1][0] ), post.uri, True,2, False) return False @@ -582,7 +622,7 @@ def icodes(): if m0 >= 0 and m1 == -1: post.error = \ debug.out(53, '%s) ..."%s"'%( - ln, markers[1] + ln, markers[1][1] ), post.uri, True,2, False) return False @@ -590,51 +630,46 @@ def icodes(): elif m1 >= 0 and m0 == -1: post.error = \ debug.out(53, '%s) "%s"...'%( - ln, markers[0] + ln, markers[1][0] ), post.uri, True,2, False) return False - if post.words_markers[0][0] in line: - line = line.replace(post.words_markers[0][0], post.words_markers[0][4]) - line = line.replace(post.words_markers[0][1], post.words_markers[0][5]) - icodes = re.findall('%s(.*?)%s'%( - post.words_markers[0][4], post.words_markers[0][5] - ), line) - + if markers[0][0] in line: + # Double mark first + line = line.replace(markers[0][0], markers[0][4]) + line = line.replace(markers[0][1], markers[0][5]) + icodes = re.findall('%s(.*?)%s'%(markers[0][4], markers[0][5]), line) + for icode in icodes: post.stats_text_icodes += 1 - icnew = post.words_markers[0][4] + icode + post.words_markers[0][5] + icnew = markers[0][4] + icode + markers[0][5] line = line.replace(icnew, "") # Set HTML [ICODES] to post database icode_var = "icode_%s"%post.stats_text_icodes - icleg = post.words_markers[0][0] + icode + post.words_markers[0][1] + icleg = markers[0][0] + icode + markers[0][1] html_var = "html_%s"%post.stats_text_icodes - html_val = icnew.replace(post.words_markers[0][4], - post.words_markers[0][2]%css) - html_val = html_val.replace(post.words_markers[0][5], - post.words_markers[0][3]) + html_val = icnew.replace(markers[0][4], markers[0][2]%css) + html_val = html_val.replace(markers[0][5], markers[0][3]) post.cf_set("ICODES", icode_var, icleg) post.cf_set("ICODES", html_var, html_val) - - line = line.replace(post.words_markers[1][0], post.words_markers[1][4]) - line = line.replace(post.words_markers[1][1], post.words_markers[1][5]) - icodes = re.findall('%s(.*?)%s'%( - post.words_markers[1][4], post.words_markers[1][5] - ), line) + + # Single mark + line = line.replace(markers[1][0], markers[1][4]) + line = line.replace(markers[1][1], markers[1][5]) + icodes = re.findall('%s(.*?)%s'%(markers[1][4], markers[1][5]), line) + for icode in icodes: post.stats_text_icodes += 1 - icnew = post.words_markers[1][4] + icode + post.words_markers[1][5] + icnew = markers[1][4] + icode + markers[1][5] line = line.replace(icnew, "") # Set HTML [ICODES] to post database icode_var = "icode_%s"%post.stats_text_icodes - icleg = post.words_markers[1][0] + icode + post.words_markers[1][1] + icleg = markers[1][0] + icode + markers[1][1] html_var = "html_%s"%post.stats_text_icodes - html_val = icnew.replace(post.words_markers[1][4], - post.words_markers[1][2]%css) - html_val = html_val.replace(post.words_markers[1][5], - post.words_markers[1][3]) + html_val = icnew.replace(markers[1][4], markers[1][2]%css) + html_val = html_val.replace(markers[1][5], markers[1][3]) post.cf_set("ICODES", icode_var, icleg) post.cf_set("ICODES", html_var, html_val) @@ -644,12 +679,13 @@ def icodes(): #============================# +# start line single tags # # Check optional title tags # # Count tyto + html comments # # Add stat for _image:logo # # Return True/False # #----------------------------# -def sl_tags(): +def sl_stags(): for ln, line in enumerate(texts, post.head_lines + 1): # legacy Tyto Titles if line.startswith(post.tyto_titles): @@ -776,8 +812,9 @@ def cf_update_values(): post.cf_set("STATS_TEXTS", "tyto_coms", str(post.stats_tyto_text_coms)) post.cf_set("STATS_TEXTS", "html_coms", str(post.stats_html_coms)) post.cf_set("STATS_TEXTS", "titles", str(post.stats_titles)) - post.cf_set("STATS_TEXTS", "bcodes", str(post.stats_bcodes)) - post.cf_set("STATS_TEXTS", "bcodes_lines", str(post.stats_bcodes_lines)) + #post.cf_set("STATS_TEXTS", "bcodes_lines", str(post.stats_bcodes_lines)) + post.cf_set("STATS_TEXTS", "bcodes", str(post.ptags_stats["bcodes"])) + post.cf_set("STATS_TEXTS", "quotes", str(post.ptags_stats["quotes"])) # Founds from header tags post.cf_set("STATS_TEXTS", "links", str(post.stats_text_links)) post.cf_set("STATS_TEXTS", "files", str(post.stats_text_files)) diff --git a/src/var/lib/tyto/program/domain.py b/src/var/lib/tyto/program/domain.py index cfc8333..4ea381d 100644 --- a/src/var/lib/tyto/program/domain.py +++ b/src/var/lib/tyto/program/domain.py @@ -227,11 +227,11 @@ def cf_update_values(write): cf_set("DOMAIN", "name", name) - title = cf_set("DOMAIN", "title", "title") - date = cf_set("DOMAIN", "date", "date") - about = cf_set("DOMAIN", "about", "about") - mail = cf_set("DOMAIN", "mail", "mail") - tags = cf_set("DOMAIN", "tags", "tags") + title = cf_set("DOMAIN", "title", "title") + date = cf_set("DOMAIN", "date", "date") + about = cf_set("DOMAIN", "about", "about") + mail = cf_set("DOMAIN", "mail", "mail") + tags = cf_set("DOMAIN", "tags", "tags") license = cf_set("DOMAIN", "lincese", "") if not license: license = cf_set("DOMAIN", "lincese", "gfdl-1.3") @@ -242,8 +242,8 @@ def cf_update_values(write): # Optional global legals_url, terms_url, statuses_url - legals_url = cf_set("DOMAIN", "legals_url", "") - terms_url = cf_set("DOMAIN", "terms_url", "") + legals_url = cf_set("DOMAIN", "legals_url", "") + terms_url = cf_set("DOMAIN", "terms_url", "") statuses_url = cf_set("DOMAIN", "statuses_url", "") @@ -255,51 +255,46 @@ def cf_update_values(write): srv = cf_set("SERVER", "root", "server") srv_name = os.path.join(srv, name + "/") + wip = os.path.join(srv_name, "wip/") + www = os.path.join(srv_name, "www/") + cf_set("SERVER", "domain", srv_name) - - wip = os.path.join(srv_name, "wip/") - cf_set("SERVER", "wip", wip) - - www = os.path.join(srv_name, "www/") - cf_set("SERVER", "www", www) + cf_set("SERVER", "wip", wip) + cf_set("SERVER", "www", www) # [WIP_DIRS] # ========== global wip_tpl, wip_images, wip_files - wip_tpl = os.path.join(wip, "template/") - cf_set("WIP_DIRS", "template", wip_tpl) - + wip_tpl = os.path.join(wip, "template/") wip_images = os.path.join(wip, "images/") - cf_set("WIP_DIRS", "images", wip_images) + wip_files = os.path.join(wip, "files/") - wip_files = os.path.join(wip, "files/") - cf_set("WIP_DIRS", "files", wip_files) + cf_set("WIP_DIRS", "template", wip_tpl) + cf_set("WIP_DIRS", "images", wip_images) + cf_set("WIP_DIRS", "files", wip_files) # [WWW_DIRS] # ========== global www_tpl, www_images, www_files - www_tpl = os.path.join(www, "template/") - cf_set("WWW_DIRS", "template", www_tpl) - + www_tpl = os.path.join(www, "template/") www_images = os.path.join(www, "images/") - cf_set("WWW_DIRS", "images", www_images) + www_files = os.path.join(www, "files/") - www_files = os.path.join(www, "files/") - cf_set("WWW_DIRS", "files", www_files) + cf_set("WWW_DIRS", "template", www_tpl) + cf_set("WWW_DIRS", "images", www_images) + cf_set("WWW_DIRS", "files", www_files) # [WEBSITE] # ========= global wip_url, www_url, lang, css, sep, article_code, static - wip_url = cf_set("WEBSITE", "wip_url", "") - if not wip_url: - wip_url = cf_set("WEBSITE", "wip_url", create_wip_url()) + wip_url = cf_set("WEBSITE", "wip_url", "") or \ + cf_set("WEBSITE", "wip_url", create_wip_url()) - www_url = cf_set("WEBSITE", "www_url", "") - if not www_url: - www_url = cf_set("WEBSITE", "www_url", "https://%s/"%name) + www_url = cf_set("WEBSITE", "www_url", "") or \ + cf_set("WEBSITE", "www_url", "https://%s/"%name) lang = cf_set("WEBSITE", "lang", "") if not lang: @@ -308,9 +303,8 @@ def cf_update_values(write): lang = langs.get_sys_lang() langs.load_website_lang() - css = cf_set("WEBSITE", "css", "") - if not css: - css = cf_set("WEBSITE", "css", "tyto") + css = cf_set("WEBSITE", "css", "") or \ + cf_set("WEBSITE", "css", "tyto") sep = cf_set("WEBSITE", "separator", "") if not sep or len(sep) > 2: @@ -328,10 +322,8 @@ def cf_update_values(write): try: navbar = cf.getboolean("WEBSITE_MODULES", "navbar") except: navbar = cf_set("WEBSITE_MODULES", "navbar", "yes") - sidebar_title = cf_set("WEBSITE_MODULES", "sidebar_title", "") - if not sidebar_title: - sidebar_title = cf_set("WEBSITE_MODULES", "sidebar_title", - langs.site.sidebar_title) + sidebar_title = cf_set("WEBSITE_MODULES", "sidebar_title", "") or \ + cf_set("WEBSITE_MODULES", "sidebar_title", langs.site.sidebar_title) sidebar_items = cf_set("WEBSITE_MODULES", "sidebar_items", "") if not sidebar_items or not sidebar_items.isdigit(): @@ -348,35 +340,30 @@ def cf_update_values(write): # TEMPLATE_FILENAMES # ================== global favicon, logo, styles, rss, stats - favicon = cf_set("TEMPLATE_FILENAMES", "favicon", "") - if not favicon: - favicon = cf_set("TEMPLATE_FILENAMES", "favicon", "favicon.png") + favicon = cf_set("TEMPLATE_FILENAMES", "favicon", "") or \ + cf_set("TEMPLATE_FILENAMES", "favicon", "favicon.png") - logo = cf_set("TEMPLATE_FILENAMES", "logo", "") - if not logo: - logo = cf_set("TEMPLATE_FILENAMES", "logo", "logo.png") + logo = cf_set("TEMPLATE_FILENAMES", "logo", "") or \ + cf_set("TEMPLATE_FILENAMES", "logo", "logo.png") - styles = cf_set("TEMPLATE_FILENAMES", "styles", "") - if not styles: - styles = cf_set("TEMPLATE_FILENAMES", "styles", "styles.css") + styles = cf_set("TEMPLATE_FILENAMES", "styles", "") or \ + cf_set("TEMPLATE_FILENAMES", "styles", "styles.css") - rss = cf_set("TEMPLATE_FILENAMES", "rss", "") - if not rss: - rss = cf_set("TEMPLATE_FILENAMES", "rss", "rss.xml") + rss = cf_set("TEMPLATE_FILENAMES", "rss", "") or \ + cf_set("TEMPLATE_FILENAMES", "rss", "rss.xml") - stats = cf_set("TEMPLATE_FILENAMES", "stats", "") - if not stats: - stats = cf_set("TEMPLATE_FILENAMES", "stats", "tyto_stats.ini") + stats = cf_set("TEMPLATE_FILENAMES", "stats", "") or \ + cf_set("TEMPLATE_FILENAMES", "stats", "tyto_stats.ini") # [USER_DIRS] # =========== - cf_set("USER_DIRS", "root", wrk_dir) + cf_set("USER_DIRS", "root", wrk_dir) cf_set("USER_DIRS", "articles", wrk_articles) - cf_set("USER_DIRS", "images", wrk_images) - cf_set("USER_DIRS", "files", wrk_files) + cf_set("USER_DIRS", "images", wrk_images) + cf_set("USER_DIRS", "files", wrk_files) cf_set("USER_DIRS", "template", wrk_tpl) - cf_set("USER_DIRS", "modules", wrk_mods) + cf_set("USER_DIRS", "modules", wrk_mods) cf_set("USER_DIRS", "database", wrk_db) @@ -384,31 +371,27 @@ def cf_update_values(write): # ===================== global wrk_favicon, wrk_logo, wri_styles wrk_favicon = os.path.join(wrk_tpl, favicon) + wrk_logo = os.path.join(wrk_tpl, logo) + wrk_styles = os.path.join(wrk_tpl, styles) + cf_set("USER_TEMPLATE_FILES", "favicon", wrk_favicon) - - wrk_logo = os.path.join(wrk_tpl, logo) - cf_set("USER_TEMPLATE_FILES", "logo", wrk_logo) - - wrk_styles = os.path.join(wrk_tpl, styles) - cf_set("USER_TEMPLATE_FILES", "styles", wrk_styles) + cf_set("USER_TEMPLATE_FILES", "logo", wrk_logo) + cf_set("USER_TEMPLATE_FILES", "styles", wrk_styles) # [USER_MODULES_FILES] # ==================== global wrk_metas, wrk_header, wrk_navbar, wrk_sidebar, wrk_footer - wrk_metas = os.path.join(wrk_mods, "tyto_metas.raw") - cf_set("USER_MODULES_FILES", "metas", wrk_metas) - - wrk_header = os.path.join(wrk_mods, "tyto_header.raw") - cf_set("USER_MODULES_FILES", "header", wrk_header) - - wrk_navbar = os.path.join(wrk_mods, "tyto_navbar.raw") - cf_set("USER_MODULES_FILES", "navbar", wrk_navbar) - + wrk_metas = os.path.join(wrk_mods, "tyto_metas.raw") + wrk_header = os.path.join(wrk_mods, "tyto_header.raw") + wrk_navbar = os.path.join(wrk_mods, "tyto_navbar.raw") wrk_sidebar = os.path.join(wrk_mods, "tyto_sidebar.raw") - cf_set("USER_MODULES_FILES", "sidebar", wrk_sidebar) + wrk_footer = os.path.join(wrk_mods, "tyto_footer.raw") - wrk_footer = os.path.join(wrk_mods, "tyto_footer.raw") + cf_set("USER_MODULES_FILES", "metas", wrk_metas) + cf_set("USER_MODULES_FILES", "header", wrk_header) + cf_set("USER_MODULES_FILES", "navbar", wrk_navbar) + cf_set("USER_MODULES_FILES", "sidebar", wrk_sidebar) cf_set("USER_MODULES_FILES", "footer", wrk_footer) @@ -416,70 +399,58 @@ def cf_update_values(write): # =========== global wip_favicon, wip_logo, wip_styles, wip_rss, wip_stats wip_favicon = os.path.join(wip_tpl, favicon) + wip_logo = os.path.join(wip_tpl, logo) + wip_styles = os.path.join(wip_tpl, styles) + wip_rss = os.path.join(wip_tpl, rss) + wip_stats = os.path.join(wip_tpl, stats) + cf_set("WIP_FILES", "favicon", wip_favicon) - - wip_logo = os.path.join(wip_tpl, logo) - cf_set("WIP_FILES", "logo", wip_logo) - - wip_styles = os.path.join(wip_tpl, styles) + cf_set("WIP_FILES", "logo", wip_logo) cf_set("WIP_FILES", "styles", wip_styles) - - wip_rss = os.path.join(wip_tpl, rss) - cf_set("WIP_FILES", "rss", wip_rss) - - wip_stats = os.path.join(wip_tpl, stats) - cf_set("WIP_FILES", "stats", wip_stats) + cf_set("WIP_FILES", "rss", wip_rss) + cf_set("WIP_FILES", "stats", wip_stats) global wip_metas, wip_header, wip_navbar, wip_sidebar, wip_footer - wip_metas = os.path.join(wip_tpl, "metas.html") - cf_set("WIP_FILES", "metas", wip_metas) - - wip_header = os.path.join(wip_tpl, "header.html") - cf_set("WIP_FILES", "header", wip_header) - - wip_navbar = os.path.join(wip_tpl, "navbar.html") - cf_set("WIP_FILES", "navbar", wip_navbar) - + wip_metas = os.path.join(wip_tpl, "metas.html") + wip_header = os.path.join(wip_tpl, "header.html") + wip_navbar = os.path.join(wip_tpl, "navbar.html") wip_sidebar = os.path.join(wip_tpl, "sidebar.html") - cf_set("WIP_FILES", "sidebar", wip_sidebar) + wip_footer = os.path.join(wip_tpl, "footer.html") - wip_footer = os.path.join(wip_tpl, "footer.html") - cf_set("WIP_FILES", "footer", wip_footer) + cf_set("WIP_FILES", "metas", wip_metas) + cf_set("WIP_FILES", "header", wip_header) + cf_set("WIP_FILES", "navbar", wip_navbar) + cf_set("WIP_FILES", "sidebar", wip_sidebar) + cf_set("WIP_FILES", "footer", wip_footer) # [WWW_FILES] # =========== global www_favicon, www_logo, www_styles, www_rss, www_stats www_favicon = os.path.join(www_tpl, favicon) + www_logo = os.path.join(www_tpl, logo) + www_styles = os.path.join(www_tpl, styles) + www_rss = os.path.join(www_tpl, rss) + www_stats = os.path.join(www_tpl, stats) + cf_set("WWW_FILES", "favicon", www_favicon) - - www_logo = os.path.join(www_tpl, logo) - cf_set("WWW_FILES", "logo", www_logo) - - www_styles = os.path.join(www_tpl, styles) - cf_set("WWW_FILES", "styles", www_styles) - - www_rss = os.path.join(www_tpl, rss) - cf_set("WWW_FILES", "rss", www_rss) - - www_stats = os.path.join(www_tpl, stats) - cf_set("WWW_FILES", "stats", www_stats) + cf_set("WWW_FILES", "logo", www_logo) + cf_set("WWW_FILES", "styles", www_styles) + cf_set("WWW_FILES", "rss", www_rss) + cf_set("WWW_FILES", "stats", www_stats) global www_metas, www_header, www_navbar, www_sidebar, www_footer - www_metas = os.path.join(www_tpl, "metas.html") - cf_set("WWW_FILES", "metas", www_metas) - - www_header = os.path.join(www_tpl, "header.html") - cf_set("WWW_FILES", "header", www_header) - - www_navbar = os.path.join(www_tpl, "navbar.html") - cf_set("WWW_FILES", "navbar", www_navbar) - + www_metas = os.path.join(www_tpl, "metas.html") + www_header = os.path.join(www_tpl, "header.html") + www_navbar = os.path.join(www_tpl, "navbar.html") www_sidebar = os.path.join(www_tpl, "sidebar.html") - cf_set("WWW_FILES", "sidebar", www_sidebar) + www_footer = os.path.join(www_tpl, "footer.html") - www_footer = os.path.join(www_tpl, "footer.html") - cf_set("WWW_FILES", "footer", www_footer) + cf_set("WWW_FILES", "metas", www_metas) + cf_set("WWW_FILES", "header", www_header) + cf_set("WWW_FILES", "navbar", www_navbar) + cf_set("WWW_FILES", "sidebar", www_sidebar) + cf_set("WWW_FILES", "footer", www_footer) # [TYTO] diff --git a/src/var/lib/tyto/program/post.py b/src/var/lib/tyto/program/post.py index 1bf5fea..2079bee 100644 --- a/src/var/lib/tyto/program/post.py +++ b/src/var/lib/tyto/program/post.py @@ -318,6 +318,21 @@ quotes = ("[[", "]]") parags = ("((", "))") lists = ("<<", ">>", "=", "+") +# Paired markers +ptags = ( + ("{{", "}}", "bcodes"), + ("[[", "]]", "quotes"), + ("((", "))", "parags"), + ("<<", ">>", "lists" ), + ) + +ptags_stats = { + "bcodes" : stats_bcodes, + "quotes" : stats_quotes, + "parags" : stats_parags, + "lists" : stats_lists, + } + # Tyto Titles #1 =

tyto_titles = ("#1", "#2", "#3", "#4", "#5") html_titles = { @@ -335,15 +350,11 @@ text_comments = (";;", "