From 238b886bea0df9a3e6806ba07724ed788a2fd6b7 Mon Sep 17 00:00:00 2001 From: Cyrille LOUARN Date: Wed, 8 Nov 2023 01:14:56 +0100 Subject: [PATCH] [1.9.34] --- CHANGELOG.md | 7 + src/usr/bin/tyto | 2 +- .../program/__pycache__/post.cpython-311.pyc | Bin 12957 -> 13131 bytes .../program/__pycache__/tyto.cpython-311.pyc | Bin 2518 -> 2591 bytes .../program/__pycache__/wip.cpython-311.pyc | Bin 28936 -> 35666 bytes src/var/lib/tyto/program/post.py | 31 +- src/var/lib/tyto/program/tyto.py | 9 +- src/var/lib/tyto/program/wip.py | 272 ++++++++++++++---- src/var/lib/tyto/tpl_files/styles.css | 18 ++ .../__pycache__/logs_fr.cpython-311.pyc | Bin 4550 -> 4645 bytes src/var/lib/tyto/translations/logs_en.py | 3 + src/var/lib/tyto/translations/logs_fr.py | 3 + 12 files changed, 271 insertions(+), 74 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bab16f..4f6b1e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ Tyto - Littérateur # CURRENTLY IN DEV (in devel branch) ! +## [1.9.34] +- Working on creating modules +- - fixes typos codes +- - header, navbar, sidebar = ok +- - toto footer contents and testing things +- - Manage modules with an ini db file to avoid creating HTML updated modules + ## [1.9.33] - Working on creating modules (header, navbar, sidebar, header) - - Added working header module diff --git a/src/usr/bin/tyto b/src/usr/bin/tyto index 1c0911b..2d28505 100755 --- a/src/usr/bin/tyto +++ b/src/usr/bin/tyto @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Version: 1.9.33 +# Version: 1.9.34 # Updated: 2023-10-18 1697613100 # Tyto - Littérateur 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 ea6f09abe173e23f6c3738cdb4617411bdc6dbf9..60ace8393723d72f94e218c0fb31013fcf3c0904 100644 GIT binary patch delta 2215 zcmbVN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Ngoyl6dVW$gb5vm`sOSgMvzB`4>M-ZMv zFaVh3XcIP*wOJ=`5hh_`G_dv0_WkJbpd|nB?V7gq*@Cf${6M?6U2jP64R^VJV6^nx KwoyUCD*gp+tI@gu 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 c5e5e2a2632ce30b9acbc58e176d934634379c46..67d1412edc28cd94a17f3843b23d9756f75d88e1 100644 GIT binary patch delta 186 zcmca6JYR%&IWI340}#ls_ey=dk++YHH{M23S63lCHK{nWBz5uvwvfamWD$kn%#_rm z#3BVaFoffQN^*;VlB&gAHu|MGKvnu+12&7X ocQNww<>sf9=D-cvyp}_RQIt)HrGf8*0HYvF11|^`nE)LN02E(1cmMzZ delta 113 zcmbO)a!r_bIWI340}$}kx~Ia{|4ZI*& IWCFAU05NqR`~Uy| 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 2863a3a91ff73dcc9f051bc35e8b8f3b5668f593..20bf17d04ce75d8e736f63bf518b4dc0f44828d7 100644 GIT binary patch delta 10181 zcmbta3sf7|nV!*Oq#2Eb0HG%W1PCJ=;|Hb$gK4obv5n(Lz>Xb1WSJ301_K_A?SzVm zJobe6xDEDoYLeKElGCL0B<=AoP1k38cGITKwr6{iBA?lss)ti2+q8AJ>Edp(>!v-M z{r?#WBXr{$A9nr@9V$c{fDu4=&N7RSiWvHa}+$guWktsJ#^OMr2lw!$?iBM z(EZ%~oS=D(y5A&d0eL|OXcqK<7J&iG6AXY>!3dZyuz&>u2UsYW0Br&fSR|MM?Sci+ zA>;u%1uLLS$Om)_1%Mu*5U^OV0eXcZz>;#o4zE(d0azwD0eylCuv~E8Um?()RKPRE z&@1)CRL^Sm=t(Q{UD`+zJ8k4S#zBmRJWCsOVBLNVMUBuSTB(3M?6qkUCh|OEBgRcu z-H=mqk)hQ^rMeg$(+YZl5$Kl~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ij*I z*IUCT+=ZIVq_DGD4@fv+4`=wFoZkn6{cbIkBVU-QCmabkd+pA!9Y&O${X{O%s@b-k z-fB?Do4frT*@%d$o{Eo1L=&2i>L z{f;tL*j-WQgxDR}+!8j>AatV_5ex)i<`qaWD)rT|JGx5;g6&i}&`=dps~STpzvm_~ zN$In0jvi@^(z;-uF&wO-j{$85&rJKIShuX)QKuc#;*%JGG6YO|`b>4P?il?sl8wRI z;1yEeXRHsYlQy8}VtP#a1~kIuJS+|5XbN|bK>rCm3U3*K$HknCg=Z&bWPFMupCKGW zcn{%ogcS&Qm8P>d+*I8PcS@u?3K=uTQ{9f)FkUxmZy4cU-WdqqDJM&WO<`#gY z69aGh<>26%9X9|ZfFfw4OKCBljyO@hY&xpjxHKk)x}?Q4yeGj%kdeka;kMMJ^f$tG z^(+$2a%&_evshh8xdTT*_y_p9`aOu=gTjQ}Gq@D)q|z$(e9t$Qmp(xzyuLFn_qUv0 z_rSU{TkhX7(mdu3k9)&|9TQ&v;Gwtu6(iCUO=JGLaerM(SZOJ}gup85E7-c@Re?8r zYln&_{6#|nxWNib&K$b`(CMxRx`zB0nVZHJ)~_a}(v&cbmw5fd97-;doxvNW*AoEN}UE-twoGjpa2B`7V0A4>-@pp74!% z>c>6xa9c~o69q*n<;!O9%~tA{oW zZveBE%spFkwq_RZ#lY&6*;rD_WmEz-PuaenRi+I)C$k5aFJGRfW{7DDTi3gfzx997 z?A=su{9WN1{QP10ng;khZ>U3TXhPZx<)%$lmKQ<pAq;!atxby zPzyA}gnPe=GE;By51~pC8laPkLKg5($(2olM#s^Dv%K@srH$^$D{M zm(9Bl^nqVNeH#$+M?z8?i9plw~xzZ!0IFCp%fkOhs|?@f9;4f_a^ fbMPki=Dp>sg4;Mf2fGcNk_E3DJ6;PE|7Z7KD|wo= diff --git a/src/var/lib/tyto/program/post.py b/src/var/lib/tyto/program/post.py index 70ab4f9..88ad2b1 100644 --- a/src/var/lib/tyto/program/post.py +++ b/src/var/lib/tyto/program/post.py @@ -157,40 +157,49 @@ def cf_load(): #======================================# # Load another post configuration file # #--------------------------------------# -def tmp_load(wrk_post, db_id): +def tmp_load(wrk_post, wrk_post_uri): global error - db_tmp_uri = os.path.join(domain.wrk_db, db_id) - post_tmp_uri = os.path.join(domain.wrk_articles, wrk_post) + db_uri = os.path.join( + domain.wrk_db, + tools.get_filesum(wrk_post_uri, False) + ".ini" + ) - if not os.path.exists(db_tmp_uri): + if not os.path.exists(db_uri): error = \ - debug.out(5, wrk_post, db_tmp_uri, True, 2, False) + debug.out(5, wrk_post, db_uri, True, 2, False) return False global tmp_cf tmp_cf = "" tmp_cf = configparser.ConfigParser() - tmp_cf.read(tmp_uri) + tmp_cf.read(db_uri) - if tmp_cf.get("CHECK", "errors"): + if tmp_cf.getboolean("CHECK", "errors"): error = \ - debug.out(10, "True", db_tmp_uri, True, 2, False) + debug.out(10, "True", db_uri, True, 2, False) return False - global tmp_title, tmp_about + global tmp_title, tmp_about, tmp_logo try: tmp_title = tmp_cf.get("HEADERS", "title") except: error = \ - debug.out(51, "title:", post_tmp_uri, True, 2, False) + debug.out(51, "title:", wrk_post_uri, True, 2, False) return False try: tmp_about = tmp_cf.get("HEADERS", "about") except: error = \ - debug.out(51, "about:", post_tmp_uri, True, 2, False) + debug.out(51, "about:", wrk_post_uri, True, 2, False) + return False + + try: + tmp_logo = tmp_cf.get("HEADERS", "logo") + except: + error = \ + debug.out(51, "logo:", wrk_post_uri, True, 2, False) return False return True diff --git a/src/var/lib/tyto/program/tyto.py b/src/var/lib/tyto/program/tyto.py index 9802265..0046ee5 100644 --- a/src/var/lib/tyto/program/tyto.py +++ b/src/var/lib/tyto/program/tyto.py @@ -161,14 +161,19 @@ module_header = """ """ -module_navbar = """ +module_navbar = """ """ -module_aside = """ +module_sidebar = """ + """ module_footer = """ diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index 52a5b39..8caefd8 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 +import sys, os, configparser import args, debug, tyto, tools, post, domain, check, langs @@ -105,6 +105,11 @@ def convert(target): for key, directory in domain.cf.items("WIP_DIRS"): tools.create_dirs(directory) + # Warn if unused registred file in wrk template/ directory + for key, uri in domain.cf.items("USER_TEMPLATE_FILES"): + os.path.exists(uri) or \ + debug.out(5, key, uri, True, 1, False) + # Check/Create modules files # navbar, sidebar, header, footer if not get_modules("wip"): @@ -591,6 +596,27 @@ def convert_list(markdown_str, mark_b, mark_c): #=========# # Modules #==================================================================== #---------# +#==================================# +# Create modules ini database file # +# return False if: # +# - datas changed # +# - not created # +#----------------------------------# +def modules_db(): + global db_mods_uri, mods_cf + + db_mods_uri = os.path.join(domain.wrk_mods, ".modules.ini") + + if not os.path.exists(db_mods_uri): + tools.create_file(db_mods_uri, ini_mods) + + mods_cf = configparser.ConfigParser() + mods_cf.read(db_mods_uri) + + + + + #============================================# # Check / Create modules files (.raw + .html # # process: "wip" or "www" # @@ -599,40 +625,10 @@ def convert_list(markdown_str, mark_b, mark_c): # - header # # - footer # #--------------------------------------------# -def get_modules(srv): +def get_modules(srv): global modules # Modules settings - """ - raws_uris = { - "header" : domain.wrk_header, - "navbar" : domain.wrk_navbar, - "sidebar" : domain.wrk_sidebar, - "footer" : domain.wrk_footer - } - raws_sets = \ - { - "header" : tyto.module_header%( - "/template/%s"%domain.logo, domain.about, - "/template/%s"%domain.logo, domain.about, domain.about, - domain.title, - domain.about - ), - "navbar" : langs.logs.navbar_header%( - domain.title, domain.wrk_articles, - domain.wrk_navbar, - domain.wip_navbar, - domain.www_navbar - ), - "sidebar" : langs.logs.sidebar_header%( - domain.title, domain.wrk_articles, - domain.wrk_sidebar, - domain.wip_sidebar, - domain.www_sidebar - ), - "footer" : tyto.module_footer, - } - """ modules = \ { "header" : { @@ -680,16 +676,43 @@ def get_modules(srv): }, } + # Avois creating again module if files are same + modules_db() + mods_cf_write = False + # Manage modules # Create raw files, and set html "srv" file for mod in modules: + create_html_module = False + # Create user raw files modules in modules/ directory - os.path.exists( modules[mod]["wrk"]) or \ - tools.create_file(modules[mod]["wrk"], modules[mod]["raw"]) - - # Create HTML file in srv (wip or www) - if not modules[mod]["set"](srv): - return False + if os.path.exists(modules[mod]["wrk"]): + cur_raw_id = tools.get_filesum(modules[mod]["wrk"], True) + mod_raw_id = mods_cf.get(mod.upper(), "raw") + if cur_raw_id != mod_raw_id: + mods_cf.set(mod.upper(), "raw", cur_raw_id) + mods_cf_write = True + create_html_module = True + + else: + tools.create_file(modules[mod]["wrk"], modules[mod]["raw"]) + mods_cf.set(mod.upper(), "raw", cur_raw_id) + mods_cf_write = True + create_html_module = True + + # Unused module HTML file + if not os.path.exists(modules[mod][srv]): + create_html_module = True + + # Create HTML module if needed (raw updated, or unused html file) + if create_html_module: + print(">> HTML", mod) + if not modules[mod]["set"](srv): + return False + + if mods_cf_write: + with open(db_mods_uri, "w") as f: + mods_cf.write(f) return True @@ -700,7 +723,7 @@ def get_modules(srv): # Copy other lines # # modules/tyto_header.raw has default contents # #------------------------------------------------# -def header_html_create(srv): +def header_html_create(srv): with open(domain.wrk_header, "r") as f: header_raw = f.read().rsplit("\n") header_html = "" @@ -737,11 +760,11 @@ def navbar_check(srv): return True #=================================================# +# navbar is True in domain configuration file # # Create HTML li lists from tyto_navbar.raw datas # #-------------------------------------------------# def navbar_html_create(srv): - items = False - + items = False html_indexes = { "wip" : domain.wip, "www" : domain.www @@ -749,19 +772,23 @@ def navbar_html_create(srv): with open(domain.wrk_navbar, "r") as f: navbar_raw = f.read().rsplit("\n") - navbar_html = "" + navbar_html = "" + html_line = '' for ln, line in enumerate(navbar_raw, 1): if line.lstrip().startswith("#") or \ not line or \ line.isspace(): continue + + # Get directory name and link name (if separated by "#") + try: + folder = line.lstrip().rsplit("#")[0].rstrip() + link_name = line.lstrip().rsplit("#")[1].lstrip().rstrip() + except: + link_name = folder = line.lstrip().rstrip() - html_line = '' - title_html = "" - - # Get directory name - folder = line.lstrip() folder_uri = os.path.join(domain.wrk_articles, folder) # Unused directory in articles/ @@ -795,23 +822,19 @@ def navbar_html_create(srv): # Load post configuration file in tmp module # return if unused or post errors - db_id = tools.get_filesum(wrk_index_uri, False) + ".ini" - if not post.tmp_load(wrk_index, db_id): + if not post.tmp_load(wrk_index, wrk_index_uri): return False items = True title_html = ' title="%s - %s"'%(post.tmp_title, post.tmp_about) - + # Format HTML href uri if not folder.startswith("/"): folder = "/%s"%folder - if not navbar_html: - navbar_html = html_line%(title_html, folder, folder) - else: - navbar_html = "%s\n%s"%( - navbar_html, - html_line%(title_html, folder, folder) - ) + navbar_html = "%s\n%s"%( + navbar_html, + html_line%(title_html, domain.css, folder, link_name) + ) if not items: post.error = \ @@ -823,10 +846,121 @@ def navbar_html_create(srv): return True -# -# -# +#=========================================================# +# Create sidebar.html in server (wip/ or www/) # +# If sidebar is deactivated, create one HTML comment line # +# else, create HTML li lists from tyto_sidebar.raw datas # +#---------------------------------------------------------# def sidebar_check(srv): + # sidebar is NOT activated (= 0) in domain configuration file + sidebar_html = "" + if int(domain.sidebar_items) == 0: + tools.create_file(modules["sidebar"][srv], sidebar_html) + return True + + # Create sidebar HTML file in srv, from raw + if not sidebar_html_create(srv): + return False + + return True + + +#==================================================# +# sidebar_items > 0 in domain configuration file # +# Create HTML li lists from tyto_sidebar.raw datas # +#--------------------------------------------------# +def sidebar_html_create(srv): + max_items = int(domain.sidebar_items) + items = 0 + html_post_uri = { + "wip" : domain.wip, + "www" : domain.www + } + + with open(domain.wrk_sidebar, "r") as f: + sidebar_raw = f.read().rsplit("\n") + sidebar_html = "" + html_line = '
  • ' + \ + '' + \ + '
    ' + \ + '
    ' + \ + '

    %s

    ' + \ + '
    ' + \ + '
    ' + \ + '%s' + \ + '

    %s

    ' + \ + '
    ' + \ + '
    ' + \ + '
    ' + \ + '
  • ' + + for ln, line in enumerate(sidebar_raw, 1): + # User wants max_items + if items > max_items: + break + + if line.lstrip().startswith("#") or \ + not line or \ + line.isspace(): + continue + + # Set post uri from line + wrk_post = line.lstrip() + wrk_post_uri = os.path.join(domain.wrk_articles, wrk_post) + + # Unused file in articles/ + if not os.path.exists(wrk_post_uri): + post.error = \ + debug.out(5, "Sidebar. %s) %s"%( + ln, wrk_post + ), wrk_post_uri, True, 2, False) + return False + + # Set HTML post uri in srv + srv_post_uri = os.path.join( + html_post_uri[srv], + wrk_post[:-4] + "html" + ) + + # Unused HTML post + 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 + + # Load post configuration file in tmp module + # return if unused or post errors + if not post.tmp_load(wrk_post, wrk_post_uri): + return False + + # Post can be added to list + items += 1 + if not wrk_post.startswith("/"): + wrk_post = "/" + wrk_post + wrk_post = wrk_post[:-4] + "html" + if wrk_post.endswith("index.html"): + wrk_post = wrk_post[:-10] + sidebar_html = "%s\n%s"%( + sidebar_html, + html_line%( + wrk_post, + post.tmp_title, + '/%s'%post.tmp_logo.rsplit(domain.www_url)[1], + post.tmp_title, + post.tmp_about, + ) + ) + + # sidebar configuration error + if items == 0: + post.error = \ + debug.out(9, 'Sidebar', domain.wrk_sidebar, True, 2, False) + return False + + + tools.create_file(modules["sidebar"][srv], tyto.module_sidebar%sidebar_html) return True @@ -852,3 +986,21 @@ def footer_html_create(srv): tools.create_file(modules["footer"][srv], footer_html) return True + + +#======# +# MAIN #======================================================================= +#======# +ini_mods = """ +[HEADER] +raw = + +[NAVBAR] +raw = + +[SIDEBAR] +raw = + +[FOOTER] +raw = +""" diff --git a/src/var/lib/tyto/tpl_files/styles.css b/src/var/lib/tyto/tpl_files/styles.css index 5608a1b..0e7209b 100644 --- a/src/var/lib/tyto/tpl_files/styles.css +++ b/src/var/lib/tyto/tpl_files/styles.css @@ -31,6 +31,8 @@ p#site_infos_text {} nav#site_menu {} menu#site_menu_items {} li.site_menu_item {} +/* also a.tyto {} */ +a.site_menu_link {} /* div contains
    and