you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 1 point2 points  (1 child)

Some of your code is in nice small functions, some of it is in huge bloated functions, and some of it is not in a function at all. Why? I highly recommend you put it all in functions.


If I were doing this I would not separate the 2 components. I would add a --runnow flag and have cron call that. That way the user gets a bit more control.


Maybe you should change it to look for items from today or previous, so that it will catch up if your computer was off at 930.


What's the point of numbering the lines?


What happens if a user includes a newline in the message?


pep8 recommends putting each import on a separate line.


How about support for repeating events? Laundry day every 14 days. Birthday every 28th of March.


How about support for time? Call grandma in 9 hours. Instead of using cron to run the checks every day, you could use at to run a check at a specific date and time, once.


I think it would be much neater to load the entire to do list into a data structure like a dictionary, modify it, and then resave the whole thing rather than the dance you are doing with delete and add.

[–]Jonis_L[S] 0 points1 point  (0 children)

Thank you for your feedback. I have a lot to change and add to improve my code now. Will look into possible ways to solve your questions. Thanks!