From cfb564eb237e8cc9411b27ee5b7ac552faf34f7c Mon Sep 17 00:00:00 2001 From: Cyrille LOUARN Date: Mon, 13 Nov 2023 18:04:12 +0100 Subject: [PATCH] [1.9.38] --- CHANGELOG.md | 7 ++ README.md | 24 ++-- debian/control | 2 +- src/usr/bin/tyto | 2 +- .../program/__pycache__/check.cpython-311.pyc | Bin 46121 -> 46346 bytes .../program/__pycache__/debug.cpython-311.pyc | Bin 4088 -> 4093 bytes .../program/__pycache__/post.cpython-311.pyc | Bin 13608 -> 13629 bytes .../program/__pycache__/tools.cpython-311.pyc | Bin 7429 -> 8330 bytes .../program/__pycache__/tyto.cpython-311.pyc | Bin 1504 -> 1506 bytes .../program/__pycache__/wip.cpython-311.pyc | Bin 43536 -> 45747 bytes src/var/lib/tyto/program/check.py | 16 ++- src/var/lib/tyto/program/debug.py | 6 +- src/var/lib/tyto/program/post.py | 18 +-- src/var/lib/tyto/program/tools.py | 30 +++-- src/var/lib/tyto/program/tyto.py | 2 +- src/var/lib/tyto/program/wip.py | 107 +++++++++++++----- src/var/lib/tyto/tpl_files/styles.css | 4 +- .../__pycache__/logs_fr.cpython-311.pyc | Bin 5689 -> 5711 bytes src/var/lib/tyto/translations/logs_en.py | 1 + src/var/lib/tyto/translations/logs_fr.py | 1 + 20 files changed, 152 insertions(+), 68 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3648880..9ab09b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ Tyto - Littérateur # CURRENTLY IN DEV (in devel branch) ! +## [1.9.38] +- Moved: HTML footer in div site_container +- fix: main title in HTML page h1 +- Fill Article HTML metas datas +- Working on files copies to wip server with "wip" command +- - some changes in post DB and check process + ## [1.9.37] - Preparing full HTML Page - Some fixes diff --git a/README.md b/README.md index 116e566..b971008 100644 --- a/README.md +++ b/README.md @@ -236,22 +236,24 @@ _code:codetest # Placer le logo de l'article _image:logo -# Marqueur avec options -# ! Les images dans cet exemple sont affichées à la suite -# Placer "|", ou mettez une image dans un paragraphe "((...))" -# ou appliquer un style css de type display:block -# les options des marqueurs: +# les options du marqueur: # - c=CLASS < Sinon la classe est celle du domaine # - w=WIDTH < longueur (si pas d'unité : défaut "px") # - h=HEIGHT < Comme w= # - f=Ma légende sous l'image (ajoute
) # - - Recommandé d'utiliser cette option en dernier + +# ! Les images dans cet exemple sont affichées horizontalement +# Placer "|", ou mettez chaque image dans un paragraphe "((...))" +# ou définir un style css de type display:block pour les afficher verticalement (( _image:mypic _image:mypic c=MYCSS - _image:mypic c=PIC w=60em h=30% f=echolib sur une chaise )) +# Une image avec légende (
) (jamais dans un paragraphe) +_image:mypic c=PIC w=60em h=30% f=echolib sur une chaise + ``` ## Output HTML @@ -311,7 +313,7 @@ _image:logo -

mycite +

Here, i am

@@ -361,10 +363,10 @@ Here, i am

Les images

- +

-Text Alt -Text Alt -

Text Alt
echolib sur une chaise
+Text Alt +Text Alt

+
Text Alt
echolib sur une chaise
``` diff --git a/debian/control b/debian/control index 8759485..50e74c9 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Package: tyto -Version: 1.9.37 +Version: 1.9.38 Section: custom Priority: optional Architecture: all diff --git a/src/usr/bin/tyto b/src/usr/bin/tyto index 53ba68a..aabcf33 100755 --- a/src/usr/bin/tyto +++ b/src/usr/bin/tyto @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Version: 1.9.37 +# Version: 1.9.38 # Updated: 2023-11-11 1699742831 # Tyto - Littérateur 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 c0188e52652d34ee57f5b2d405540fcad30eb353..21b5b06f305d9c5424d9877ef931b1a376673ab2 100644 GIT binary patch delta 1249 zcmZ`&eQZ-z6u;*^dU4%HM`>5a2Hi(rKPdEr(%_cOAqW$u(3oN8_+zrXO}7!EZ)M^b zL5R`8U&FJw8o`yg@2xTQMdLpPmMHEIC4HtsSnz{{8Fd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W<#JVF+f>6!t6f1sZybB_pwT@@g4pv0E%|o<6R(*o#Y( z;!BG%i^74jnj(`w$TUx`l~r`+C{8VjFG)-(cZ`X@Ys9d1F!t|nm;S~YH2FtqwV%P-KR;XSSFt{RM z&|m>kfgzx|BJ`qw@f88%2CJ`Z4E&-K!e&ISV7qMZ4?&c=t zUPi{g$pWgntW$vkPMe)n^_dx`PcG6>XPh#5mWB!IVxX}9=F1w-nHZN(-mN`DWC>89 ziZv-eKijH`H77AI-KuEm=5(F^Ox)9fGDRXFqHl7czB)I^iXxD)MT<8t){kdmd^wrf U=nlUUqy7g5I1#e>oskt20An$?DgXcg delta 553 zcmdm+wIYjeIWI340}%Yv3rL+|wvq24C%=Hy4CNU{Gn9Mk7l>WtSKs`P^8-KQn$7Pe z=P@!$O^y*(m@FqE%*RgVqjPe#1N1ufRJKAlM+No@u5o9GC-sz&k_+~ zOJN9R&=i>5AmhiRDLna!Ofy%J8_@8gXdp2;T~^VEt2nhJKC!eUBfm(K@fHV&SCW`s zT+9empira@QmYOl9swD}mXlA*-cA&r&Nhi{LgfPWivn6#1hg6~?+OUv7E-$?pm{|= zv%vzP3X72DMFE{F0y+&=Ah=mkelnwQ0no-jI##_vRNG&zTsPOunE!Lu4UPpo%pqKR?^5iZv%OFWstW(dHVR|4iIdfHFlQ tAfkJ6o4z_X$ciG6u|*3u@6eBDVth7P!srga9HZ_B1~}ofnc3Ki2>?tOm!JRu diff --git a/src/var/lib/tyto/program/__pycache__/tools.cpython-311.pyc b/src/var/lib/tyto/program/__pycache__/tools.cpython-311.pyc index 134902071a8c7d9b5d4fc0fcb22489efa5d38875..6e9b21d2f36d4a0a5511a3b4012632b4159698f5 100644 GIT binary patch delta 1242 zcmb`FUuaWT9LLYO|9W$CZ*I&|(E{FL4hQRXNI967{}flo9Kz&_I2R3+uf&5BO+M(xK8-f7&nMmMB_dp0Zk$U z{X_w7BW=I{QGqWI4=_kHU_0>ww-X&0A_lO7_<&(z0wY8?jFSFue;(Gc#3IHIcn5o8 z#IbP4_dOnD4}80V`N})@Wk<`nTBg>rJLaqGu(ut5%(C7L+X$JgNAvf&IvU7FI|;6k*|fc5zKzmcg?GtvBcwh3ak$1vw;yoa1x$F2a>pMPUb8t zH+#~)IBjKTKCAUZ-LKze{f;5Z0K>U1yn`#E|!1^{)%K6@dbwd(Te+_{T=G|db9 z0P}U(`f%oqU6-sJCoj_xC?qBN3V%@~cAmb?<%a;a1c=-fEh&gK9RpW)eh9F7ChN2g(QfhuhEWcY*QjU^xl@vH& z&4wUwfw!0~;k$d5)60Xa!{uQ4d}XJj^t(!bP3d1(^ulCeve|6@p&)-?arPIp>nF2o zRdmdRYbFW<>x$YySV}MLTuhdRSHjSty@D%y9BshW25K$q+0e`_LGT|0wimYZb!bRI z50saNQmoH>UpUuMT{2GzX#%BHn06oD+_ESa_g>Fj$&`|g*y)O$HF5M)`4dk$UOrmM zt_9c5KTbHYQ8zZ)tnLncBjB^_N$|34Lx=lS(*6|7m%w$ZZ-yRXJj=}RIKIrL!cqAe zq@Pw7!XAug*m7jIyaBIQ9X=Gytee`Rw!r&GLAR;|9kOwlDfxhF=in zOQ!sblz)rz&Xjli98vzaZ(i%4>i+2*xnNCXXbEz#H)PMUFQQ%Z`)lZbwsq89`_E=R iCuM`3$6wa*U;}L-q2n|U|3)H!w>Quhdf9iKBYy#~f=WIB delta 555 zcmeBjY_;NB&dbZi00h~Yo~eMD;O1FU#~2y&CMU{7F;-08BO}dP3lu)T`Hl=H zBV+31XR>;%%|L<2lO^R`7$qjh$w`U@0r^EjK;jllNoHrE~&PyyXwP`E$} o`XIp0DExteopJI(`Cvs}MhC_Z3`nG!Fr(N91~_3f*-^n00DwQ3?EnA( diff --git a/src/var/lib/tyto/program/__pycache__/tyto.cpython-311.pyc b/src/var/lib/tyto/program/__pycache__/tyto.cpython-311.pyc index 467b6a17bb668ecd4fed0cca591682798a8e0637..7fec1f0b580cbf0847e705ec20dbdae4e071d185 100644 GIT binary patch delta 40 vcmaFB{fL`)IWI340}zC31*NXu$a|EDF=nzpv)bgJOu9@8`kU35cQF9~;&=-M delta 37 scmaFF{eYWyIWI340}u#r_eov3k@qMQW7K3rX0^#bnRGX6Fz;dl0LsA%_W%F@ diff --git a/src/var/lib/tyto/program/__pycache__/wip.cpython-311.pyc b/src/var/lib/tyto/program/__pycache__/wip.cpython-311.pyc index b29415b8ebe0e394076b05a0e4c31c998e90b693..13fe706b391db321d146d38cc2063c313cbd5de1 100644 GIT binary patch delta 7718 zcmb7I33OCdntu1a+V_N{Dya%dDk}vf1Pmr@F@!|{Mb<3BwcU=4-KZ_`)F}PBGuq=}&d}=VaFiK`_Ds+J-&zvrwvY3Y z`rd!<`|p4MyZp<&`(tACifB7+wVDKYl=@Y{XHOikWs&LwrS}gCG6|a-&9b;lXtc-@ zpjFlY+GH)DUDg3QWIbS-YyeD`jerwm6JUmH2F#Q#fKJ&8=#p)KS+X54TXq1t*aSTad4aQuCBk-ew+ zXZE|VkW(X7#Y!L5)+$m$Yiw!Cp)J%vLyy9 zd$K70elJn}WOp9BBP*SMd-O22x0=(Ey(mSjqA7!IvO1aDV`Vpbv)H;qt5y~s60_O# zHYZE8Aeq=(qJJyfyPeB9sCORJo7hr=g=;Xrr-T+}SE{E9R?(KvwLncl3-@ zEuKCdY$HpOTM%UJU)AV%jmToVC*z2!mC7;pHcygn%Slo@DZOi3THeT6UgK4lP z`5n}#9Y>E>N&i!o*pwjH` zR$4o$YUK2$&Td6DAgTB_M^rJ;qDq^C3P|qW1QJ53E~0FQU8jnj5mnRWS6YF)D;!dS zy};Ds-xdmVcBm4KL{tNI8t&ZOsao|iY}c;tO{x?LcCiPHh0BbsN_)7ut23ggX4ExE z;{{`ve{--IKT??B;7ihQ@q-vY@dsi)ng>{(191n$ItKdFJq>`LRj!Mg2p;DYiL%&#M!l_8R82Pd(Gr#&u2K<`9g_yOCqF$zpc0Ug$Ej zPaB<@0ZDPO{Y4qB_m-JQX%QmfgP>`2LH@80KOC;BqkFE&`&oTj`9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Xrp9>xv- zQIoK;O8%SLCigOn;RCaXFCSQDE~_?wFtX=2$F-^m=i`Tkz)?Kxaz^OFw{ybWg$KPhcD!G-As@S4>IZO`A$ zpU30PvfH{#+9htG;O3rwM2byMYK(E;xrc{p+N=y6f3fu&DjFv92dW|EtX zy2R5jY2rvS>`1_J>>9RqB(LKYzF{fo!yv?-<+px2eraKk(D;WDqF)m2QF>j0pqs}A z@}nZ?W9zAhr=1Pdni88uM5EXoNoL`R!YLJ;lTM4NK}p)KCP*Cxtc?V^h_(`2x<%_B z;KjOb#v?8?$og12aZK3)S3lf&*}a@6dTW1pdx&2Plkw~1@yn}zyc{M2*gn2x6u}!w z;A(<{H17^rajY>dMDGOeQ|$fP!o%%w7n-<5y>`5UF6Ez}viiXA&jV z3puYm0&gF$AK5HU@F#n}WfaQ4i{Zi}ujj1ey1V9vyCxNRTOUx==r)YJe|_bA=ppIB zbV#itwO$@{Q-zGNb;9ivRmQs}{AmSBPX=a|p;g~cYj(FdtoTZ3>&Rnub6>P85>q3(eXPM9C{_NkRK=$|#~HM!)`ve{k-Uj3 z9~Bt%2KD)9y4e-!5UPQHPG7<_=7WRL?vk9BnT z=2lesW?-$E7<@BFlmcqv@YzO#cqj4EpSFvczH;BXfV#dIe~I8s_zwPa8)5%BKeED^ za|>&#SRR>?AKe1Y#w)}QqMaw;=H>~4XQ4KtRYLaLg(ErCj1Y7Ze3xJy0sleaWooS_ zpi3jaXED0w@M{LI#~CkXdA-RCKVEh5Vu_#JJazLt!1s>Z%AzQawu*vScugqy_V33+-L>&A zw4QH)f%8^4c7Dz*&!}J($Dk;aS}B-cE2fR&Zw6y942BC&WGod$OkI<34X_Ju)U=Dl YHVFqLJ5f?l`UK~ggv~OvzO(s%0PTq}^Z)<= diff --git a/src/var/lib/tyto/program/check.py b/src/var/lib/tyto/program/check.py index 285d5a2..b6dd512 100644 --- a/src/var/lib/tyto/program/check.py +++ b/src/var/lib/tyto/program/check.py @@ -314,6 +314,7 @@ def ol_tags(): if not post.logo[1]: src_uri = "%stemplate/%s"%(domain.www_url, domain.logo) post.logo = (post.logo[0], src_uri) + post.cf_set("HEADERS", "logo", src_uri) return True @@ -589,7 +590,7 @@ def is_value2_file_exists(ln, tag, val2): # Add file to [SOURCE_FILES] post database stats_total_files += 1 - post.cf_set("SOURCE_FILES", "file_%s"%stats_total_files, src_uri) + post.cf_set("SOURCE_FILES", "file_%s"%stats_total_files, value2_uri) post.cf_set("STATS_FILE", "files", str(stats_total_files)) return True @@ -1120,11 +1121,14 @@ def cf_update_values(part): web_target = web_target[:-10] if not web_target.startswith("/"): web_target = "/" + web_target - post.cf_set("FILE", "id", post.uri_id) - post.cf_set("FILE", "uri", post.uri) - post.cf_set("FILE", "db", post.cf_uri) - post.cf_set("FILE", "target", post.wrk_target) - post.cf_set("FILE", "web", web_target) + + # Create HTML local sub uri + post.cf_set("FILE", "id", post.uri_id) + post.cf_set("FILE", "uri", post.uri) + post.cf_set("FILE", "db", post.cf_uri) + post.cf_set("FILE", "target", post.wrk_target) + post.cf_set("FILE", "web", web_target) + post.cf.set("FILE", "sub_uri", post.wrk_target.count('/') * "../" or "./") # [WIP] # ----- diff --git a/src/var/lib/tyto/program/debug.py b/src/var/lib/tyto/program/debug.py index 90c9b44..3587bbd 100644 --- a/src/var/lib/tyto/program/debug.py +++ b/src/var/lib/tyto/program/debug.py @@ -48,11 +48,9 @@ import langs, args #-----------------------------------# def out(nbr, var, val, show, color, stop): args.get_options() - if not show: - # Show only warn and error logs - show = args.dlogs or args.erron and color > 0 - if not show: + logit = show or args.erron and color > 0 or args.dlogs + if not logit: return nbr # COlors diff --git a/src/var/lib/tyto/program/post.py b/src/var/lib/tyto/program/post.py index 8b9e3ff..ac28397 100644 --- a/src/var/lib/tyto/program/post.py +++ b/src/var/lib/tyto/program/post.py @@ -83,7 +83,7 @@ def is_article(target): wrk_target = uri.rsplit(domain.wrk_articles)[1] # Set web target, replace last .tyto with .html - web_target= wrk_target[:-4] + "html" + web_target = wrk_target[:-4] + "html" # Load Database, get and compare values cf_load() @@ -248,12 +248,16 @@ def cf_datas(): www_uri = cf_get("WWW", "uri", False) www_static = cf_get("WWW", "static", True) - global set_title, set_about, set_date, set_author - set_title = cf.get("HEADERS", "title") - set_about = cf.get("HEADERS", "about") - set_date = cf.get("HEADERS", "date") - set_tags = cf.get("HEADERS", "tags") - set_author = cf.get("HEADERS", "authors") + global set_title, set_about, set_date, set_tags, set_author + set_title = cf_get("HEADERS", "title", False) + set_about = cf_get("HEADERS", "about", False) + set_date = cf_get("HEADERS", "date", False) + set_tags = cf_get("HEADERS", "tags", False) + set_author = cf_get("HEADERS", "authors", False) + + global sub_uri, www_logo + sub_uri = cf_get("FILE", "sub_uri", False) + www_logo = cf_get("HEADERS", "logo", False) #===============================# diff --git a/src/var/lib/tyto/program/tools.py b/src/var/lib/tyto/program/tools.py index a2ab867..827eff3 100644 --- a/src/var/lib/tyto/program/tools.py +++ b/src/var/lib/tyto/program/tools.py @@ -33,8 +33,8 @@ #-------------------------- from hashlib import blake2b -import sys, os, configparser, datetime, time, base64 -import args, debug, domain, post +import sys, os, configparser, datetime, time, base64, shutil +import args, langs, debug, domain, post #=========================================# @@ -123,18 +123,35 @@ def create_dirs(path): #----------------------------# def create_file(file_path, contents): up = bool(os.path.exists(file_path)) - try: with open(file_path, "w") as f: f.write(contents) except: - # Exit at error + # Exit if not created debug.out(7, "False", file_path, True, 2, True) # log "update" or "new" file_name = os.path.basename(file_path) if up: debug.out(207, file_name, file_path, False, 0, False) - else: debug.out(206, file_name, file_path, False, 0, False) + else: debug.out(206, file_name, file_path, True, 0, False) + + +#============# +# Copy files # +#------------# +def copy_files(src, dst): + # Copy file, check if dst exists + up = bool(os.path.exists(dst)) + try: + shutil.copy2(src, dst, follow_symlinks=False) + except: + debug.out(7, langs.logs.copy, dst, True, 2, False) + return + + # log "update" or "new" + file_name = os.path.basename(src) + if up: debug.out(207, file_name, dst, False, 0, False) + else: debug.out(206, file_name, dst, True, 0, False) #===========================================# @@ -142,8 +159,7 @@ def create_file(file_path, contents): #-------------------------------------------# def update_ini_file(file_path, section, key, val): # Exit if no file - if not os.path.exists(file_path): - debug.out(5, "False", file_path, True, 2, True) + os.path.exists(file_path) or debug.out(5, "False", file_path, True, 2, True) # Load ini file config = configparser.ConfigParser() diff --git a/src/var/lib/tyto/program/tyto.py b/src/var/lib/tyto/program/tyto.py index 4a1c135..8aab998 100644 --- a/src/var/lib/tyto/program/tyto.py +++ b/src/var/lib/tyto/program/tyto.py @@ -107,7 +107,7 @@ code_line = '

