message = error_message(category_line, f'{category} category does not have the minimum {min_entries_per_section} entries (only has {num_in_category})')
message = error_message(category_line, f'{category} category does not have the minimum {min_entries_per_section} entries (only has {num_in_category})')
errors.append(message)
errors.append(message)
category = line.split(' ')[1]
category = line_content.split(' ')[1]
category_line = line_num
category_line = line_num
num_in_category = 0
num_in_category = 0
continue
continue
# skips lines that we do not care about
# skips lines that we do not care about
if not line.startswith('|') or line.startswith('|---'):
if not line_content.startswith('|') or line_content.startswith('|---'):
continue
continue
num_in_category += 1
num_in_category += 1
segments = line.split('|')[1:-1]
segments = line_content.split('|')[1:-1]
if len(segments) < num_segments:
if len(segments) < num_segments:
message = error_message(line_num, f'entry does not have all the required sections (have {len(segments)}, need {num_segments})')
message = error_message(line_num, f'entry does not have all the required sections (have {len(segments)}, need {num_segments})')