Closed snootysteppes closed 1 month ago
In a later commit, I'll also add more comments to the scripts. Lack of comments don't make it clean. If anything, it reduces readability and makes code more difficult to understand/replicate/maintain
Also, if you have any suggestions for improving the code or adding more functionalities (aside from rss feed or 404 error page) with xkcd, please let me know
No problem man, I like the idea & the comics!
Removed Comments:
Formatted Publication Date:
pubDate
field in the RSS feed to ensure the month and day are zero-padded, improving compliance with RSS formatting standards.Adjusted Seen Comics Reset Logic:
reset
parameter to theclear_seen_comics_if_complete
function, allowing explicit control over when to reset the seen comics list.Implemented a Maximum Retry Limit:
fetch_random_comic
function, added a maximum attempt limit (set to 10) to prevent infinite loops when fetching unseen comics.Added Delay on Network Errors:
Directory Creation:
docs/rss
directory in thesave_rss_to_file
function if it doesn't already exist, ensuring that the save operation won't fail due to a missing path.These changes enhance the script's functionality, reliability, and maintainability. Let me know if you have any further questions or need additional modifications!