From ceeb3cc660988c82422f8d485c5525df341fbf59 Mon Sep 17 00:00:00 2001 From: Raffu Khondaker <2022rkhondak@tjhsst.edu> Date: Tue, 16 Jun 2020 20:52:12 -0400 Subject: [PATCH] installation instructions --- docs/source/install.rst | 14 +++++++++++++- skoolos.py | 16 +++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index e50cd8d..fbcb877 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -1,2 +1,14 @@ Installation -============ \ No newline at end of file +============ + +1. Git clone repository: + +https://gitlab.tjhsst.edu/understudyathon-2020/group-1/schoolos.git + +2. Install repository and create env + +cd SkoolOS +python3 -m venv env +source env/bin/activate +pip install -r requirements.txt + diff --git a/skoolos.py b/skoolos.py index a5dfb83..4b831bd 100644 --- a/skoolos.py +++ b/skoolos.py @@ -596,8 +596,22 @@ def authenticate(): # Linux: chromdriver-linux # Macos: chromdriver-mac # Windows: chromdriver.exe - path = os.path.join(os.getcwd(), 'chromedriver', 'chromedriver-mac') + print("OS: ") + print("MacOS") + print("Linux") + print("Windows") + os = input("Enter OS: ") + while(os != "Windows" or os != "Linux" or os != "Macos"): + print("Not valid OS") + os = input("Enter OS: ") + if(os == 'Windows'): + path = os.path.join(os.getcwd(), 'chromedriver', 'chromedriver.exe') + if(os == 'MacOS'): + path = os.path.join(os.getcwd(), 'chromedriver', 'chromedriver-linux') + if(os == 'Linux'): + path = os.path.join(os.getcwd(), 'chromedriver', 'chromedriver-mac') + browser = webdriver.Chrome(path) browser.get("localhost:8000/login")