count categories that starts with '## –' as well

This commit is contained in:
Ammar64
2024-11-07 13:06:26 +02:00
parent ce1a6b670c
commit acae682442
+5
View File
@@ -72,6 +72,11 @@ def main():
if lines[i].startswith("### •"):
category = Category(lines[i][6:-1])
categories.append(category)
# This is also a category
elif lines[i].startswith("## "):
category_name = re.findall("(?<=##\s\s).*?(?=\s)", lines[i])[0]
category = Category(category_name)
categories.append(category)
# This is an app
elif lines[i].startswith("*"):
# The last category in the categories list is the one we're working on