start
This commit is contained in:
parent
2ce4be9089
commit
f58b3b37b2
8
thingspy/Project.py
Normal file
8
thingspy/Project.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
from ToDo import ToDo
|
||||||
|
|
||||||
|
class Project(ToDo):
|
||||||
|
|
||||||
|
def __init__(self,dict):
|
||||||
|
ToDo.__init__(self,dict)
|
||||||
|
return
|
||||||
6
thingspy/ToDo.py
Normal file
6
thingspy/ToDo.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
class ToDo:
|
||||||
|
def __init__(self, dict):
|
||||||
|
self.plist = dict
|
||||||
|
return
|
||||||
19
thingspy/things
Executable file
19
thingspy/things
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
echo test
|
||||||
|
|
||||||
|
osascript <<EOD
|
||||||
|
tell application "Google Chrome"
|
||||||
|
activate
|
||||||
|
end tell
|
||||||
|
tell application "System Events"
|
||||||
|
key down {command}
|
||||||
|
key down {shift}
|
||||||
|
keystroke "f"
|
||||||
|
key up {shift}
|
||||||
|
key up {command}
|
||||||
|
end tell
|
||||||
|
EOD
|
||||||
|
|
||||||
|
echo test2
|
||||||
43
thingspy/things.py
Normal file
43
thingspy/things.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import sys, getopt, locale
|
||||||
|
import plistlib
|
||||||
|
|
||||||
|
|
||||||
|
from ToDo import ToDo
|
||||||
|
from Project import Project
|
||||||
|
|
||||||
|
class thingspy:
|
||||||
|
def __init__(self):
|
||||||
|
self.toAddFile = ""
|
||||||
|
self.todos = []
|
||||||
|
self.projects = []
|
||||||
|
self.plist = []
|
||||||
|
return
|
||||||
|
|
||||||
|
def main(self, argv):
|
||||||
|
self.parseParam(argv)
|
||||||
|
self.plist = plistlib.readPlist(self.toAddFile)
|
||||||
|
print(self.plist)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def parseParam(self, args):
|
||||||
|
try:
|
||||||
|
opts, args = getopt.getopt(args,"ha:",["to-add="])
|
||||||
|
except getopt.GetoptError:
|
||||||
|
print sys.argv[0]+' -a <toAdd.plist>'
|
||||||
|
sys.exit(2)
|
||||||
|
for opt, arg in opts:
|
||||||
|
if opt == '-h':
|
||||||
|
print sys.argv[0]+' --to-add= <toAdd.plist>'
|
||||||
|
sys.exit()
|
||||||
|
elif opt in ("-a", "--to-add"):
|
||||||
|
self.toAddFile = arg
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
obj = thingspy();
|
||||||
|
obj.main(sys.argv[1:])
|
||||||
Loading…
Reference in New Issue
Block a user