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