|
37 | 37 | class Playbook(): |
38 | 38 | def __init__(self): |
39 | 39 | self.linux_path = "/home/{}/Documents/dynamic".format(os.getenv('USER')) |
40 | | - self.windows_path = repr("c:\\Users\\{}\\My Documents".format(os.getenv('USERNAME'))) |
41 | | - self.unix_path = "." # Add mac support here |
| 40 | + self.mac_path = "/Users/{}/Documents/dynamic".format(os.getenv('USER')) |
42 | 41 | self.file_name = 'dynamic_playbook.json' |
43 | | - self.log = open('logplaybook.txt', 'w') |
44 | 42 |
|
45 | 43 | @property |
46 | 44 | def playbook_path(self): |
47 | 45 | if(sys.platform=='linux'): |
48 | 46 | return os.path.join(self.linux_path, self.file_name) |
49 | | - elif(sys.platform=='win32'): |
50 | | - return os.path.join(self.windows_path, self.file_name) |
| 47 | + if(sys.platform=='darwin'): |
| 48 | + return os.path.join(self.mac_path, self.file_name) |
51 | 49 |
|
52 | 50 | @property |
53 | 51 | def playbook_template(self): |
@@ -123,7 +121,6 @@ def add_to_playbook(self, stackoverflow_object, question_id): |
123 | 121 |
|
124 | 122 | def delete_from_playbook(self, stackoverflow_object, question_id): |
125 | 123 | content = self.playbook_content |
126 | | - self.log.write(str(len(content["items_stackoverflow"]))) |
127 | 124 | for i in range(len(content["items_stackoverflow"])): |
128 | 125 | if content["items_stackoverflow"][i]["question_id"] == question_id: |
129 | 126 | del content["items_stackoverflow"][i] |
@@ -152,7 +149,6 @@ def __init__(self): |
152 | 149 | self.heading_color = "bold blue" |
153 | 150 | self.utility = Utility() |
154 | 151 | self.playbook = Playbook() |
155 | | - self.log = open('logs.txt', 'w') |
156 | 152 |
|
157 | 153 | def populate_question_data(self, questions_list): |
158 | 154 | """ |
|
0 commit comments