File tree Expand file tree Collapse file tree 6 files changed +108
-0
lines changed
Expand file tree Collapse file tree 6 files changed +108
-0
lines changed Original file line number Diff line number Diff line change 1+ # pyTM
2+ A command line task manager for managing daily tasking - currently a work in progress.
3+
4+ How it works-
5+ python pyTM.py -arg
6+
7+ for example to add a particular task
8+ python pyTM.py -a "Write assignment X" 1500
9+
10+ Currently working arguments:
11+ -[ X] -a to add the tasks along with due time
12+ -[ X] -ls to list all the tasks
13+
14+ Further need of additions :
15+ -[ ] -d to delete a particular task
16+ -[ ] -u update a particular task
17+ -[ ] notifying on due time with a pop up
18+
19+
20+
Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ import time
4+
5+ filename = "todo.txt"
6+
7+ args = ["-a" ,"-ls" ]
8+
9+ if (len (sys .argv )< 2 ):
10+ print ("Error, Enter some argument" )
11+ print ("""-a to Add a task\n -ls to Display all tasks""" )
12+ exit ()
13+
14+
15+ if (not os .path .isfile (filename )):
16+ open ("todo.txt" ,"w" )
17+ print ("File created" )
18+
19+ count = sum (1 for line in open (filename ))
20+ count = count + 1
21+
22+ if (sys .argv [1 ]== "-a" ):
23+ if (len (sys .argv )< 4 ):
24+ print ("Error with argument" )
25+ else :
26+ task = sys .argv [2 ]
27+ duetime = sys .argv [3 ]
28+ fl = open (filename , "a+" )
29+ fl .write (str (count )+ " " + task + " " + duetime + " \n " )
30+
31+ if (sys .argv [1 ]== "-ls" ):
32+ os .system ("cat todo.txt" )
Original file line number Diff line number Diff line change 1+ 1 Generate a list 1200
2+ 2 Generate a list 1200
Original file line number Diff line number Diff line change 1+ # pyTM
2+ A command line task manager for managing daily tasking - currently a work in progress.
3+
4+ How it works-
5+ python pyTM.py -arg
6+
7+ for example to add a particular task
8+ python pyTM.py -a "Write assignment X" 1500
9+
10+ Currently working arguments:
11+ -[ X] -a to add the tasks along with due time
12+ -[ X] -ls to list all the tasks
13+
14+ Further need of additions :
15+ -[ ] -d to delete a particular task
16+ -[ ] -u update a particular task
17+ -[ ] notifying on due time with a pop up
18+
19+
20+
Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ import time
4+
5+ filename = "todo.txt"
6+
7+ args = ["-a" ,"-ls" ]
8+
9+ if (len (sys .argv )< 2 ):
10+ print ("Error, Enter some argument" )
11+ print ("""-a to Add a task\n -ls to Display all tasks""" )
12+ exit ()
13+
14+
15+ if (not os .path .isfile (filename )):
16+ open ("todo.txt" ,"w" )
17+ print ("File created" )
18+
19+ count = sum (1 for line in open (filename ))
20+ count = count + 1
21+
22+ if (sys .argv [1 ]== "-a" ):
23+ if (len (sys .argv )< 4 ):
24+ print ("Error with argument" )
25+ else :
26+ task = sys .argv [2 ]
27+ duetime = sys .argv [3 ]
28+ fl = open (filename , "a+" )
29+ fl .write (str (count )+ " " + task + " " + duetime + " \n " )
30+
31+ if (sys .argv [1 ]== "-ls" ):
32+ os .system ("cat todo.txt" )
Original file line number Diff line number Diff line change 1+ 1 Generate a list 1200
2+ 2 Generate a list 1200
You can’t perform that action at this time.
0 commit comments