Move file directories

This commit is contained in:
Jose De Freitas 2021-03-07 15:14:20 -05:00
parent d5b623991a
commit e01cf285c8
11 changed files with 163 additions and 163 deletions

View File

@ -1,34 +1,34 @@
# Last "as" keyword is in the form ab_cd, where "a" and
# "b" are the first letters of the two words of the module
# and "c" and "d" are the first letters of the two words
# of the function of the module.
from rules.content_about import trailing_slash as ca_ts
from rules.featured_playlists import trailing_slash as fp_ts
from rules.youtubers_names import trailing_slash as yn_ts
def main() -> None:
"""
Main function. Used specifically to call print results
by calling functions into rules/.
Functions:
content_about: trailing_slash, comma_separated
featured_playlists: trailing_slash, closed_backsticks
youtubers_names: trailing_slash, youtube_link
"""
# "youtubers_names"
print("YouTubers names:")
print(yn_ts())
# "content_about"
print("Content about:")
print(ca_ts())
# "featured_playlists"
print("Featured playlists:")
print(fp_ts())
if __name__ == '__main__':
main()
# Last "as" keyword is in the form ab_cd, where "a" and
# "b" are the first letters of the two words of the module
# and "c" and "d" are the first letters of the two words
# of the function of the module.
from rules.content_about import trailing_slash as ca_ts
from rules.featured_playlists import trailing_slash as fp_ts
from rules.youtubers_names import trailing_slash as yn_ts
def main() -> None:
"""
Main function. Used specifically to call print results
by calling functions into rules/.
Functions:
content_about: trailing_slash, comma_separated
featured_playlists: trailing_slash, closed_backsticks
youtubers_names: trailing_slash, youtube_link
"""
# "youtubers_names"
print("YouTubers names:")
print(yn_ts())
# "content_about"
print("Content about:")
print(ca_ts())
# "featured_playlists"
print("Featured playlists:")
print(fp_ts())
if __name__ == '__main__':
main()

View File

@ -1,36 +1,36 @@
import pathlib
here = pathlib.Path(__file__).parent
file_readme = here / '../../readme.md'
with open(file_readme, 'r') as read_readme:
content = read_readme.readlines()
CHECKER = "Content about:"
def trailing_slash() -> str:
"""
Looks for backslash and the end of all the matching
lines ("Content about:" lines).
"""
result = ["🟢 0: perfect."]
for line, value in enumerate(content):
if CHECKER in value:
last = value[-2]
if last != "\\":
if last == " ":
content[line] = f"{value[:-1]}\\\n"
else:
content[line] = f"{value[:-1]} \\\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash. Fixed.")
if len(result) > 1:
return '\n'.join(result[1:])
else:
return ''.join(result)
import pathlib
here = pathlib.Path(__file__).parent
file_readme = here / '../../../readme.md'
with open(file_readme, 'r') as read_readme:
content = read_readme.readlines()
CHECKER = "Content about:"
def trailing_slash() -> str:
"""
Looks for backslash and the end of all the matching
lines ("Content about:" lines).
"""
result = ["🟢 0: perfect."]
for line, value in enumerate(content):
if CHECKER in value:
last = value[-2]
if last != "\\":
if last == " ":
content[line] = f"{value[:-1]}\\\n"
else:
content[line] = f"{value[:-1]} \\\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash. Fixed.")
if len(result) > 1:
return '\n'.join(result[1:])
else:
return ''.join(result)

View File

@ -1,56 +1,56 @@
import pathlib
here = pathlib.Path(__file__).parent
file_readme = here / '../../readme.md'
with open(file_readme, 'r') as read_readme:
content = read_readme.readlines()
CHECKER = "Featured playlists:"
LENGTH = 124
def trailing_slash() -> str:
"""
Looks for backslash and the end of all the matching
lines ("Featured playlists:" lines) and a line
break tag "<br>" at the next line.
"""
result = ["🟢 0: perfect."]
for line, value in enumerate(content):
if CHECKER in value:
last = value[-2]
if len(value) < LENGTH:
if last != "\\" and "<br>" not in content[line+1]:
if last == " ":
content[line] = f"{value[:-1]}\\\n<br>\n"
else:
content[line] = f"{value[:-1]} \\\n<br>\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash | line break. Fixed.")
elif last != "\\" and "<br>" in content[line+1]:
if last == " ":
content[line] = f"{value[:-1]}\\\n"
else:
content[line] = f"{value[:-1]} \\\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash. Fixed.")
elif last == "\\" and "<br>" not in content[line+1]:
content[line+1] = "<br>\n\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: line break. Fixed.")
if len(result) > 1:
return '\n'.join(result[1:])
else:
return ''.join(result)
import pathlib
here = pathlib.Path(__file__).parent
file_readme = here / '../../../readme.md'
with open(file_readme, 'r') as read_readme:
content = read_readme.readlines()
CHECKER = "Featured playlists:"
LENGTH = 124
def trailing_slash() -> str:
"""
Looks for backslash and the end of all the matching
lines ("Featured playlists:" lines) and a line
break tag "<br>" at the next line.
"""
result = ["🟢 0: perfect."]
for line, value in enumerate(content):
if CHECKER in value:
last = value[-2]
if len(value) < LENGTH:
if last != "\\" and "<br>" not in content[line+1]:
if last == " ":
content[line] = f"{value[:-1]}\\\n<br>\n"
else:
content[line] = f"{value[:-1]} \\\n<br>\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash | line break. Fixed.")
elif last != "\\" and "<br>" in content[line+1]:
if last == " ":
content[line] = f"{value[:-1]}\\\n"
else:
content[line] = f"{value[:-1]} \\\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash. Fixed.")
elif last == "\\" and "<br>" not in content[line+1]:
content[line+1] = "<br>\n\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: line break. Fixed.")
if len(result) > 1:
return '\n'.join(result[1:])
else:
return ''.join(result)

View File

@ -1,36 +1,36 @@
import pathlib
here = pathlib.Path(__file__).parent
file_readme = here / '../../readme.md'
with open(file_readme, 'r') as read_readme:
content = read_readme.readlines()
CHECKER = "[**"
def trailing_slash() -> str:
"""
Looks for backslash and the end of all the matching
lines (YouTubers names lines).
"""
result = ["🟢 0: perfect."]
for line, value in enumerate(content):
if CHECKER in value:
last = value[-2]
if last != "\\":
if last == " ":
content[line] = f"{value[:-1]}\\\n"
else:
content[line] = f"{value[:-1]} \\\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash. Fixed.")
if len(result) > 1:
return '\n'.join(result[1:])
else:
return ''.join(result)
import pathlib
here = pathlib.Path(__file__).parent
file_readme = here / '../../../readme.md'
with open(file_readme, 'r') as read_readme:
content = read_readme.readlines()
CHECKER = "[**"
def trailing_slash() -> str:
"""
Looks for backslash and the end of all the matching
lines (YouTubers names lines).
"""
result = ["🟢 0: perfect."]
for line, value in enumerate(content):
if CHECKER in value:
last = value[-2]
if last != "\\":
if last == " ":
content[line] = f"{value[:-1]}\\\n"
else:
content[line] = f"{value[:-1]} \\\n"
with open(file_readme, 'w') as write_readme:
write_readme.writelines(content)
result.append(f"🔴 {line}: backslash. Fixed.")
if len(result) > 1:
return '\n'.join(result[1:])
else:
return ''.join(result)

View File

@ -1,5 +1,5 @@
{
"Tech_With_Tim": 11,
"Tech_With_Tim": 0,
"Derek_Banas": 0,
"Don_Jones": 0,
"Corey_Schafer": 0,