This commit is contained in:
Cyrille L 2023-04-14 14:17:01 +02:00
parent 23f17705ec
commit 0144d046aa
21 changed files with 618 additions and 338 deletions

View File

@ -1,16 +1,10 @@
# Changelog
Tyto - Littérateur
- Repository: https://git.a-lec.org/echolib/tyto
- Issues: https://git.a-lec.org/echolib/tyto/-/issues
- Changelog: https://git.a-lec.org/echolib/tyto/-/blob/main/CHANGELOG.md
- License: https://git.a-lec.org/echolib/tyto/-/blob/main/LICENSE
Tyto - Litterateur is a Libre project to create and manage multiple
websites from articles' files. Tyto uses its own syntax to convert
your articles in HTML5 static pages. Tyto works on a GNU/Linux system
and needs minimal dependancies.
- python3 rsync nano gawk curl
## [0.9.0] First Commit version (pre-final)
- Repository: https://git.a-lec.org/echolib/tyto-litterateur
- Issues: https://git.a-lec.org/echolib/tyto-litterateur/-/issues
- Changelog: https://git.a-lec.org/echolib/tyto-litterateur/-/blob/master/CHANGELOG.md
- License: https://git.a-lec.org/echolib/tyto-litterateur/-/blob/master/LICENSE
## [0.9.0]
- Last testings before final

6
debian/control vendored
View File

@ -1,10 +1,10 @@
Package: tyto
Version: 0.1.0
Version: 0.9.0
Section: custom
Priority: optional
Architecture: all
Essential: no
Depends: rsync,nano,gawk,curl
Depends: nano,python3
Installed-Size: `du -ks .|cut -f 1`
Maintainer: echolib <echolib@a-lec.org>
Description: Tyto - Litterateur is a libre project to create and manage multiple websites from articles' files. Tyto uses its own syntax to convert your articles in HTML5 static pages. Tyto works on a GNU/Linux system and needs minimal dependencies.
Description: Tyto - Litterateur is a libre project to create and manage multiple websites from articles files. Tyto uses its own syntax to convert your articles in HTML5 pages. Tyto works on a GNU/Linux system and needs minimal dependencies.

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3
# Version: 0.9.0
# Tyto - Littérateur
#
# Copyright (C) 2023 Cyrille Louarn <echolib+tyto@a-lec.org>

View File

@ -117,22 +117,18 @@ code.DOMAIN {
}
pre.bcode {
}
div.bcode {
p.bcode {
}
/* section for author and date */
section#article_infos {
}
span#article_author {
}
span#article_pub {
}
span#article_code {
}
a#article_code_link {
}
@ -140,6 +136,49 @@ a#article_code_link {
* sidebar
*/
aside#sidebar {
}
h1#sidebar_title {
}
ul#sidebar_list {
}
li.sidebar_item {
}
a.sidebar_item_link {
}
h2.sidebar_item_title {
}
p.sidebar_item_about {
}
/*
* footer
*/
footer#footer_page {
}
/* Block*/
div#footer_infos {
}
h1#footer_site_title {
}
p#footer_about {
}
/* Block */
div#footer_references {
}
ul.footer_items {
}
li.footer_item {
}
a.footer_item_link {
}
/* Block */
div#footer_credits {
}
p.footer_copyright {
}
p.footer_generator {
}

View File

@ -79,6 +79,7 @@ pass_db = \
'show-db',
'show-wip',
'show-www',
'status',
'wip',
)
@ -96,6 +97,11 @@ pass_targets = \
'template'
)
pass_status = \
(
'domain',
)
multi_chk = ('added', 'again', 'updated')
action = ''

View File

