Skip to content

Commit c6d0d1b

Browse files
committed
Add macOS file system support
1 parent 467e994 commit c6d0d1b

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

logplaybook.txt

Whitespace-only changes.

logs.txt

Whitespace-only changes.

src/arguments/utility.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,15 @@
3737
class Playbook():
3838
def __init__(self):
3939
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'))
4241
self.file_name = 'dynamic_playbook.json'
43-
self.log = open('logplaybook.txt', 'w')
4442

4543
@property
4644
def playbook_path(self):
4745
if(sys.platform=='linux'):
4846
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)
5149

5250
@property
5351
def playbook_template(self):
@@ -123,7 +121,6 @@ def add_to_playbook(self, stackoverflow_object, question_id):
123121

124122
def delete_from_playbook(self, stackoverflow_object, question_id):
125123
content = self.playbook_content
126-
self.log.write(str(len(content["items_stackoverflow"])))
127124
for i in range(len(content["items_stackoverflow"])):
128125
if content["items_stackoverflow"][i]["question_id"] == question_id:
129126
del content["items_stackoverflow"][i]
@@ -152,7 +149,6 @@ def __init__(self):
152149
self.heading_color = "bold blue"
153150
self.utility = Utility()
154151
self.playbook = Playbook()
155-
self.log = open('logs.txt', 'w')
156152

157153
def populate_question_data(self, questions_list):
158154
"""

0 commit comments

Comments
 (0)