|
@@ -86,6 +86,21 @@ line_1 = post_list[0]
|
|
|
if (line_1[0]) != "#":
|
|
|
print("Заголовок статьи не найден")
|
|
|
|
|
|
+# наличие вопросов и списка литературы
|
|
|
+quest_exist = False
|
|
|
+source_exist = False
|
|
|
+for post_line in post_list:
|
|
|
+ if (post_line[0:1] == "##"):
|
|
|
+ if ("Вопросы" in post_line):
|
|
|
+ quest_exist = True
|
|
|
+ if ("Список литературы" in post_line):
|
|
|
+ source_exist = True
|
|
|
+if not (quest_exist):
|
|
|
+ print("Вопросы не найдены")
|
|
|
+if not (source_exist):
|
|
|
+ print("Список литературы не найден")
|
|
|
+
|
|
|
+
|
|
|
header_text = line_1.replace("# ", "")
|
|
|
header_text = header_text.replace(".", "")
|
|
|
header_text = header_text.strip()
|
|
@@ -149,7 +164,8 @@ for readme_str in readme_list:
|
|
|
print(f"количество совпадающих слов: {len(c)} / {ratio}%")
|
|
|
print()
|
|
|
|
|
|
-
|
|
|
+if not(lection_exist):
|
|
|
+ print("Лекция не найдена в списке")
|
|
|
|
|
|
|
|
|
exit()
|