@ -38,7 +38,7 @@
import time, importlib, sys, os, re, datetime
from datetime import datetime
from time import gmtime, strftime
import args, dom, logs, status, db, form, tyto, langs
import args, dom, logs, status, db, form, tyto, langs, wip
domain_dir = post_err = multi_chk = False
@ -69,7 +69,7 @@ def manage(target):
# Already check
elif db.exists and not db.old_chk:
print(' [%s] > %s'%(db.title, db.uri_file))
print(' [%s] > %s'%(db.title, db.uri_file))
logs.out("20", '%s > %s'%(db.date_chk, db.uri_file), False)
answer = form.asking('%s%s '%(
langs.site.check_a, langs.site.q
@ -151,8 +151,8 @@ def check_all(option):
except:
continue
if option == 'updated' and not db.old_chk:
continue
if option == 'updated' and not db.chk_updated: continue
if option == 'again' and not db.chk_again: continue
found = True
check_process(args.target)
@ -196,7 +196,7 @@ def check_process(target):
srv_post_www_uri = dom.srv_www + srv_post_short_uri
direc_src = src_post_short_uri.split("/")[-1]
direc_src = src_post_short_uri.rsplit(direc_src)[0]
# Get sub_uri for HTML
global sub_uri
sub_uri = db.uri_file.rsplit('articles/')[1]
@ -235,11 +235,18 @@ def check_process(target):
# Check header tags configurations
check_needed_tags(post_header.rsplit('\n'))
check_opt_tags(post_header.rsplit('\n'))
#print("In Dev: return from process...")
if post_err: return
if post_err:
if db.exists and tyto.exists(db.config):
os.remove(db.config)
return
print('\n ├ [%s] > %s'%(title, db.uri_file))
check_opt_tags(post_header.rsplit('\n'))
if post_err:
if db.exists and tyto.exists(db.config):
os.remove(db.config)
return
print('\n ├─ [%s] > %s'%(title, db.uri_file))
# Check for valid contents
check_content(post_bottom)
@ -271,8 +278,9 @@ def file_to_string():
for line in article.rsplit('\n'):
if line.startswith('-----'):
sep = True
continue
if not sep:
sep = True
continue
if sep:
if line: content = True
@ -410,7 +418,7 @@ def check_needed_tags(post_header):
# Set data from tag
if line.startswith('%s:'%tag):
globals()[tag] = line.rsplit('%s:'%tag)[1].lstrip()
globals()[tag] = globals()[tag].replace('"', '')
globals()[tag] = tyto.convert_altname(globals()[tag])
# Stat for "tags:"
if tag == 'tags':
stat_tags = len(globals()[tag].strip().split(","))
@ -420,6 +428,8 @@ def check_needed_tags(post_header):
if not globals()[tag]:
logs.out("38", '%s:'%tag, False)
post_err = True
# Check date format
# Set french format in post DB
@ -495,6 +505,27 @@ def check_opt_tags(post_header):
check_3lines(tag, ln, line)
#===================================#
# Check if registred value is valid #
#-----------------------------------#
def valid_data_name(tag, name):
global post_err
data_inv = ''
data_err = False
for c in name:
if c in tyto.chrs_invalid:
post_err = True
data_err = True
data_inv = '%s%s'%(data_inv, str(c))
if data_err:
logs.out("3", '"%s: %s" > %s'%(tag, name, data_inv), False)
return False
return True
#============================================#
# Do stats, check 3 lines tags from ln #
# Set data for each 2 next lines #
@ -519,7 +550,8 @@ def check_3lines(tag, ln, line):
name = line.rsplit('%s:'%tag)[1].lstrip()
else:
name = line.rsplit('%s:'%tag)[1].lstrip().rsplit(' ')[0]
if not valid_data_name(tag, name): return
if not name:
logs.out("2", 'L=%s. "%s: %s" > %s'%(
@ -576,6 +608,10 @@ def check_3lines(tag, ln, line):
), False)
post_err = True
# Convert special characters for HTML
if not tag in tyto.opt_tags_check_uri:
data = tyto.convert_altname(data)
# For tags having URI, check if file exists
# Set data for post DB
if l == 1 and tag in tyto.opt_tags_check_uri:

View File

@ -36,7 +36,10 @@
import os
import args, logs, dom, form, tyto, check, publish
remove = exists = post = corrupt = False
remove = exists = post = corrupt = file_wip = file_www = False
chk_again = chk_updated = False
wip_again = wip_added = wip_updated = False
www_again = www_added = www_updated = False
if dom.hole:
logs.out("13", '', True)
@ -59,7 +62,10 @@ if args.target \
config = '%s%s.config'%(dom.articles_db_d, uri_id)
if tyto.exists(config):
exists = True
exec(open(config).read())
try:
exec(open(config).read())
except:
exists = False
else:
exists = False
@ -129,6 +135,7 @@ if args.target \
'codes',
)
# Set exist for wip and www files
for value in values:
try:
eval(str(value))
@ -143,7 +150,6 @@ if args.target \
exists = False
logs.out("23", config, False)
file_wip = file_www = False
old_chk = old_wip = old_www = False
no_chk = no_wip = no_www = False
sync_srvs = False
@ -154,19 +160,34 @@ if args.target \
if tyto.exists(post_wip): file_wip = True
if tyto.exists(post_www): file_www = True
# Source article has changed
if hash_post != hash_chk: old_chk = True
# WIP article is old
if hash_chk != hash_wip: old_wip = True
# WWW article is old
if hash_wip != hash_www: old_www = True
# Statuses not set in Db
if not hash_chk: no_chk = True
if not hash_wip: no_wip = True
if not hash_www: no_www = True
# Source article has changed
if hash_post != hash_chk: old_chk = chk_updated = True
if hash_chk: chk_again = True
# WIP article is old
if not old_chk:
if hash_wip and hash_chk != hash_wip: old_wip = wip_updated = True
if no_wip: wip_added = True
if hash_wip: wip_again = True
if not file_wip:
old_wip = wip_updated = True
wip_added = True
wip_again = True
# WWW article is old
if not old_wip:
if hash_www and hash_www != hash_wip: old_www = www_updated = True
if hash_www: www_again = True
if no_www: www_added = True
if not file_www:
old_www = www_updated = True
www_added = True
www_again = True
# Article is updated on both servers
if hash_chk == hash_wip == hash_www: sync_srvs = True

View File

@ -36,7 +36,7 @@
#**********************************************************************
from datetime import datetime
import os, sys, re, locale, importlib
import os, sys, shutil, re, locale, importlib
import logs, dom, tyto, html, show, langs
# locale translation directory
@ -184,12 +184,13 @@ def create_domain(target):
# Start registering variables in domain database
#-----------------------------------------------
local_user = '%s/.local/tyto/%s/'%(dom.home_dir, shortname)
modules_dir = '%s/articles/_configs/'%dom.folder
modules_dir = '%sarticles/_configs/'%dom.root_dir
footer_about_f = '%sfooter_about.html'%modules_dir
config_bkp = '%sdomain_config.bkp'%local_user
set_f = \
'# Home Domain\n' + \
'directory = "%s/"\n'%dom.folder + \
'directory = "%s"\n'%dom.root_dir + \
'database = "%s"\n'%dom.config + \
'\n# Local user configuration\n' + \
'lang_sys = "%s"\n'%lang_sys + \
@ -197,9 +198,9 @@ def create_domain(target):
'lang_logs = "%s"\n'%lang_logs + \
'articles_db_d = "%sarticles/"\n'%local_user + \
'\n# Working directories\n' + \
'articles_d = "%s/articles/"\n'%dom.folder + \
'files_d = "%s/articles/files/"\n'%dom.folder + \
'images_d = "%s/articles/images/"\n'%dom.folder + \
'articles_d = "%sarticles/"\n'%dom.root_dir + \
'files_d = "%sarticles/files/"\n'%dom.root_dir + \
'images_d = "%sarticles/images/"\n'%dom.root_dir + \
'modules_d = "%s"\n'%modules_dir + \
'\n# Modules files\n' + \
'navbar_f = "%styto.navbar"\n'%modules_dir + \
@ -336,7 +337,7 @@ def create_domain(target):
if answer: title = answer
if not title: invalid = True
elif '"' in title: title = title.replace('"', '')
else: title = tyto.convert_altname(title)
set_f = 'title = "%s"'%title
tyto.set_file(dom.config, False, set_f)
@ -368,7 +369,7 @@ def create_domain(target):
if answer: about = answer
if not about: invalid = True
elif '"' in about: about = about.replace('"', '')
else: about = tyto.convert_altname(about)
set_f = 'about = "%s"'%about
tyto.set_file(dom.config, False, set_f)
@ -595,7 +596,8 @@ def create_domain(target):
if not sdb_title:
sdb_title = ''
invalid = True
elif '"' in sdb_title: sdb_title = sdb_title.replace('"', '')
else:
sdb_title = tyto.convert_altname(sdb_title)
set_f = 'sidebar_title = "%s"'%sdb_title
tyto.set_file(dom.config, False, set_f)
@ -648,7 +650,8 @@ def create_domain(target):
# Activate Domain
#----------------
tyto.set_file(dom.config, False, '\nactivated = True')
shutil.copy2(dom.config, config_bkp)
logs.out("32", config_bkp, False)
# RELoad config
#--------------
@ -902,7 +905,7 @@ def create_footer(option):
Tytosrc = \
'\n%s(<a href="%s"\n'%(6 * ' ', tyto.Tytogit) + \
'%stitle="%s"\n'%(9 * ' ', langs.site.tyto_git_t%(tyto.Tyto)) + \
'%sid="footer_item_link">%s</a>)'%(9 * ' ', langs.site.source_code)
'%sclass="footer_item_link">%s</a>)'%(9 * ' ', langs.site.source_code)
tyto_show = \
'%s<a href="%s"\n'%(6 * ' ', tyto.Tytoweb) + \
@ -919,7 +922,7 @@ def create_footer(option):
domain_home = \
'\n%s<a href="/"\n'%(6 * ' ') + \
'%stitle="%s"\n'%(9 * ' ', langs.site.go_home) + \
'%sid="footer_title_link">%s</a>'%(9 * ' ', dom.title)
'%sclass="footer_title_link">%s</a>'%(9 * ' ', dom.title)
# Insert content of footer_about_f or default if not exists
footer_about = ''
@ -1034,10 +1037,12 @@ def create_footer(option):
' </ul>\n' + \
' </div>\n' + \
' <div id="footer_credits">\n' + \
' <p>Copyright%s © %s %s</p>\n'%(
langs.site.pp, footer_date, dom.title
) + \
' <p>%s%s \n'%(langs.site.generator, langs.site.pp) + \
' <p class="footer_copyright">Copyright%s © %s %s</p>\n'%(
langs.site.pp, footer_date, dom.title
) + \
' <p class="footer_generator">%s%s \n'%(
langs.site.generator, langs.site.pp
) + \
'%s\n'%tyto_show + \
' </p>\n' + \
' </div>\n' + \

View File

@ -254,14 +254,15 @@ def create_user_metas(option):
if option == 'wip': target = dom.wip_metas_f
elif option in pub_opts: target = dom.www_metas_f
# Create wip metas.html file according to option
#-----------------------------------------------
if option == 'www' and tyto.exists(target):
form.asking('%s. %s%s '%(
langs.site.metas, langs.site.form_rep, langs.site.q
), True)
print('\n%s'%langs.site.metas_inf)
# Create wip metas.html file according to option
#-----------------------------------------------
try: user_file = open(dom.metas_f, 'r').read()
except: logs.out("1", dom.metas_f, True)
@ -290,6 +291,14 @@ def create_navbar(option):
if option == 'wip': target = dom.wip_navbar_f
elif option in pub_opts: target = dom.www_navbar_f
if option == 'www' and tyto.exists(target):
form.asking('%s. %s(%s)%s '%(
langs.site.navbar, langs.site.form_rep,
option, langs.site.q
), True)
print('\n%s'%langs.site.navbar_inf)
# navbar has items
navbar_items = False
@ -374,14 +383,6 @@ def create_navbar(option):
# Create ending HTML file
else:
menu_html = '\n%s\n%s</ul>\n%s</nav>\n'%(menu_html, 8 * ' ', 6 * ' ')
# Ask to replace only for www
if option == 'www':
form.asking('%s. %s(%s)%s '%(
langs.site.navbar, langs.site.form_rep,
option, langs.site.q
), True)
tyto.set_file(target, 'New', menu_html)
@ -391,7 +392,7 @@ def create_navbar(option):
#----------------------------------------------#
def create_sidebar(option):
dom.valid()
if not tyto.exists(dom.sidebar_f):
logs.out("1", dom.sidebar_f, True)
@ -400,6 +401,13 @@ def create_sidebar(option):
if option == 'wip': target = dom.wip_sidebar_f
elif option in pub_opts: target = dom.www_sidebar_f
if option == 'www' and tyto.exists(target):
form.asking('%s. %s%s '%(
langs.site.sidebar, langs.site.form_rep, langs.site.q
), True)
print('\n%s'%langs.site.sidebar_inf)
sidebar_items = False
# Set HTML sidebar
@ -435,7 +443,6 @@ def create_sidebar(option):
if not tyto.exists(db_uri):
logs.out('25', line, False)
continue
# Load article"s database
exec(open(db_uri).read(),globals())
@ -494,13 +501,6 @@ def create_sidebar(option):
sidebar_content = ''
for line in sidebar_temp.rsplit('\n'):
sidebar_content = sidebar_content + '%s%s\n'%(4 * ' ', line)
# Ask to replace only for www
if option == 'www':
form.asking('%s. %s(%s)%s '%(
langs.site.sidebar, langs.site.form_rep,
option, langs.site.q
), True)
tyto.set_file(target, True, sidebar_content)
@ -519,6 +519,8 @@ def create_user_footer(option):
langs.site.footer, langs.site.form_rep, langs.site.q
), True)
print('\n%s'%langs.site.footer_inf)
try: footer_f = open(dom.footer_f, 'r').read()
except: logs.out("1", dom.footer_f, True)

