Skip to content
Snippets Groups Projects
Verified Commit cc1ebfb8 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

minor changes

parent faeeb790
No related branches found
No related tags found
No related merge requests found
......@@ -49,8 +49,6 @@ def core(cardDirs, localroot=os.getcwd()):
name = library.save_tag(localroot, root, yml_file, "name")
qms.prepare_qms(localroot, root, file)
print("title:" + title)
# remove the previous header
n = header.remove_header(localroot, root, file)
......@@ -93,8 +91,7 @@ def core(cardDirs, localroot=os.getcwd()):
format.line_prepender(fileName, h)
localIndexArr[indexS].append(format.build_link(title, root))
print(title)
print(format.build_link(title, root))
# output
print(" + New header added.")
print("-----------------------")
......
......@@ -83,6 +83,7 @@ def get_title(localroot, root, file):
qms_yml = False
yml_file = ""
title = ""
if "policies" in root or "sops" in root:
yml_file = file[:-3] + ".yml"
......@@ -102,8 +103,9 @@ def get_title(localroot, root, file):
os.chdir(localroot)
# remove empty line from title
title = title.replace("# ", "")
title = title.rstrip("\n\r")
if len(title) > 0:
title = title.replace("# ", "")
title = title.rstrip("\n\r")
return title, qms_yml, yml_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment