diff --git a/CHANGELOG.md b/CHANGELOG.md index 03a4276..e75998a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ Tyto - Littérateur # CURRENTLY IN DEV (in devel branch) ! +## [1.9.36] +- fix translations modules +- added metas module +- added command "show metas" to see those already set in page with post + ## [1.9.35] - Working on creating modules - - Todo last: metas diff --git a/debian/control b/debian/control index 5280379..afce295 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Package: tyto -Version: 1.9.35 +Version: 1.9.36 Section: custom Priority: optional Architecture: all diff --git a/src/usr/bin/tyto b/src/usr/bin/tyto index 541fdf3..3bdd6c8 100755 --- a/src/usr/bin/tyto +++ b/src/usr/bin/tyto @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Version: 1.9.35 -# Updated: 2023-10-18 1697613100 +# Version: 1.9.36 +# Updated: 2023-11-11 1699742831 # Tyto - Littérateur # Copyright (C) 2023 Cyrille Louarn diff --git a/src/var/lib/tyto/program/__pycache__/show.cpython-311.pyc b/src/var/lib/tyto/program/__pycache__/show.cpython-311.pyc index 5be388b..86983c1 100644 Binary files a/src/var/lib/tyto/program/__pycache__/show.cpython-311.pyc and b/src/var/lib/tyto/program/__pycache__/show.cpython-311.pyc differ 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 4862efe..7258e87 100644 Binary files a/src/var/lib/tyto/program/__pycache__/wip.cpython-311.pyc and b/src/var/lib/tyto/program/__pycache__/wip.cpython-311.pyc differ diff --git a/src/var/lib/tyto/program/show.py b/src/var/lib/tyto/program/show.py index d7ff1da..ebf5f8a 100644 --- a/src/var/lib/tyto/program/show.py +++ b/src/var/lib/tyto/program/show.py @@ -33,7 +33,7 @@ #-------------------------- import os -import domain, debug +import domain, debug, wip #====================================# @@ -42,7 +42,8 @@ import domain, debug #------------------------------------# def manage(action, target): do = { - "domains": all_domains, + "domains" : all_domains, + "metas" : metas_post, } do[target]() @@ -62,4 +63,11 @@ def all_domains(): except: debug.out(104, "False", domain.ult_dlf_uri, True, 1, False) + +#====================================# +# Show article metas used in page # +# Not included, default set by users # +#------------------------------------# +def metas_post(): + print(wip.metas_post) diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index bea167a..4af9b96 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -626,6 +626,18 @@ def get_modules(srv): fill_footer_raw() modules = \ { + "metas" : { + "raw" : langs.logs.metas_header%( + domain.title, domain.wrk_articles, + domain.wrk_metas, + domain.wip_metas, + domain.www_metas + ), + "wrk" : domain.wrk_metas, + "wip" : domain.wip_metas, + "www" : domain.www_metas, + "set" : metas_html_create + }, "header" : { "raw" : module_header%( "/template/%s"%domain.logo, domain.about, @@ -701,8 +713,8 @@ def get_modules(srv): mods_cf_write = True create_html_module = True - # Unused module HTML file - if not os.path.exists(modules[mod][srv]): + # Unused module HTML file or "--force" option + if not os.path.exists(modules[mod][srv]) or args.force: create_html_module = True # Create HTML module if needed (raw updated, or unused html file) @@ -719,6 +731,26 @@ def get_modules(srv): return True +#================================================# +# Create metas.html in server (wip/ or www/) # +# Only use line starting with " + + + + + + + + + + + + + + + + + + + + + + + + + + +%s + + + +%s (%s) %s %s""" + module_header = """