ADD: ascii printing of all modules

This commit is contained in:
Germann Elsa Sylvia
2023-02-21 16:55:35 +01:00
parent bbc8d6c2c5
commit a8ab7ba7de
2 changed files with 19 additions and 6 deletions

View File

@ -98,7 +98,7 @@ def db_check_diff(current_pmodule_state, Pmodules_db_path, Pmodules_states):
current_pmodule_state, old_pmodule_state, Pmodules_states, Pmodules_db_path
)
else:
print_to_asciidoc([], [], [], Pmodules_db_path)
print_to_asciidoc([], [], [], [], Pmodules_db_path)
# There is no database available or there are differences with the old pmodule state, writing current state.
if no_current_db or compare_states_sha(
@ -108,8 +108,13 @@ def db_check_diff(current_pmodule_state, Pmodules_db_path, Pmodules_states):
def print_to_asciidoc(
new_module_list, deleted_module_list, changed_module_list, Pmodules_db_path
all_module_list,
new_module_list,
deleted_module_list,
changed_module_list,
Pmodules_db_path,
):
asciidoc_json_dump(all_module_list, "all", 1, Pmodules_db_path)
asciidoc_json_dump(new_module_list, "new", 1, Pmodules_db_path)
asciidoc_json_dump(deleted_module_list, "deleted", 1, Pmodules_db_path)
asciidoc_json_dump(changed_module_list, "changed", 2, Pmodules_db_path)
@ -122,6 +127,7 @@ def print_pmodules_differences(
current_db = set(" ".join(i.split()) for i in current_pmodule_state.splitlines())
old_db = set(" ".join(i.split()) for i in old_pmodule_state.splitlines())
all_module_list = list(current_db)
new_module_list = list(current_db - old_db)
deleted_module_list = list(old_db - current_db)
changed_module_list = []
@ -157,7 +163,11 @@ def print_pmodules_differences(
)
print_to_asciidoc(
new_module_list, deleted_module_list, changed_module_list, Pmodules_db_path
all_module_list,
new_module_list,
deleted_module_list,
changed_module_list,
Pmodules_db_path,
)