RichardJRL / pocketmagstopdf

Download pocketmags magazines in PDF format from the HTML5 reader
Creative Commons Zero v1.0 Universal
42 stars 8 forks source link

Replaced print statements with a Python Logger #5

Closed shirblc closed 1 year ago

shirblc commented 1 year ago

Thank you for the amazing work you've done! Love the current script. I've used the original script before, but the fact you enabled fetching the original text-based magazine is huge and I really appreciate it.

I wanted to suggest a small change as far as logging is concerned.

Since the Python standard library has logging built into it, we don't need to keep checking whether the user is in debug/quiet mode; instead, we can just set the appropriate Log Level and let Python handle the level checking. This will also allow us to add formatting and colours if we want to (e.g., red for errors, yellow for warnings, etc).

RichardJRL commented 1 year ago

Thank you very much for this! It's taught me something new about Python (this program is my first Python project) and tidied up the code too.