From 7849ca4f4bbe87db3779ba10acdece273b54ac69 Mon Sep 17 00:00:00 2001 From: Cyrille LOUARN Date: Thu, 28 Dec 2023 00:31:19 +0100 Subject: [PATCH] [1.9.50] --- CHANGELOG.md | 212 +- LICENSE | 2 +- README.md | 495 ++-- debian/control | 2 +- src/usr/bin/tyto | 193 +- .../program/__pycache__/args.cpython-311.pyc | Bin 2769 -> 0 bytes .../program/__pycache__/check.cpython-311.pyc | Bin 47086 -> 0 bytes .../program/__pycache__/debug.cpython-311.pyc | Bin 5043 -> 0 bytes .../__pycache__/domain.cpython-311.pyc | Bin 25073 -> 0 bytes .../program/__pycache__/forms.cpython-311.pyc | Bin 8310 -> 0 bytes .../program/__pycache__/help.cpython-311.pyc | Bin 435 -> 0 bytes .../program/__pycache__/langs.cpython-311.pyc | Bin 3014 -> 0 bytes .../program/__pycache__/logs.cpython-311.pyc | Bin 3779 -> 0 bytes .../program/__pycache__/new.cpython-311.pyc | Bin 1160 -> 0 bytes .../program/__pycache__/post.cpython-311.pyc | Bin 15993 -> 0 bytes .../program/__pycache__/show.cpython-311.pyc | Bin 1426 -> 0 bytes .../__pycache__/sitemaps.cpython-311.pyc | Bin 6714 -> 0 bytes .../program/__pycache__/tools.cpython-311.pyc | Bin 8458 -> 0 bytes .../program/__pycache__/tyto.cpython-311.pyc | Bin 1558 -> 0 bytes .../__pycache__/userset.cpython-311.pyc | Bin 1289 -> 0 bytes .../program/__pycache__/wip.cpython-311.pyc | Bin 49063 -> 0 bytes src/var/lib/tyto/program/args.py | 244 +- src/var/lib/tyto/program/check.py | 1714 +++++--------- src/var/lib/tyto/program/debug.py | 168 +- src/var/lib/tyto/program/domain.py | 1134 +++++----- src/var/lib/tyto/program/feed.py | 191 ++ src/var/lib/tyto/program/form.py | 179 ++ src/var/lib/tyto/program/help.py | 70 +- src/var/lib/tyto/program/langs.py | 144 +- src/var/lib/tyto/program/modules.py | 601 +++++ src/var/lib/tyto/program/new.py | 69 +- src/var/lib/tyto/program/page.py | 219 ++ src/var/lib/tyto/program/post.py | 753 ++----- src/var/lib/tyto/program/publish.py | 178 ++ src/var/lib/tyto/program/sitemap.py | 136 ++ src/var/lib/tyto/program/tools.py | 329 ++- src/var/lib/tyto/program/wip.py | 1995 ++++++----------- .../__pycache__/logs_fr.cpython-311.pyc | Bin 6286 -> 0 bytes .../__pycache__/website_en.cpython-311.pyc | Bin 206 -> 0 bytes .../__pycache__/website_fr.cpython-311.pyc | Bin 881 -> 0 bytes src/var/lib/tyto/translations/logs_en.py | 687 +++++- src/var/lib/tyto/translations/logs_fr.py | 717 +++++- src/var/lib/tyto/translations/site_en.py | 57 + src/var/lib/tyto/translations/site_fr.py | 57 + 44 files changed, 5592 insertions(+), 4954 deletions(-) delete mode 100644 src/var/lib/tyto/program/__pycache__/args.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/check.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/debug.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/domain.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/forms.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/help.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/langs.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/logs.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/new.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/post.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/show.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/sitemaps.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/tools.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/tyto.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/userset.cpython-311.pyc delete mode 100644 src/var/lib/tyto/program/__pycache__/wip.cpython-311.pyc create mode 100644 src/var/lib/tyto/program/feed.py create mode 100644 src/var/lib/tyto/program/form.py create mode 100644 src/var/lib/tyto/program/modules.py create mode 100644 src/var/lib/tyto/program/page.py create mode 100644 src/var/lib/tyto/program/publish.py create mode 100644 src/var/lib/tyto/program/sitemap.py delete mode 100644 src/var/lib/tyto/translations/__pycache__/logs_fr.cpython-311.pyc delete mode 100644 src/var/lib/tyto/translations/__pycache__/website_en.cpython-311.pyc delete mode 100644 src/var/lib/tyto/translations/__pycache__/website_fr.cpython-311.pyc create mode 100644 src/var/lib/tyto/translations/site_en.py create mode 100644 src/var/lib/tyto/translations/site_fr.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b247ba..2686b6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,213 +10,5 @@ Tyto - Littérateur # CURRENTLY IN DEV (in devel branch) ! -## [1.9.39] -- fix datepub in modules when "check domain" -- add Tyto - Littérateur generator links at HTML footer creation -- fix settings from command line options -- add "RSS" and "sitemap" links to default footer (not yet processed) -- add command "set 'MODULE_NAME'" to create default module (header, footer...) -- Create again all HTML modules with option -F, --force -- With option -E, --errors: only show warning and error logs -- Avoid creating a domain in a directory domain set yet -- better modules managed in "wip" process -- Added logs file (include ALL logs) in /var/log/tyto -- - current.log for current session only -- - archive.log for all sessions -- Sitemap (! In dev) -- - Create sitemaps in root and sub-directories - -## [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 -- Added web target (without index.html) in section "FILE" in post DB -- Added article footer contents - -## [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 -- check -- - target: domain, wip, www to check directories and files -- - - domain: create .raw modules and wip modules (.html) -- wip -- - html values are now in wip.py -- fixes and more... - -## [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 -- - Finishing navbar module... -- - Todo Next: sidebar and footer modules - -## [1.9.32] -- Working on creating modules (header, navbar, sidebar, header) - -## [1.9.31] -- Fix replacing markers starting LINE with HTML -- Added tpl_files directory -- - addes styles.css (empty with classes used) - -## [1.9.30] -- 'wip' process -- - About all markers done ! - -## [1.9.29] -- Translations -- - added for logs (english) -- - updated french logs -- wip (working on...) -- - added modules conversions (source to HTML) -- check -- - some fixes and updated code -- tools -- - check css content -- readme : updated article example with comments - -## [1.9.28] -- readme -- - updated tyto article, with comments to show how to -- multiple targets -- - fix CSS classe name error -- - reset stats, post.error, HEADERS datas -- check process: -- - Added hr and br tags (CSS class name check) -- - fix blockquote title HTML -- - New method to split separator in article -- - fix icode, bcode contents HTML signs (converted) - -## [1.9.27] -- fix when target article .tyto is missing -- Nearly all stats are added in DB from modules -- Only used tags and stats (or nearly) are added to DB -- cleaner code -- check: -- - added words_tags (strong, italics...) -- - "all" target now ready - -## [1.9.26] -- user can indent titles in text -- prepared words markers (strong, bolds) (some to add soon) - -## [1.9.25] -- fix typo when creating HTML list -- new anchors process (HTML prepared at 'check') - -## [1.9.24] -- new list process (HTML prepared at 'check') - -## [1.9.23] -- new quote process (HTML prepared at 'check') - -## [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] -- new indentation (3 spaces) -- added 'raw:' marker -- (for wip process): -- - added html titles to post database -- - added html comments to post database (default: ';; a comment') -- - added val3 tag as html comment to content, and convert content to base64 -- - - added values to post database -- cleaner code - -## [1.9.20] -- working on 'check' process -- - updated 'logo:' process -- - added 'abbr:' process - -## [1.9.19] -- working on 'check' process -- - Added post 'logo: URI' (for social network share + opt show on page) - -## [1.9.18] -- working on 'check' process -- - added image: tag -- - added value 2 (tag line 2) uri check (generic, root, post) -- - some corrections for domain config file -- - prepared html values for wip - -## [1.9.17] -- working on 'check' process -- - dev on checking file used in some post header tags - -## [1.9.16] -- working on 'check' process -- - dev: post database values (lots are missing) -- - added links, files supports -- - testing some new markers - -## [1.9.15] -- Added 'check' process for bcodes, quotes and paragraphs + stats -- - Their contents must be indented -- - replace with empty lines for bcodes and quotes - -## [1.9.14] -- added 'check' process for block-codes - -## [1.9.13] -- Check: One-Line needed tags, titles -- Added first stats -- move ini template from tyto to domain for domain config file -- Check valid date in article and form domain date - -## [1.9.12] -- preparing check process : head tags in article - -## [1.9.11] -- Preparing for multi-targets with "all" -- check if article is a .tyto format -- preparing values for articles - -## [1.9.10] -- cleaner code -- start/stop domain by user -- User directories check/create when domain activated -- Check install configuration - -## [1.9.9] -- cleaner code with new check/update domain process - -## [1.9.8] -- Check/create/update a domain is ready - -## [1.9.7] -- new process to check and update configuration file (bug at write some values) - -## [1.9.6] -- Better management to create/update domain - -## [1.9.5] -- Preparing post database - -## [1.9.4] -- Added start/strop action to activate (or deactivate) domain -- Directories creation for user working domain -- better log management for user - - - +## [1.9.50] +- Complete new code diff --git a/LICENSE b/LICENSE index 2a1caa8..b83cd68 100644 --- a/LICENSE +++ b/LICENSE @@ -629,7 +629,7 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - GSL Statique Littérateur + Tyto - Littérateur Copyright (C) 2022 Libre en Communs / Commissions / Infrastructure This program is free software: you can redistribute it and/or modify diff --git a/README.md b/README.md index 1d83be2..e481b67 100644 --- a/README.md +++ b/README.md @@ -1,372 +1,195 @@ # Very early IN dev code -This program can ve tested but not at all usable. Lots of work to do... +This program can ve tested and should mainly work. Please report any problems + +Tyto - Littérateur is translated in french and english. # Commands ``` -# Get commands list help +# Get commands help tyto + +# Get all documentation +tyto help all + +# How to write words tags (strong...) and anchors +tyto help words anchor ``` + # Create new domain - create a domain directory, like www.domain.tld - Go to this directory - type `tyto new domain` - type `tyto check domain` -- create in new directory domain ".../articles/", an article (see tuto below) -- type `check myfile.tyto` (or use "wip" instead of check) +- create in new directory domain ".../articles/", an article (see help) +- type `wip myfile.tyto` -## Working on -- 'wip' action processes -- Create HTML full page from article -- Create/Manage modules (metas, header, navbar, sidebar, footer) - -## ToDo -- thinking about creating an auto top article menu from titles -- create full HTML page -- sitemaps -- RSS -- 'publish' process - ## Exemple d'article .tyto commenté ``` -#================================================# -# Entete de l'article # -# Fin de l'entête avec au moins 5 tirets "-----" # -# Toute ligne de commentaire "# ..." est ignorée # -# ! Recommandé de ne pas utiliser le signe "_" # -#================================================# +title: Tests +about: Tests divers +date: 2023-02-28 +tags: tests +authors: echolib -# Pour ne pas inclure cet article dans les sitemaps : -! NoSitemap +abbr: CSS + Cascading SteelSheet + en -# Données uniques sur UNE ligne -title: tests d'un article -about: À propos de cet article de test -tags: Tyto, tuto, -author: echolib -date: 2023-10-27 - -# Données unique sur UNE ligne optionnelle -# Si non définit, le logo du domaine est utilisé -# Ne sera affiché qu'avec _image:logo -logo: logo.png - -# Données multiples sur 3 lignes -# [TAG]: Nom -# LIEN -# Text alternatif - -# Reprendre dans l'article : __cliquer sur ce lien -link: cliquer sur ce Lien - https:// - Text alternatif - -link: Réservez ici - https:// - Billets - -# Reprendre dans l'article : --télécharger ce fichier -file: télécharger ce fichier - @/PDFs/hello.pdf - Un PDF ! - -# Reprendre dans l'article : _code:codetest -code: codetest - @RAWS/test.py - Exemple d'un code Python - -# Reprendre dans l'article : _image:mypic -image: mypic - @hello.png - Text Alt - -# Les abréviations : -# 2eme ligne: Texte alternatif -# 3ème ligne: valeur affichée dans l'article à la place du Nom -abbr: HTML - HuperText Markup Langage - HTML - -# Reprendre dans l'article : ;;css -abbr: css - Cascading Stylesheet - CSS +link: le site est prêt + https://forge.a-lec.org + La forge libre ----- -#=====================================================================# -# Contenu de l'article # -# Les classe optionnelles non renseignées deviennent celle du domaine # -# /!\ Tout code HTML sera interprêté par le navigateur sauf si placé # -# entre les marqueurs de block-code ou icode # -#=====================================================================# - -# La ligne suivante est un commentaire HTML "" -# ---------------------------------------------------------------- -;; Commentaire - -# Ceci est une ancre avec l'ID uniq1 (ID unique) -# ---------------------------------------------- --> uniq1 --> top - -# Créer un lien vers l'ancre "uniq1" -# ---------------------------------- ->_uniq1: Go to uniq1 anchor_< - -# Ceci est une ligne
ayant pour classe hrcss -# ----------------------------------------------- --- hrcss - -# Les Titres de l'article de #1 à #5 (

à

) -# ------------------------------------------------ -#1 Titre en h2 - -# Contenu dans un paragraphe entre (( ... )) ayant pour classe "mypar" -# -------------------------------------------------------------------- -(( mypar - Un long paragraphe... - - # Retour à la ligne avec un
de classe brcss - # (les retours à la ligne vides ne sont pas pris en compte) - # --------------------------------------------------------- - | brcss - - # Reprise du Nom pour les liens de link: et file: - # Reprise des abréviations - Il faut __cliquer sur ce Lien, __Réservez ici et --télécharger ce fichier - ou encore faire une ::css pour du beau rendu ::HTML - - # Un paragraphe dans le paragraphe ayant pour classe, celle du domaine - # -------------------------------------------------------------------- - (( - Un /_court_/ paragraphe de :_1984_: pour de ~_vrai_~ +_faux en gras_+ - Il faut le ._souligner_. et *_Très Gras_* +#1 Titre 1 +(( + Un peu de ::CSS et ::le site est prêt + (( note + Cet article est un test )) - - # Créer un icode (utilise la balise HTML) - # /!\ ! Doit être sur une même ligne - # ---------------------------------------------- - {_
    ,