maintenance scripts improved

This commit is contained in:
Trilarion
2020-09-08 22:37:05 +02:00
parent 82af77b017
commit c985780dc2
6 changed files with 590 additions and 533 deletions

View File

@ -16,6 +16,7 @@ developer_file = os.path.join(root_path, 'developers.md')
backlog_file = os.path.join(code_path, 'backlog.txt')
rejected_file = os.path.join(code_path, 'rejected.txt')
statistics_file = os.path.join(root_path, 'statistics.md')
# local config
local_config_file = os.path.join(root_path, 'local-config.ini')

View File

@ -370,11 +370,16 @@ def check_and_process_entry(entry):
return entry
def is_inactive(entry):
state = entry['State']
phrase = 'inactive since '
return any(x.startswith(phrase) for x in state)
def extract_inactive_year(entry):
state = entry['State']
phrase = 'inactive since '
inactive_year = [x[len(phrase):] for x in state if x.startswith(phrase)]
inactive_year = [x.value[len(phrase):] for x in state if x.startswith(phrase)]
assert len(inactive_year) <= 1
if inactive_year:
return inactive_year[0]