' + \ '

' image_link = '' + \ - '%s%s' + \ + '%s%s' + \ '%s' a_link = '%s' diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index 1ffbec9..167ebf1 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -35,7 +35,7 @@ # file program : #-------------------------- -import sys, os, configparser +import sys, os, configparser, shutil import args, debug, tyto, tools, post, domain, check, langs @@ -88,49 +88,103 @@ def is_article(target): # Create full page page_html_create() + + # Copy article files + create_files() - print("\n> wip:", target) - print(html_post) + #print() + #print(html_post) #=======================# # Create full page HTML # #-----------------------# def page_html_create(): + global page_html + page_html = \ page_tpl%( post.set_title, domain.title, domain.lang, nginx_mods%("metas"), - metas_post, + metas_post%( + domain.www_url, + domain.lang, + domain.mail, + domain.license, + post.set_title, + post.set_author, + post.set_about, + post.set_tags, + post.cf.get("WWW", "web"), + post.sub_uri, domain.styles, + os.path.splitext(domain.favicon)[1][1:], post.sub_uri, domain.favicon, + domain.www_url, domain.rss, domain.title, + domain.title, + post.set_title, + post.cf.get("WWW", "web"), + post.set_about, + post.www_logo, + datepub, + post.set_title, post.set_author, domain.sep, domain.title + ), nginx_mods%("header"), nginx_mods%("navbar"), post.cf.get("WWW", "web"), - langs.site.permalink, langs.logs.pp, post.set_title, post.cf.get("WWW", "web"), - post.set_title, post.set_author, domain.title, + langs.site.permalink, langs.logs.pp, post.cf.get("WWW", "web"), + post.set_title, html_post, footer_post, nginx_mods%("sidebar"), nginx_mods%("footer") ) + - print() - print(page_html) +#========================================# +# Create and copy files for this article # +#----------------------------------------# +def create_files(): + # Copy files used by article + for key, src_uri in post.cf.items("SOURCE_FILES"): + dst_uri = src_uri.replace(domain.wrk_articles, domain.wip) + + wip_dirs = dst_uri.rsplit(os.path.basename(src_uri))[0] or domain.wip + + tools.create_dirs(wip_dirs) + tools.copy_files(src_uri, dst_uri) + + # Create source post wip dirs and html file + wip_dirs = \ + post.wip_uri.rsplit(os.path.basename(post.wip_uri))[0] or domain.wip + tools.create_dirs(wip_dirs) + tools.create_file(post.wip_uri, page_html) + # Copy domain work template directory + shutil.copytree(domain.wrk_tpl, + domain.wip_tpl, + dirs_exist_ok=True) + # Copy source file if article_code is True in domain config + if domain.article_code: + tools.copy_files(post.uri, + os.path.join(domain.wip, post.wrk_target) + ) + #===========================================# # Check full article contents (head + text) # # In error case, exit or return if targetS # #-------------------------------------------# def convert(target): - global targets, raw_post + global targets, raw_post, datepub targets = args.targets # Target is a tyto article format if not post.is_article(target): return False + datepub = tools.nowdate() + # Check/create wip server directories # Exit on error ! for key, directory in domain.cf.items("WIP_DIRS"): @@ -176,7 +230,7 @@ def convert(target): value_replace("ICODES", False, True) value_replace("BCODES", False, True) value_replace("CODES", False, True) - + footer_post_create() return True @@ -358,7 +412,9 @@ def images(): #
%s, %s%s

