[1.11.5] - fix helps and updated doc websites

This commit is contained in:
Cyrille L 2024-01-20 17:15:34 +01:00
parent f235cd7598
commit 3718193600
6 changed files with 63 additions and 34 deletions

View File

@ -8,6 +8,11 @@ Tyto - Littérateur
# CURRENTLY IN DEV (in devel branch) ! # CURRENTLY IN DEV (in devel branch) !
## [1.11.5]
- fix show helps in some cases
- updated documentation website in usr/share/docs/www/
- some minor more things from last
## [1.11.4] ## [1.11.4]
- small changes when writing domain config in [WEBSITE_FOOTER] - small changes when writing domain config in [WEBSITE_FOOTER]
- check: added marker check (default "=", "+") - check: added marker check (default "=", "+")

2
debian/control vendored
View File

@ -1,5 +1,5 @@
Package: tyto Package: tyto
Version: 1.11.4 Version: 1.11.5
Section: custom Section: custom
Priority: optional Priority: optional
Architecture: all Architecture: all

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# version: 1.11.4 # version: 1.11.5
# date: 2024-01-15 1705339348 # date: 2024-01-20 17057667032024-01-15 1705339348
# Tyto - Littérateur # Tyto - Littérateur
# Copyright (C) 2023 Cyrille Louarn <echolib+tyto@a-lec.org> # Copyright (C) 2023 Cyrille Louarn <echolib+tyto@a-lec.org>
@ -97,24 +97,41 @@ if not __name__ == "__main__":
# Check installed files # Check installed files
check_install() check_install()
# Load some Tyto libs
import langs, debug, args, domain
#==========# # Load some Tyto libs
# Language # # -------------------
#==========# import langs, debug, args, domain, help
# Languages
# ---------
langs.load_logs() # Load logs language langs.load_logs() # Load logs language
#========# # Just help me !
# Domain # # --------------
#========# exit_sys = False
if len(sys.argv) == 1:
help.manage()
exit_sys = True
try:
if sys.argv[1] in ("--help", "help", "-h"):
help.manage()
exit_sys = True
except:
pass
exit_sys and sys.exit(0)
# Domain
# ------
domain.check_home() # Mainly check current directory domain.check_home() # Mainly check current directory
#===========# # Arguments
# Arguments # # ---------
#===========#
args.get_arguments() # Get arguments from command line args.get_arguments() # Get arguments from command line
# First starting logs # First starting logs
@ -127,10 +144,9 @@ if args.err_action: # [action] error (only)
debug.out(2, "[action]", args.err_action, False, 2, False) debug.out(2, "[action]", args.err_action, False, 2, False)
#===============# # Start process
# Start process # # -------------
#===============# import check, new, wip, publish, show
import check, help, new, wip, publish, show
# From command line [ACTION], do # From command line [ACTION], do
do = { do = {
@ -146,6 +162,5 @@ do = {
# Test for errors in python module file (without try) # Test for errors in python module file (without try)
# do[args.action]() # do[args.action]()
try: do[args.action]() try: do[args.action]()
except KeyError: debug.out(90, args.action, "", True, 2, True) except KeyError: debug.out(90, args.action, "", True, 2, True)

View File

@ -26,6 +26,7 @@
import sys import sys
import args, langs, show import args, langs, show
# #
# #
# #
@ -55,27 +56,33 @@ def manage():
"file", "file",
) )
try:
sys.argv[2]
if not sys.argv[2] in helps: show_main = True
else: show_main = False
except:
show_main = True show_main = True
try:
if sys.argv[2] in helps:
show_main = False
except:
pass
if show_main: if show_main:
print(langs.logs.help_man) print(langs.logs.help_man)
try:
if args.commands["targets"]["all"]: if args.commands["targets"]["all"]:
for h in helps: for h in helps:
if not h in norepeat: if not h in norepeat:
print(helps[h]) print(helps[h])
return return
except:
pass
for arg in range(2, len(sys.argv)): for arg in range(2, len(sys.argv)):
if sys.argv[arg] in helps: if sys.argv[arg] in helps:
print(helps[sys.argv[arg]]) print(helps[sys.argv[arg]])
# CSS references # CSS references
try:
if args.commands["targets"]["css"]: if args.commands["targets"]["css"]:
show.contents_file("/var/lib/tyto/tpl_files/styles.css", True) show.contents_file("/var/lib/tyto/tpl_files/styles.css", True)
except:
return

View File

@ -215,7 +215,8 @@ tyto [ACTION] [ARGUMENTS]
start > activate current domain start > activate current domain
stop > deactivate current domain stop > deactivate current domain
check ? + [domain] : check current domain check ? + [domain] : check current domain
show > show files contents [domain], [MODULES], [css]... show > show files contents
[domain], [MODULES], [css], [article].html/.tyto
wip ? create HTML in "wip/" server wip ? create HTML in "wip/" server
publish ? publish in "www/" server publish ? publish in "www/" server

View File

@ -215,7 +215,8 @@ tyto [ACTION] [ARGUMENTS]
start > activer le domain actuel start > activer le domain actuel
stop > désactiver le domaine actuel stop > désactiver le domaine actuel
check ? + [domain] : vérifier le domaine actuel check ? + [domain] : vérifier le domaine actuel
show > montre le contenu des fichiers [domain], [MODULES], [css]... show > montre le contenu des fichiers
[domain], [MODULES], [css], [name].html/.tyto
wip ? créer de l'HTML dans le serveur "wip/" wip ? créer de l'HTML dans le serveur "wip/"
publish ? publier dans le serveur "www/" publish ? publier dans le serveur "www/"