From 04203ad5bdba93a58d14d914bf57f30d4db8fca0 Mon Sep 17 00:00:00 2001 From: Cyrille L Date: Tue, 7 Mar 2023 13:28:37 +0100 Subject: [PATCH] check/wip. new asking process if already done --- src/var/lib/tyto/program/check.py | 9 ++++++++- src/var/lib/tyto/program/wip.py | 10 +++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/var/lib/tyto/program/check.py b/src/var/lib/tyto/program/check.py index d3cc6d3..ce5ea7f 100644 --- a/src/var/lib/tyto/program/check.py +++ b/src/var/lib/tyto/program/check.py @@ -46,7 +46,14 @@ def manage_check(target): # ... was already check and not changed if db.hash_chk == db.hash_post: - logs.out("20", db.date_chk, True) + logs.out("20", db.date_chk, False) + ask = ' ├ Check again this article ? ' + try: + res = input(ask) + except KeyboardInterrupt: + print('') + logs.out("255", '', True) + if not res in ['y', 'Y']: return # ... Set values for wip and www from DB date_wip = db.date_wip diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index 3bd629e..24e3f18 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -87,9 +87,13 @@ def manage_wip(target): wip_article(db.uri_file) else: logs.out("19", db.date_wip, False) - ask = '' - ask = input(' ├ Create new wip page ? ') - if not ask in ['y', 'Y']: return + try: + res = input(' ├ Create new wip page ? ') + except KeyboardInterrupt: + print('') + logs.out("255", '', True) + + if not res in ['y', 'Y']: return wip_article(db.uri_file)