awesome-youtubers/linter/rules/youtubers_names.py

21 lines
544 B
Python
Raw Normal View History

2021-02-06 15:30:17 -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 youtubers_names():
youtubers_name_errors_nums = []
youtuber_count_char = '[**'
2021-02-11 18:24:13 -05:00
2021-02-06 14:48:34 -05:00
for j, i in enumerate(content_readme):
if youtuber_count_char in i:
if i[-2] != '\\':
youtubers_name_errors_nums.append(j)
return youtubers_name_errors_nums
2021-02-11 18:24:13 -05:00
2021-02-06 14:48:34 -05:00
youtubers_name_errors_nums = youtubers_names()