awesome-youtubers/linter/rules/content_about.py

21 lines
545 B
Python
Raw Normal View History

2021-02-06 15:26:52 -05:00
import pathlib
here = pathlib.Path(__file__).parent
file_readme = here / './../readme.md'
2021-02-06 14:48:34 -05:00
with open(file_readme, 'r') as read_readme:
content_readme = read_readme.readlines()
2021-02-11 18:24:13 -05:00
2021-02-06 14:48:34 -05:00
def content_about():
content_about_errors_nums = []
content_about_line = 'Content about:'
2021-02-11 18:24:13 -05:00
2021-02-06 14:48:34 -05:00
for j, i in enumerate(content_readme):
if content_about_line in i:
if i[-2] != '\\':
content_about_errors_nums.append(j)
return content_about_errors_nums
2021-02-11 18:24:13 -05:00
2021-02-06 14:48:34 -05:00
content_about_errors_nums = content_about()