\n'%( post.set_date, post.set_author, link_post_code ) + \ @@ -903,11 +959,9 @@ def navbar_html_create(srv): html_index_srv_uri = os.path.join(html_indexes[srv], folder) html_index_srv_uri = os.path.join(html_index_srv_uri, "index.html") if not os.path.exists(html_index_srv_uri): - post.error = \ debug.out(5, 'Navbar. %s) "%s"'%( ln, html_index_srv_uri.rsplit(domain.srv_name)[1] - ), domain.wrk_navbar, True, 2, False) - return False + ), domain.wrk_navbar, True, 1, False) # Load post configuration file in tmp module # return if unused or post errors @@ -1011,13 +1065,11 @@ def sidebar_html_create(srv): wrk_post[:-4] + "html" ) - # Unused HTML post + # Unused index.html in srv if not os.path.exists(srv_post_uri): - post.error = \ debug.out(5, "Sidebar. %s) %s"%( ln, wrk_post - ), srv_post_uri, True, 2, False) - return False + ), srv_post_uri, True, 1, False) # Load post configuration file in tmp module # return if unused or post errors @@ -1047,8 +1099,7 @@ def sidebar_html_create(srv): post.error = \ debug.out(9, 'Sidebar', domain.wrk_sidebar, True, 2, False) return False - - + tools.create_file(modules["sidebar"][srv], module_sidebar%sidebar_html) return True @@ -1094,7 +1145,7 @@ def fill_footer_raw(): ) # Create copyright line - cur_date = tools.nowdate().rsplit("-")[0] + cur_date = datepub.rsplit("-")[0] dom_date = domain.date.rsplit("-")[0] if cur_date != dom_date: dates = "%s-%s"%(dom_date, cur_date) else: dates = cur_date @@ -1167,7 +1218,7 @@ metas_post = """ - + @@ -1175,7 +1226,7 @@ metas_post = """ -%s + @@ -1250,7 +1301,7 @@ page_tpl = """

-%s (%s) - %s +%s

%s @@ -1261,10 +1312,10 @@ page_tpl = """ %s - - %s + + """ diff --git a/src/var/lib/tyto/tpl_files/styles.css b/src/var/lib/tyto/tpl_files/styles.css index a551c53..5bc316a 100644 --- a/src/var/lib/tyto/tpl_files/styles.css +++ b/src/var/lib/tyto/tpl_files/styles.css @@ -37,8 +37,7 @@ a.site_menu_link {} /* div contains
and