-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
app/main/checks/presentation_checks/slide_text_volume_check.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from ..base_check import BasePresCriterion, answer | ||
|
||
|
||
class SlideTextVolumeCheck(BasePresCriterion): | ||
label = 'Заголовки слайдов не дублируются' | ||
description = 'Проверка на дублируемость заголовков слайдов' | ||
id = 'slide_text_volume_check' | ||
|
||
def __init__(self, file_info, min_count_words_on_slide=40, | ||
min_count_paragraphs=2, min_count_words_in_paragraph=20, | ||
max_count_words_on_slide=100, max_count_paragraphs=5, | ||
max_count_words_in_paragraph=50, | ||
slides_with_required_list=["Цели и задачи", "Заключение"]): | ||
super().__init__(file_info) | ||
self.min_count_words_on_slide = min_count_words_on_slide | ||
self.min_count_paragraphs = min_count_paragraphs | ||
self.min_count_words_in_paragraph = min_count_words_in_paragraph | ||
self.max_count_words_on_slide = max_count_words_on_slide | ||
self.max_count_paragraphs = max_count_paragraphs | ||
self.max_count_words_in_paragraph = max_count_words_in_paragraph | ||
self.slides_with_required_list = slides_with_required_list | ||
|
||
def check(self): | ||
result_str = '' | ||
if not result_str: | ||
return answer(True, 'Пройдена!') | ||
else: | ||
return answer(False, result_str) |