mirror of
https://github.com/alvierahman90/pydo.git
synced 2025-01-12 10:14:27 +00:00
allow id to be assigned at init
This commit is contained in:
parent
62726ad687
commit
813e75c74a
@ -4,7 +4,7 @@ from datetime import datetime as d
|
|||||||
|
|
||||||
|
|
||||||
class Task:
|
class Task:
|
||||||
def __init__(self, text):
|
def __init__(self, text, id=None):
|
||||||
# defaults
|
# defaults
|
||||||
self.completion_date = None
|
self.completion_date = None
|
||||||
self.creation_date = None
|
self.creation_date = None
|
||||||
@ -15,7 +15,7 @@ class Task:
|
|||||||
self.contexts = []
|
self.contexts = []
|
||||||
self.specials = []
|
self.specials = []
|
||||||
# can be used by external applications. is not included in the self.__str__() function
|
# can be used by external applications. is not included in the self.__str__() function
|
||||||
self.id = None
|
self.id = id
|
||||||
|
|
||||||
arguments = text.split(' ')
|
arguments = text.split(' ')
|
||||||
counter = 0
|
counter = 0
|
||||||
|
2
setup.py
2
setup.py
@ -3,7 +3,7 @@
|
|||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
setup(name="pydo.txt",
|
setup(name="pydo.txt",
|
||||||
version="1.1",
|
version="1.2",
|
||||||
description="A module to parse todo.txt tasks",
|
description="A module to parse todo.txt tasks",
|
||||||
author="Alvie Rahman",
|
author="Alvie Rahman",
|
||||||
url="https://github.com/alvierahman90/pydo.txt",
|
url="https://github.com/alvierahman90/pydo.txt",
|
||||||
|
Loading…
Reference in New Issue
Block a user