add id field for external program use

This commit is contained in:
Akbar Rahman 2021-02-07 12:50:57 +00:00
parent 97966d2565
commit 62726ad687
Signed by: alvierahman90
GPG Key ID: 20609519444A1269
2 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,8 @@ class Task:
self.projects = []
self.contexts = []
self.specials = []
# can be used by external applications. is not included in the self.__str__() function
self.id = None
arguments = text.split(' ')
counter = 0
@ -28,8 +30,7 @@ class Task:
self.priority = self.priority.upper()
counter += 1
# try to get completion date if done
# try to get completion date if task is marked as done
if self.done:
try:
self.completion_date = d.strptime(arguments[counter],

View File

@ -3,7 +3,7 @@
from distutils.core import setup
setup(name="pydo.txt",
version="1.0",
version="1.1",
description="A module to parse todo.txt tasks",
author="Alvie Rahman",
url="https://github.com/alvierahman90/pydo.txt",