-
Notifications
You must be signed in to change notification settings - Fork 29
Feat/lesson01/readme-html-conversion-WayleomVargas #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/lesson01/readme-html-conversion-WayleomVargas #71
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a bad start, Wayleom. Left some comments in places, but the biggest thing I noticed is that the file organization is messy. It's hard to figure out what's what.
You could better organize this as:
- personal_readme
- README.md
- README.html
- Images
- IMG_0660.jpg
- ...
- markdown_converter
- convert.sh
- MarkdownCSS.css
- README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There needs to be more documentation and comments that explain to another engineer what this code is about and how it generally works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, I will do more documentation next time.
def html_converter(md_filename): | ||
html_filename = "test.html" # output file fixed | ||
|
||
with open(md_filename, 'r') as readme, open(html_filename, 'w') as test: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the var name test
supposed to represent? Should it be text
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's referencing the opened file, I should have named it something more meaningful like text as you sugested. I will keep that in mind for next time.
print(f"Converted {sys.argv[1]} to test.html") | ||
|
||
|
||
# def ContentPrinter(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should almost never commit commented out code that doesn't do anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I won't do it again; it was so I could have referenced some steps I did before to remind myself how i got the conclusion.
exit 1 | ||
fi | ||
|
||
rm -f test.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it deletes the existing test.html file every time it runs. I got tired of manually deleting it myself so i added it to the bash script.
So the reason why some of the files are not listed in the README is that I didn't include them in the same space in the stretch goal. Which I notice is not bad practice. Things I need to take into consideration in the future are better variable naming, a more in-depth README, and better code explanation.. |
No description provided.