Skip to content

Commit

Permalink
Main code should be indented within main function... woops
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioPDX committed Apr 10, 2021
1 parent 2567341 commit ffd900f
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions ref_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ def main():
All the action
"""

with open("reference.md", "w") as my_file:
# Headers and settings alignments for file
my_file.write("# Reference for Icons\n")
my_file.write("\n")
my_file.write("|Icon|Name|Icon|Name|Icon|Name|\n")
my_file.write("|:---:|:---:|:---:|:---:|:---:|:---:|\n")
for (root, dirs, files) in walk(PATH):
count = 0
# Iterating over all files with .png extension
for f in files:
if ".png" in f:
# Simple math checks on matches and reset
# counter on third entry
count += 1
if count == 1:
my_file.write(f"|![{f}]({root}/{f})|{f.replace('.png', '')}|")
if count == 2:
my_file.write(f"![{f}]({root}/{f})|{f.replace('.png', '')}|")
if count == 3:
my_file.write(f"![{f}]({root}/{f})|{f.replace('.png', '')}|\n")
count = 0
my_file.write("\n")

with open("reference.md", "w") as my_file:
# Headers and settings alignments for file
my_file.write("# Reference for Icons\n")
my_file.write("\n")
my_file.write("|Icon|Name|Icon|Name|Icon|Name|\n")
my_file.write("|:---:|:---:|:---:|:---:|:---:|:---:|\n")
for (root, dirs, files) in walk(PATH):
count = 0
# Iterating over all files with .png extension
for f in files:
if ".png" in f:
# Simple math checks on matches and reset
# counter on third entry
count += 1
if count == 1:
my_file.write(f"|![{f}]({root}/{f})|{f.replace('.png', '')}|")
if count == 2:
my_file.write(f"![{f}]({root}/{f})|{f.replace('.png', '')}|")
if count == 3:
my_file.write(f"![{f}]({root}/{f})|{f.replace('.png', '')}|\n")
count = 0
my_file.write("\n")

if __name__ == "__main__":
main()

0 comments on commit ffd900f

Please sign in to comment.