View File

@ -33,7 +33,15 @@
#**********************************************************************
import os, langs
import os, importlib
import langs
importlib.reload(langs)
# Set colors
CS = '\033[0;0m'
CR = '\033[1;31m'
CY = '\033[1;33m'
CG = '\033[1;32m'
def tyto(target):
noinfos = False
@ -48,19 +56,46 @@ def tyto(target):
# Show domains list
try:
db_domains = '%s/.local/tyto'%os.path.expanduser('~')
has_domains = True
user = os.environ.get('USER')
hashdomain = False
print('# Registred domains for', user)
for folder in os.listdir(db_domains):
if os.path.isdir('%s/%s'%(db_domains, folder)):
if hashdomain:
hasdomain = False
hashdomain = True
print(' -', folder)
user_dir = os.path.expanduser('~')
db_domains = '%s/.local/tyto'%user_dir
except:
noinfo = True
print(':< No .../.local/tyto')
has_domains = False
print(':', langs.site.args_helps)
if not os.path.exists(db_domains):
has_domains = False
print('! No directory > %s/'%db_domains)
if has_domains:
list_domains = (())
for folder in os.listdir(db_domains):
domain_local_uri = '%s/%s'%(db_domains, folder)
if os.path.isdir(domain_local_uri):
domain_conf = '%s/domain_config.bkp'%domain_local_uri
if os.path.exists(domain_conf):
try:
exec(open(domain_conf).read(),globals())
except:
continue
if os.path.exists(directory):
dir_domain = '%s%s%s'%(CG, directory, CS)
else:
dir_domain = '%s%s%s'%(CR, directory, CS)
list_domains = \
(('%s > %s > %s'%(folder, dir_domain, www_url)),)
if list_domains:
print('# %s %ss %s'%(
langs.site.reg_domains,
langs.site.fo,
user
)
)
for domain in list_domains:
print(' - %s'%domain)
# Show arguments help
print(langs.site.args_helps)

