From 62726ad687de5c4707d5aeed05cd02a16fe6a392 Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Sun, 7 Feb 2021 12:50:57 +0000 Subject: [PATCH] add id field for external program use --- pydo/__init__.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pydo/__init__.py b/pydo/__init__.py index 922c70f..51eaabc 100644 --- a/pydo/__init__.py +++ b/pydo/__init__.py @@ -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], diff --git a/setup.py b/setup.py index d522916..15c7e21 100644 --- a/setup.py +++ b/setup.py @@ -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",