checl + all. fix. all=valid (updated only). again=ALL valid
This commit is contained in:
parent
101a1e09e7
commit
2d13d4ea8a
|
@ -63,10 +63,8 @@ def manage(target):
|
|||
# target needed
|
||||
if not target:
|
||||
logs.out("5", args.action, True)
|
||||
|
||||
elif not db.post:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# Already check
|
||||
elif not target in args.multi_chk \
|
||||
and db.exists \
|
||||
and not db.old_chk:
|
||||
|
@ -81,8 +79,13 @@ def manage(target):
|
|||
return
|
||||
check_process(target)
|
||||
|
||||
# All
|
||||
elif target in args.multi_chk:
|
||||
check_all(target)
|
||||
|
||||
# No file found
|
||||
elif not db.post:
|
||||
sys.exit(1)
|
||||
|
||||
else:
|
||||
check_process(target)
|
||||
|
@ -99,16 +102,17 @@ def manage(target):
|
|||
def check_all(option):
|
||||
found = False
|
||||
|
||||
for post_db in os.listdir(db.articles_db):
|
||||
if post_db.endswith('.conf'):
|
||||
for post_db in os.listdir(dom.articles_db_d):
|
||||
if post_db.endswith('.config'):
|
||||
# Load DB
|
||||
post_db = '%s%s'%(db.articles_db, post_db)
|
||||
post_db = '%s%s'%(dom.articles_db_d, post_db)
|
||||
exec(open(post_db).read(),globals())
|
||||
args.target = post_src.rsplit('%s/'%db.in_dir)[1]
|
||||
importlib.reload(db)
|
||||
#print(':> [%s] - %s'%(db.title, db.post_src))
|
||||
|
||||
if not db.db_exists: continue
|
||||
if option == 'again' and not db.old_chk: continue
|
||||
if not db.exists: continue
|
||||
if option == 'all' and not db.old_chk: continue
|
||||
|
||||
found = True
|
||||
print(':> [%s] - %s'%(db.title, db.post_src))
|
||||
|
@ -116,7 +120,7 @@ def check_all(option):
|
|||
|
||||
if post_err: logs.out("44", args.target, False)
|
||||
|
||||
if not found: logs.out("28", '(check)', True)
|
||||
if not found: logs.out("28", args.action, True)
|
||||
|
||||
|
||||
#========================#
|
||||
|
|
|
@ -26,6 +26,8 @@ remove = exists = post = corrupt = False
|
|||
try: in_dir = os.getcwd()
|
||||
except: logs.out("13", '', True)
|
||||
|
||||
in_dir = os.getcwd()
|
||||
|
||||
if args.target \
|
||||
and args.action in args.pass_db \
|
||||
and not args.target in args.pass_targets:
|
||||
|
|
|
@ -72,11 +72,11 @@ def tyto(target):
|
|||
' wip : Create page in wip server\n'
|
||||
' publish : Create page in www server\n\n'
|
||||
' - [target] according to [action]\n'
|
||||
' all : Convert all already converted articles\n'
|
||||
' again : convert only converted articles and matches'
|
||||
' newer : convert only newer articles'
|
||||
' all : process (updated) valid articles\n'
|
||||
' again : process ALL valid articles\n'
|
||||
' newer : [wip/publish] convert only newer articles\n'
|
||||
' template: - Create navbar/sidebar/metas/footer in www server\n'
|
||||
' - Copy wip/template/ files to www server\n'
|
||||
' - Copy other wip/template/ files to www server\n'
|
||||
' domain : Create/Show config file\n'
|
||||
' [file] : URI of an article\'s file (autocompletion is your friend)\n'
|
||||
' footer : Create/Show footer HTML config\'s file\n'
|
||||
|
|
|
@ -72,7 +72,7 @@ def out(nbr, value, out):
|
|||
'41' : ' ╒ %s%s%s > "%s"'%(CR, lang.dom_inc, CS, value),
|
||||
'42' : ' ╒ %s%s%s > "%s"'%(CG, lang.dom_act, CS, value),
|
||||
'43' : ' ╒ %s%s%s'%(CY, lang.dom_no, CS),
|
||||
'44' : ' ╞ %sCheck again manually%s "tyto check %s"'%(CY, CS, value),
|
||||
'44' : ' ╞ %s%s%s "tyto check %s"'%(CY, lang.check_m, CS, value),
|
||||
'51' : ' ╞ %s%s%s > %s'%(CY, lang.data_inc, CS, value),
|
||||
'255' : ' ╘ %s'%lang.laterout
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ dir_c = "Directory created"
|
|||
dir_e = "Directory exists"
|
||||
|
||||
check_on = "Article was check the"
|
||||
check_m = "Check manually"
|
||||
post_inc = "Unused in article"
|
||||
post_inv = "Article not valid"
|
||||
post_val = "Article is valid"
|
||||
|
|
|
@ -33,6 +33,7 @@ dir_c = "Dossier créé"
|
|||
dir_e = "Dossier présent"
|
||||
|
||||
check_on = "Article vérifié le"
|
||||
check_m = "Vérifier manuellement"
|
||||
post_inc = "Donnée manquante dans l'article"
|
||||
post_inv = "Article non valide"
|
||||
post_val = "Article valide"
|
||||
|
|
Loading…
Reference in New Issue