View File

@ -59,11 +59,7 @@ try:
log = importlib.import_module('logs_%s'%lang_logse, package=None)
except:
log = importlib.import_module('logs_%s'%lang_sys, package=None)
'''
exec(open('%s/logs_%s.py'%(trans_dir, lang.logs)).read())
except:
exec(open('%s/logs_%s.py'%(trans_dir, lang_sys)).read())
'''
# Set language site/form from configuration domain
# or set default english if not known

View File

@ -96,6 +96,16 @@ def out(nbr, value, out):
'51' : '%s%s%s > %s'%(CY, langs.log.data_inc, CS, value),
'60' : '\n%s'%langs.log.status_r,
'61' : '%s%s%s > %s'%(CG, langs.log.file_e, CS, value),
'71' : ' ╞═ %s%s%s > %s'%(CY, langs.log.post_nwi, CS, value),
'72' : ' ╞═ %s%s%s > %s'%(CG, langs.log.post_wip, CS, value),
'73' : ' ╞═ %s%s%s > %s'%(CY, langs.log.st_wip_n, CS, value),
'74' : ' ╞═ %s%s%s > %s'%(CY, langs.log.st_wip_o, CS, value),
'81' : ' ╞═ %s%s%s > %s'%(CY, langs.log.post_nww, CS, value),
'82' : ' ╞═ %s%s%s > %s'%(CG, langs.log.post_www, CS, value),
'83' : ' ╞═ %s%s%s > %s'%(CY, langs.log.st_www_n, CS, value),
'84' : ' ╞═ %s%s%s > %s'%(CY, langs.log.st_www_o, CS, value),
'85' : ' ╞═ %s%s%s > %s'%(CY, langs.log.was_pub, CS, value),
'94' : ' ╞═ %s%s%s > %s'%(CY, langs.log.st_chk_o, CS, value),
'255' : '%s'%langs.log.laterout
}

View File

@ -71,16 +71,95 @@ def manage_publish(target):
# Publish in www server an article
check_to_publish('one')
# Article already published
if db.file_www:
logs.out("85", '%s > %s'%(db.date_chk, db.uri_file), False)
answer = form.asking('%s%s '%(
langs.site.publish_a, langs.site.q
), True)
# Publish
publish_article()
# Create new ATOM/RSS file
rss.create_feed()
#============================================#
# Option 'all' to publish again, based on DB #
#--------------------------------------------#
def publish_all(option):
tyto.show_multi_message('www', dom.srv_www)
form.asking('%s%s '%(langs.site.proceed, langs.site.q), True)
# Sort by newer articles (created by last check)
db_articles = sorted(Path(dom.articles_db_d).iterdir(),
key=os.path.getmtime
)
# Load domain configuration DB
option = args.target
found = False
for post_db in db_articles:
if not str(post_db).endswith('.config'): continue
# Load DB
exec(open(post_db).read(),globals())
args.target = short_src
importlib.reload(db)
if option == "again" and not db.www_again: continue
elif option == "added" and not db.www_added: continue
elif option == "updated" and not db.www_updated: continue
check_to_publish('all')
if err_pub:
continue
found = True
publish_article()
if not found:
logs.out("28", 'publish %s'%option, True)
# If found: create new ATOM/RSS file
rss.create_feed()
#==============================#
# Check if it can be published #
#------------------------------#
def check_to_publish(process):
global err_pub
err_pub = False
print('\n ├ [%s] > %s'%(db.title, db.post_src))
# Article was not checked or changed
if db.no_chk:
logs.out("25", db.uri_file, False)
err_pub = 25
elif db.old_chk:
logs.out("9", db.uri_file, False)
err_pub = 9
# Article must exists in wip server
if db.no_wip or db.old_wip:
logs.out("30", db.uri_file, False)
err_pub = 30
elif not db.file_wip:
logs.out("1", db.post_wip, False)
err_pub = 1
if err_pub:
if process == 'all': return
elif process == 'one': sys.exit(err_pub)
#===============#
# Let's publish #
#---------------#
def publish_article():
def publish_article():
# Copy wip page to www page
if not os.makedirs('%s%s'%(dom.srv_www, db.direc_src), exist_ok=True):
logs.out("33", '%s%s'%(dom.srv_www, db.direc_src), False)
@ -142,7 +221,6 @@ def replace_lines_pub():
logs.out("46", db.post_www, False)
#print(www_html_post)
tyto.set_file(db.post_www, 'New', www_html_post)
@ -183,86 +261,3 @@ def publish_template(option):
html.create_user_footer('pub')
#============================================#
# Option 'all' to publish again, based on DB #
#--------------------------------------------#
def publish_all(option):
# Ask or show what to do
if args.target == "again":
form.asking("%s%s "%(
langs.site.wip_again, langs.site.q
), True)
elif args.target == "addedd":
print('%s'%langs.site.wip_older)
#os.chdir(dom.articles_d)
elif args.target == "updated":
print('%s'%langs.site.wip_newer)
# Sort by newer articles (created by last check)
db_articles = sorted(Path(dom.articles_db_d).iterdir(),
key=os.path.getmtime
)
# Load domain configuration DB
option = args.target
found = False
for post_db in db_articles:
if not str(post_db).endswith('.config'): continue
# Load DB
exec(open(post_db).read(),globals())
args.target = short_src
importlib.reload(db)
if not db.hash_wip: continue
if option == "again" and not db.sync_srvs: continue
if option == "added" and not db.old_www: continue
if db.old_chk:
logs.out("9", '', False)
continue
check_to_publish('all')
if err_pub: continue
found = True
publish_article()
if not found:
logs.out("28", '(publish)', True)
else:
# Create new ATOM/RSS file
rss.create_feed()
#==============================#
# Check if it can be published #
#------------------------------#
def check_to_publish(process):
global err_pub
err_pub = False
print('\n ├─ [%s] > %s'%(db.title, db.post_src))
# Article was not checked or changed
if db.no_chk:
logs.out("25", db.uri_file, False)
err_pub = 25
elif db.old_chk:
logs.out("9", db.uri_file, False)
err_pub = 9
# Article must exists in wip server
if db.no_wip or db.old_wip:
logs.out("30", db.uri_file, False)
err_pub = 30
elif not db.file_wip:
logs.out("1", db.post_wip, False)
err_pub = 1
if err_pub:
if process == 'all': return
elif process == 'one': sys.exit(err_pub)

