Esempio n. 1
0
 def add_to_backlog(self, item):
     if self.backlog == None:
         self.backlog = []
     self.backlog.append(item)
     BaseCommands.export_json("/home/sean/golem/data/backlog.json",
                              self.backlog)
     return "Added to backlog"
Esempio n. 2
0
 def check_work_tells(self, sender):
     ret = "Work tells:"
     if sender not in self.work_tells.keys():
         return "No Work tells for this user"
     for tell in self.work_tells[sender]:
         ret += "\n" + tell
     del self.work_tells[sender]
     BaseCommands.export_json("/home/sean/golem/data/wtells.json",
                              self.work_tells)
     return ret
Esempio n. 3
0
 def work_tell(self, sender, args):
     target = args.split(' ', 1)[0]
     msg = args.split(' ', 1)[1]
     if self.work_tells == None:
         self.work_tells = {}
     if target not in self.work_tells.keys():
         self.work_tells[target] = []
     self.work_tells[target].append(sender + " said " + msg)
     BaseCommands.export_json("/home/sean/golem/data/wtells.json",
                              self.work_tells)
     return "Work tell added"
Esempio n. 4
0
 def remind(self, sender, args):
     if args is not "":
         if sender not in self.reminds.keys():
             self.reminds[sender] = ""
         self.reminds[sender] = self.reminds[sender] + " " + args
         BaseCommands.export_json("/home/sean/golem/data/reminds.json",
                                  self.reminds)
         return "Added remind"
     else:
         cur_reminds = self.reminds[sender]
         self.reminds[sender] = ""
         BaseCommands.export_json("/home/sean/golem/data/reminds.json",
                                  self.reminds)
         return cur_reminds
Esempio n. 5
0
 def export_doots(self):
     BaseCommands.export_json("../data/doots.json", self.doots)
Esempio n. 6
0
 def export_tells(self):
     BaseCommands.export_json("../data/tells.json", self.tells)
Esempio n. 7
0
 def export_places(self):
     BaseCommands.export_json("../data/places.json", self.places)
Esempio n. 8
0
 def export_grabs(self):
     BaseCommands.export_json("../data/grabs.json", self.grabs)
Esempio n. 9
0
 def add_to_dl_queue(self, link):
     queue = BaseCommands.read_json("/home/sean/golem/data/queue.json")
     queue = [] if queue is None else queue
     queue.append(link)
     BaseCommands.export_json("/home/sean/golem/data/queue.json", queue)
     return "Added " + link + " to download queue"
Esempio n. 10
0
 def export_places(self):
     BaseCommands.export_json("/home/sean/golem/data/places.json",
                              self.places)
Esempio n. 11
0
 def export_grabs(self):
     BaseCommands.export_json("/home/sean/golem/data/grabs.json",
                              self.grabs)
Esempio n. 12
0
 def export_doots(self):
     BaseCommands.export_json("/home/sean/golem/data/doots.json",
                              self.doots)
Esempio n. 13
0
 def export_tells(self):
     BaseCommands.export_json("/home/sean/golem/data/tells.json",
                              self.tells)