Skip to content

Commit e8f2806

Browse files
authored
Merge pull request #708 from gauravsitlani/master
pyTM - CL task manager
2 parents c748e24 + c11e012 commit e8f2806

File tree

6 files changed

+108
-0
lines changed

6 files changed

+108
-0
lines changed

pyTM/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+

pyTM/pyTM.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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")

pyTM/todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1 Generate a list 1200
2+
2 Generate a list 1200

simple_task_manager/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+

simple_task_manager/pyTM.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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")

simple_task_manager/todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1 Generate a list 1200
2+
2 Generate a list 1200

0 commit comments

Comments
 (0)