View File

@ -35,7 +35,7 @@
import os
from pathlib import Path
import logs, dom, db, tyto
import logs, dom, db, tyto, langs
#============================#
@ -120,5 +120,6 @@ def create_feed():
' </channel>\n' + \
'</rss>'
print('\n ├─ %s'%langs.site.rss_c)
tyto.set_file(dom.www_rss_f, 'New', set_f)

View File

@ -33,7 +33,7 @@
#**********************************************************************
import args, dom, logs, tyto, form
import args, dom, logs, tyto, form, db
def domain():
if dom.hole: logs.out("13", '', True)
@ -80,9 +80,13 @@ def domain():
# On demand with status action #
#------------------------------#
def check(target):
conf_err = False
if target == "domain":
# target needed
if not target:
logs.out("5", '[target]', True)
elif target == "domain":
conf_err = False
if dom.dir_unu or dom.file_unu:
logs.out("60", '', False)
@ -93,6 +97,37 @@ def check(target):
for file_unu in dom.file_unu:
logs.out("24", file_unu, False)
if conf_err:
logs.out("31", '', True)
if conf_err:
logs.out("31", '', True)
return
# Unused file
elif not db.post:
logs.out("1", db.uri_file, True)
# Article has DB
elif db.exists:
# Article datas
print('\n ├ [%s] > %s'%(db.title, db.uri_file))
# chk
if db.old_chk: logs.out("94", db.uri_file, False)
else: logs.out("20", db.uri_file, False)
# wip
if not db.file_wip: logs.out("71", db.post_wip, False)
else: logs.out("72", db.post_wip, False)
if db.no_wip: logs.out("73", db.post_wip, False)
elif db.old_wip: logs.out("74", db.post_wip, False)
# www
if not db.file_www: logs.out("81", db.post_www, False)
else: logs.out("82", db.post_www, False)
if db.no_www: logs.out("83", db.post_www, False)
elif db.old_www: logs.out("84", db.post_www, False)
return
# Article has NO DB
elif not db.exists:
logs.out("25", db.uri_file, True)

View File

