diff --git a/linter/rules/content_about.py b/linter/rules/content_about.py new file mode 100644 index 0000000..60c9ed7 --- /dev/null +++ b/linter/rules/content_about.py @@ -0,0 +1,15 @@ +file_readme = './../readme.md' +with open(file_readme, 'r') as read_readme: + content_readme = read_readme.readlines() + +def content_about(): + content_about_errors_nums = [] + content_about_line = 'Content about:' + + 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 + +content_about_errors_nums = content_about() diff --git a/linter/rules/featured_playlists.py b/linter/rules/featured_playlists.py new file mode 100644 index 0000000..d877011 --- /dev/null +++ b/linter/rules/featured_playlists.py @@ -0,0 +1,16 @@ +file_readme = './../readme.md' +with open(file_readme, 'r') as read_readme: + content_readme = read_readme.readlines() + +def featured_playlists(): + featured_playlists_errors_nums = [] + featured_playlists_line = 'Featured playlists:' + featured_playlists_dlen = 124 + + for j, i in enumerate(content_readme): + if featured_playlists_line in i: + if len(i) < featured_playlists_dlen and i[-2] != '\\': + featured_playlists_errors_nums.append(j) + return featured_playlists_errors_nums + +featured_playlists_errors_nums = featured_playlists() diff --git a/linter/rules/youtubers_names.py b/linter/rules/youtubers_names.py new file mode 100644 index 0000000..986bdaf --- /dev/null +++ b/linter/rules/youtubers_names.py @@ -0,0 +1,15 @@ +file_readme = './../readme.md' +with open(file_readme, 'r') as read_readme: + content_readme = read_readme.readlines() + +def youtubers_names(): + youtubers_name_errors_nums = [] + youtuber_count_char = '[**' + + 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 + +youtubers_name_errors_nums = youtubers_names()