Skip to content

Commit

Permalink
added windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tangerinehuge committed Apr 23, 2020
1 parent 17b4733 commit 15bb703
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,6 @@ dmypy.json
settings.json
mac binary/WFAutobuy.dmgCanvas/Disk Image
mac binary/WFAutobuy.dmgCanvas/QuickLook/Preview.jpg
.vscode/launch.json

dmg assets/
8 changes: 7 additions & 1 deletion WFAutobuy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import sys
import time
import os
from pathlib import Path
import platform
import requests
import json
import socket
Expand All @@ -15,7 +17,11 @@
from selenium.common.exceptions import WebDriverException
from twilio.rest import Client

CONFIG_FILE = '/tmp/config.json'
if platform.system == 'Linux':
CONFIG_FILE = '/tmp/config.json'
else:
CONFIG_FILE = Path(Path.home() / "Documents/config.json")

DEFAULT_CONFIG = {"interval": 30, "purchasing_enabled": True, "ifttt_enabled": False, "ifttt_webhook": "", "slack_enabled": False, "slack_webhook": "", "twilio_enabled": False, "twilio_account_sid": "", "twilio_auth_token": "", "twilio_phone_number": "", "twilio_cell_number": ""}

def load_config(config_file, default_config):
Expand Down

0 comments on commit 15bb703

Please sign in to comment.