@ -35,7 +35,7 @@
import os, sys, re, subprocess, locale, base64, datetime, shutil
from hashlib import blake2b
import args, dom, logs
import args, dom, logs, langs
# :D
Tyto = 'Tyto - Littérateur'
@ -182,6 +182,11 @@ quote_tags = [
# Tags to check in header in content _TAG
head_tags = ("image:", "raw:", "code;")
# Valid characters for some datas
chrs_invalid = \
set('{}[]_()+*=/:%~´')
# Stats for icodes, bcodes, quotes
nbr_icodes = 0
@ -197,6 +202,18 @@ def exists(uri):
else: return(False)
#========================================#
# Return converted valid HTML characters #
#----------------------------------------#
def convert_altname(altname):
altname = altname.replace('<', '&lt;')
altname = altname.replace('>', '&gt;')
altname = altname.replace('"', '&quot;')
altname = altname.replace("'", '&apos;')
return altname
#=======================#
# Return sum of srcfile #
# src: True = Content #
@ -309,8 +326,7 @@ def protect_bcodes_quotes(process, post_bottom):
in_bcode = False
if process == "wip":
bcode = '%s\n%s'%(bcode, line)
bcode = bcode.replace('<', '&lt;')
bcode = bcode.replace('>', '&gt;')
bcode = convert_altname(bcode)
b64_bcode = b64('Encode', bcode, 'B64.', '.B64')
line = b64_bcode
@ -324,8 +340,7 @@ def protect_bcodes_quotes(process, post_bottom):
in_quote = False
if process == "wip":
quote = '%s\n%s'%(quote, line)
quote = quote.replace('<', '&lt;')
quote = quote.replace('>', '&gt;')
quote = convert_altname(quote)
b64_quote = b64('Encode', quote, 'Q64.', '.Q64')
line = b64_quote
@ -408,8 +423,7 @@ def protect_icodes(post_bottom):
# No more in code if
if c_a == '}' and not c_b == '\\':
in_icode = False
src_code = src_code.replace('<', '&lt;')
src_code = src_code.replace('>', '&gt;')
src_code = convert_altname(src_code)
code = '%s%s%s'%(code, src_code, words_tags[9][3])
b64_code = b64('Encode', code, 'I64.', '.I64')
rep_code = "%s%s%s"%(
@ -535,3 +549,18 @@ def files_to_srv(server):
logs.out("32", f_dst, False)
except:
logs.out('4', f_dst, True)
#========================================#
# For mass treatment, show message about #
#----------------------------------------#
def show_multi_message(server, srv_dir):
if args.target == "added":
print("%s '%s' > %s"%(langs.site.srv_added, server, srv_dir))
elif args.target == "updated":
print("%s '%s' > %s "%(langs.site.srv_updated, server, srv_dir))
elif args.target == "again":
print("%s '%s' > %s"%(langs.site.srv_again, server, srv_dir))

View File

@ -40,6 +40,7 @@ import os, re, sys, locale, shutil, importlib, time
from pathlib import Path
import args, logs, langs, dom, db, tyto, html, form, stats
#=========================================#
# Manage wip action with option as target #
#-----------------------------------------#
@ -85,34 +86,15 @@ def manage(target):
elif db.old_chk:
logs.out("9", db.uri_file, True)
# Article has changed or wip file missing
if db.old_wip or not db.file_wip:
wip_article(db.uri_file)
# wip is up-to-date: ask to wip again
else:
logs.out("19", db.date_wip, False)
form.asking(' ├ [%s] %s%s '%(
db.title, langs.site.wip_new, langs.site.q
), True)
wip_article(db.uri_file)
# Create HTML page
wip_article(db.uri_file)
#========================================#
# Option 'all' to wip again, based on DB #
#----------------------------------------#
def wip_all(process):
# Ask or show what to do
if args.target == "again":
form.asking("%s%s "%(
langs.site.wip_again, langs.site.q
), True)
elif args.target == "addedd":
print('%s'%langs.site.wip_older)
elif args.target == "updated":
print('%s'%langs.site.wip_newer)
def wip_all(process):
tyto.show_multi_message('wip', dom.srv_wip)
# Sort by newer articles (created by last check)
db_articles = sorted(Path(dom.articles_db_d).iterdir(),
@ -133,23 +115,10 @@ def wip_all(process):
importlib.reload(db)
except:
continue
# Article has changed and not check
if db.old_chk:
logs.out("9", db.post_src, False)
continue
# newer: article not yet wip
elif option == "added" and db.hash_wip:
continue
# All: only old wip
elif option == "updated" and not db.old_wip:
continue
# again: wip again wip articles
elif option == "again" and not db.hash_wip:
continue
if option == "added" and not db.wip_added: continue
elif option == "updated" and not db.wip_updated: continue
elif option == "again" and not db.wip_again: continue
found = True
wip_article(db.post_src)
@ -175,7 +144,7 @@ def wip_article(target):
# Convert file to strings
file_to_string(target)
print('\n [%s] > %s'%(db.title, db.post_src))
print('\n [%s] > %s'%(db.title, db.post_src))
global post_header
global post_bottom
@ -192,11 +161,11 @@ def wip_article(target):
# Convert contents from modules
wip_images() # Images_%i from headers in DB
wip_single_tags() # br /, anchors
wip_words_tags() # Paragraphs, strongs, italics
wip_links() # Links_%i from headers in DB
wip_abbrs() # Convert abbr
wip_images() # Images_%i from headers in DB
wip_titles() # Convert #N, remove empty line, add divs
wip_lists() # convert ul/ol lists
wip_quotes() # Quotes. Decode base64 Q64 and convert to HTML
@ -234,15 +203,16 @@ def file_to_string(post_file):
for line in article.rsplit('\n'):
if line.startswith('-----'):
sep = True
continue
if not sep:
sep = True
continue
if sep:
if not post_bottom: post_bottom = line
else: post_bottom = '%s\n%s'%(post_bottom, line)
else: post_bottom = '%s\n%s'%(post_bottom, line)
else:
if not post_header: post_header = line
else: post_header = '%s\n%s'%(post_header, line)
else: post_header = '%s\n%s'%(post_header, line)
#===============================================================#
@ -383,9 +353,12 @@ def wip_abbrs():
abbr_src = '<abbr class="%s" title="%s">%s</abbr>'
for i in range(1, db.uniq_abbrs + 1):
abbr = 'db.abbr_%s'%i
try: abbr_show = eval(abbr)[2]
except: abbr_show = eval(abbr)[0]
abbr = 'db.abbr_%s'%i
abbr_show = eval(abbr)[2]
if not eval(abbr)[2]:
abbr_show = eval(abbr)[0][1:-1]
abbr_html = abbr_src%(dom.css,
eval(abbr)[1],
abbr_show
@ -689,7 +662,7 @@ def wip_bcodes():
# Block-code content per line
else:
html_bcode = \
'%s\n <div class="bcode">%s</div>'%(
'%s\n <p class="bcode">%s</p>'%(
html_bcode, line
)
@ -779,17 +752,19 @@ def wip_filecode(target):
for i in range(1, db.uniq_codes + 1):
code = 'db.code_%s'%i
code_file = open('%s%s'%(dom.articles_d, eval(code)[1])).read()
code_html = '<pre class="%s" title="%s">\n'%(
code_html = '<code class="%s" title="%s">\n'%(
dom.css, eval(code)[2]
) + \
' <code class="bcode">'
' <pre class="bcode">'
for line in code_file.rsplit('\n'):
code_html = '%s\n <span class="bcode">%s</span>'%(
line = line.replace('<', '&lt;')
line = line.replace('>', '&gt;')
code_html = '%s\n <p class="bcode">%s</p>'%(
code_html, line
)
code_html = '%s\n </code>\n</pre>'%(code_html)
code_html = '%s\n </pre>\n</code>'%(code_html)
replace_in_post(eval(code)[0],
code_html
)
@ -803,21 +778,21 @@ def wip_lists():
global post_bottom
content_list = ''
in_list = False
for line in post_bottom.rsplit('\n'):
# Open list
if line.startswith(tyto.words_tags[13][0]):
block_list = content_list = ''
css = tyto.get_css(line)
in_list = True
content_list = line
block_list = line
continue
# Close list
elif line.startswith(tyto.words_tags[13][1]):
in_list = False
content_list = '%s\n%s'%(content_list, line)
block_list = '%s\n%s'%(block_list, line)
html_list = convert_list(
content_list
).replace('<ul>',
@ -825,10 +800,14 @@ def wip_lists():
).replace('<li>',
'<li class="%s">'%css
)
replace_in_post(content_list, html_list)
replace_in_post(block_list, html_list)
if in_list:
content_list = '%s\n%s'%(content_list, line)
block_list = '%s\n%s'%(block_list, line)
if not content_list: content_list = line
else: content_list = '%s\n%s'%(content_list, line)
else:
continue

View File

@ -42,12 +42,31 @@ file_e = "File exists"
dir_c = "Directory created"
dir_e = "Directory exists"
was_chk = "Article 'check'"
was_wip = "Article already 'wip'"
check_m = "Check manually"
# chk
nycheck = "Article not yet checked"
was_chk = "Article was 'check'"
st_chk_o = "Old 'check' status"
post_inc = "Unused in article"
post_inv = "Article not valid"
post_val = "Article is valid"
# wip
nywip = "Article not yet wip"
was_wip = "Article was 'wip'"
post_nwi = "Article not in 'wip'"
st_wip_n = "Unused 'wip' status"
st_wip_o = "Old 'wip' status"
post_wip = "Article is in 'wip'"
# www
was_pub = "Article was published"
post_nww = "Article not in 'www'"
st_www_n = "Unused 'www' status"
st_www_o = "Old 'www' status"
post_www = "Article is in 'www'"
# Misc
check_m = "Check manually"
post_chg = "Article changed: 'check' it first"
sep_inv = "Unused separator in article"
unused_v = "Unused value in article"
@ -58,8 +77,6 @@ symb_np = "Not paired symbols"
snpic_d = "Using default snpic. Not found"
anch_nu = "Anchor not uniq"
nyfile = "file not yet created"
nycheck = "Article not yet checked"
nywip = "Article not yet wip"
add = "Add:"
nomods = "Create HTML modules first"
status_r = "Checking unused ressources..."

View File

@ -41,12 +41,31 @@ file_e = "Fichier présent"
dir_c = "Dossier créé"
dir_e = "Dossier présent"
# chk
nycheck = "Article pas encore 'check'"
was_chk = "Article déjà vérifié"
was_wip = "Article déjà 'wip'"
check_m = "Vérifier manuellement"
st_chk_o = "Statut 'check' Ancien"
post_inc = "Donnée manquante dans l'article"
post_inv = "Article non valide"
post_val = "Article valide"
# Wip
nywip = "Article pas encore 'wip'"
was_wip = "Article déjà 'wip'"
post_nwi = "Article non présent dans 'wip'"
st_wip_n = "Statut 'wip' Non présent"
st_wip_o = "Statut 'wip' Ancien"
post_wip = "Article présent dans 'wip'"
# www
was_pub = "Article déjà publié"
post_nww = "Article non présent dans 'www'"
st_www_n = "Statut 'www' Non présent"
st_www_o = "Statut 'www' Ancien"
post_www = "Article présent dans 'www'"
# Misc
check_m = "Vérifier manuellement"
post_chg = "Article modifié : commencer par 'check'"
sep_inv = "Séparateur manquant dans l'article"
unused_v = "Valeur manquante dans l'article"
@ -57,8 +76,8 @@ symb_np = "Symboles non jumelés"
snpic_d = "snpic utilisé par défaut. Manquant"
anch_nu = "Ancre non unique"
nyfile = "Fichier pas encore créé"
nycheck = "Article pas encore 'check'"
nywip = "Article pas encore 'wip'"
add = "Ajout:"
nomods = "Créer d'abord les modules HTML"
status_r = "Vérification des ressources manquantes..."

View File

@ -30,6 +30,8 @@ File = 'File'
name = 'Name'
by = "by"
le = "the"
fo = "for"
proceed = "Continue"
q = '?'
i = '!'
pp = ":"
@ -66,14 +68,26 @@ mail_to = "Contact by %s the admin of"%mail.lower()
feed = "Feed"
generator = "Generator"
# Misc for Tyto
#--------------
# Check
check_a = "Check again this article"
post_chg = "Article was edited. Check it"
# Wip
wip_new = "Create a new HTML page in 'wip' server again"
wip_again = "Create already converted pages again"
wip_newer = "Create missing HTML pages"
wip_older = "Update HTMl pages"
srv_again = "Create again converted HTMl pages in server"
srv_added = "Create missing HTML pages in server"
srv_updated = "Update HTMl pages in server"
# publish
publish_a = "Publish again this article"
rss_c = "Create ATOM/RSS feed"
# Other
uptpl = "Update directory"
stats_f = "Articles: %s (%s words)"
reg_domains = 'Registred domains'
# Form
#----------------------------------------------------------------------
@ -131,14 +145,10 @@ form_file_c = "File created"
form_reset = "Reset configuration?"
form_rep = "Replace HTML file"
check_a = "Check again this article"
uptpl = "Update directory"
stats_f = "Articles: %s (%s words)"
# Documentation of configuration files
#-------------------------------------
metas_inf = "Create <meta> tags"
metas_doc = \
'# For %s\n' + \
'# Type text/HTML file\n' + \
@ -152,6 +162,7 @@ metas_doc = \
'# - Do NOT copy this file to template directory\n' + \
'# - These tags are already set'
navbar_inf = "Create navbar"
navbar_doc = \
'# For %s\n' + \
'# Type: Text file\n' + \
@ -179,6 +190,7 @@ navbar_doc = \
'# about # infos about this website\n' + \
'# %s\n\n'%(20 * "-")
sidebar_inf = "Create sidebar"
sidebar_doc = \
'# For %s\n' + \
'# Type Text file\n' + \
@ -204,6 +216,7 @@ sidebar_doc = \
'# dir1/index.tyto\n' + \
'# %s\n\n'%(20 * "-")
footer_inf = "Create footer"
footer_doc = \
'# For %s\n' + \
'# Type text/HTML file\n' + \
@ -235,54 +248,87 @@ footer_about_doc = \
'# %s\n'%(20 * "-")
# Help with Tyto commands
args_helps = """\n# New domain:
- Create your domain folder, and go in
args_helps = """\n# New domain :
- Create directory and go in
- Create domain with 'tyto new domain [URL]'
- Create article file in articles/ directory
- Use these actions on article file: Check > wip > publish
! Config files are in _configs/ directory
and used to create HTML file in your template
Your template files (css, logo...) go to wip/template/ server
- Create .tyto file in directory "articles/"
- Use these actions: check > wip > publish
! - Modules files are in directory "_configs/"
and used to custom some website parts
- (css, logo...) files go in "wip/template/"
# Usage: tyto [action] [target]
- [action] > according to [target]:
edit : Edit a file (article, config module)
edit-about: specific for (footer), or like [edit-db]
edit-db : Edit a config file (domain, article (TAKE CARE !))
edit-wip : Edit html file in wip server
edit_www : Edit html file in www server
new : Create new (domain, sidebar/footer... config's file)
show : Show content file (article, config's module)
show-about: specific for (footer), or like [show-db]
show-db : Show content of article database
show-wip : Show content of HTML file in wip server
show-www : Show content of HTML file in www server\n
check : Check if article is valid and ready to convert
wip : Create HTML page in wip server
publish : Create HTML page in www server\n
- [target] > according to [action]
all : update changed articles
again : process again ALL valid articles
newer : [wip/publish] convert only newer articles
[check] process not yet checked .tyto files in domain
template : - Create new navbar/sidebar/metas/footer in www server
- Copy other wip/template/ files to www server
domain : Create/Show domain config's file
[file] : URI of an article file (autocompletion's friend)
footer : Create/Show footer HTML config file
metas : Create/Show metas HTML config file
navbar : Create/Show navbar config file
sidebar : Create/Show sidebar config file
stats : Create statistics file in root server\n
# Examples:
- Check article syntax: tyto check mysubdir/index.tyto
- Create default _configs/tyto.sidebar: tyto new sidebar
- Edit _configs/tyto.navbar: tyto edit navbar
(each edition launches process if file changed like:
- check
- (navbar, sidebar, metas, footer) : create file on wip server)
- Edit index.html in www server: tyto edit-www index.tyto
- Create sidebar.html in wip server: tyto wip sidebar
- Show footer.html in wip server: tyto show-wip footer
- Create metas.html in www server: tyto publish metas
- Show navbar.html in www server: tyto show-www navbar"""
# Actions
- [action] > According to [target]
# Edit a file
edit : Source file, configuration module
edit-about: [footer] Edit description section in footer
or same as [edit-db]
edit-db : Edit database/configuration file
edit-wip : Edit a file in server 'wip'
edit_www : Edit a file in server 'www'
new : [domain] Créer un domaine ou le modifier via le formulaire
[sidebar, navbar, footer, metas] Create and replace
with default module configuration file
# Show contents file (with line number)
show : Show source file, source configuration module
show-about: [footer] Show description footer file
or same as [show-db]
show-db : Show database/configuration file
show-wip : Show a file in server 'wip'
show-www : Show a file in server 'www'
# Create HTML page
check : Check the validity of a tyto format file
wip : Create article HTML page in server 'wip'
publish : Create article HTML page in server 'www'
# Targets
- [target] > According to [action]
# Multiple articles
updated : Update articles (already checked)
again : Force all articles (already checked)
added : [check] Search and check for .tyto articles in domain
(not yet checked)
[wip, publish] Create articles HTML pages
that were edited and checked
# Update modules/files template
template : - Create (replace) modules in directory "template/"
- [publish] Also, copy all other files from "wip/template/"
# Domain and files
domain : Create or edit a domain
[file] : URI file (autocompletion friendly)
# Modules
footer : Footer configuration file
metas : <meta>, <link> configuration file
navbar : Navbar configuration file
sidebar : Sidebar configuration file
stats : Stats file (server 'wip' er 'www')
# Examples :
# Check article (according to sub-folder)
$ tyto check mysubdir/index.tyto
# Create (replace) default sidebar configuration file
$ tyto new sidebar
# Edit navbar configuration file
$ tyto edit navbar
# edit doc/index.html in server 'www'
$ tyto edit-www doc/index.tyto
# Create HTML sidebar file in server 'wip'
$ tyto wip sidebar
# Show footer HTML file in server 'wip'
$ tyto show-wip footer
# Create statistics file in serveur 'www'
$ tyto publish stats"""

View File

@ -21,7 +21,7 @@
# Generic
article = "Article"
sidebar = 'Barre Latérale'
navbar = 'Barre de navigation'
navbar = 'Barre de menu'
metas = 'Balises Metas'
footer = 'Pied de Page'
title = 'Titre'
@ -29,6 +29,8 @@ File = 'Fichier'
name = 'Nom'
by = "par"
le = "le"
fo = "pour"
proceed = "Continuer"
q = ' ?'
i = ' !'
pp = " :"
@ -65,14 +67,27 @@ mail_to = "Contacter par %s l'administrateur de"%mail.lower()
feed = "Flux"
generator = "Generateur"
# Misc for Tyto
#--------------
# Check
check_a = "Vérifier encore l'article"
post_chg = "Article édité. Le vérifier"
# Wip
wip_new = "Créer encore une page HTML dans le serveur 'wip'"
wip_again = "Créer encore les pages déjà converties"
wip_newer = "Créer les pages HTML manquantes"
wip_older = "Mise à jour des pages HTML"
srv_again = "Créer encore les pages dans le serveur"
srv_added = "Créer les pages HTML manquantes dans le serveur"
srv_updated = "Mise à jour des pages HTML dans le serveur"
# publish
publish_a = "Publier encore l'article"
rss_c = "Créer le flux ATOM/RSS"
# Autre
uptpl = "Mettre à jour le dossier"
stats_f = "Articles : %s (%s mots)"
reg_domains = 'Domaines enregistrés'
# Formulaire
#----------------------------------------------------------------------
@ -131,14 +146,10 @@ form_file_c = "Fichier créé"
form_reset = "Réinitialiser la configuration"
form_rep = "Remplacer le fichier HTML"
check_a = "Vérifier encore l'article"
uptpl = "Mettre à jour le dossier"
stats_f = "Articles : %s (%s mots)"
# Documentation des fichiers de configuration
#--------------------------------------------
metas_inf = "Créer les balises <meta>"
metas_doc = \
'# Pour %s\n' + \
'# Type Fichier text/HTML\n' + \
@ -152,6 +163,7 @@ metas_doc = \
'# - Ne PAS copier ce fichier dans le dossier template\n' + \
'# - Les balises suivantes sont déjà présentes'
navbar_inf = "Créer la barre de menu"
navbar_doc = \
'# Pour %s\n' + \
'# Type fichier texte\n' + \
@ -179,6 +191,7 @@ navbar_doc = \
'# a-propos # Informations concernant ce site\n' + \
'# %s\n\n'%(20 * "-")
sidebar_inf = "Créer la barre latérale"
sidebar_doc = \
'# Pour %s\n' + \
'# Type fichier texte\n' + \
@ -204,6 +217,7 @@ sidebar_doc = \
'# dir1/index.tyto\n' + \
'# %s\n\n'%(20 * "-")
footer_inf = "Créer le pied de page"
footer_doc = \
'# Pour %s\n' + \
'# Type Fichier text/HTML\n' + \
@ -238,18 +252,18 @@ footer_about_doc = \
args_helps = """\n# Nouveau domaine :
- Créer un dossier et aller dedans
- Créer un domain avec 'tyto new domain [URL]'
- Créer un fichier .tyto dans le dossier articles/
- Créer un fichier .tyto dans le dossier "articles/"
- Utiliser les actions check > wip > publish
! - Les fichiers des modules sont dans le dossier _configs/
! - Les fichiers des modules sont dans le dossier "_configs/"
et utilisés pour personnaliser certaines parties du site
- Les fichier (css, logo...) vont dans le dossier serveur wip/template/
- Les fichier (css, logo...) vont dans le dossier serveur "wip/template/"
# Usage: tyto [action] [target]
# Les actions
- [action] > Selon l'argument [target]
# Modifier un ficher
edit : fichier source, module de configuration
edit : Fichier source, module de configuration
edit-about: [footer] Modifier la section description du pied de page
sinon comme l'action [edit-db]
edit-db : Modifier une base de données/fichier de configuration
@ -260,7 +274,7 @@ args_helps = """\n# Nouveau domaine :
fichier de configuration du module par le défaut
# Afficher un fichier (avec numéros de ligne)
show : fichier source, module de configuration
show : Fichier source, module de configuration
show-about: [footer] Afficher la section description du pied de page
sinon comme l'action [show-db]
show-db : Afficher une base de données/fichier de configuration
@ -284,7 +298,7 @@ args_helps = """\n# Nouveau domaine :
qui ont été modifiés et vérifiés
# Mise en ligne du thème et des modules
template : - Recréer les modules HTML dans le serveur 'www'
template : - Recréer les modules HTML dans "template/"
- Copie tous les autres fichier du dossier wip/template/
# Domaine et fichier
@ -311,7 +325,7 @@ args_helps = """\n# Nouveau domaine :
# Modifier doc/index.html dans le serveur 'www'
$ tyto edit-www doc/index.tyto
# Créer le module HTML (serveur 'wip') de la barre latérale
# Créer le fichier HTML de la barre latérale (serveur 'wip')
$ tyto wip sidebar
# Afficher le contenu du pied de page HTML dans le serveur 'wip'