Giter Site home page Giter Site logo

myschool_command_line's Introduction

MySchool command line

This is a Python3 MySchool command line application.

  • The requirements/dependencies can be seen in requirements.txt.
  • An informal cheatsheet can be seen in cheatsheet.md.

Setup

Install the requirements with:
(NOTE: Check if pip is from Python3, else use pip3 to install)

sudo pip install -r requirements.txt

Next open myschool_cmd.py and change the global USERNAME in line 24 to your own username.
You need to run the script with sudo privilege, where in your first run you will be prompt for a password from MySchool. This password will be saved to .password.txt, located in your /root directory, and only root will be able to both read and write.
Optionally you can change all three global variables, inside the script:

  • USERNAME
  • PASSWORD_FILE_NAME
  • USE_DAY_OF_WEEK
  • CURRENT_SEMESTER
  • CURRENT_YEAR

Run

After the setup, you can run the commands that are listed in the cheatsheet, e.g.:
(NOTE: Check if python version is Python3, else use python3 to run the script.)

sudo ./myschool_cmd.py -tt

This command will list your timetable.
(NOTE: If this doesn't work due to encoding, try running the script with: sudo python3 /usr/bin/myschool_cmd.py -tt)

Recommended options (not mandatory)

I recommend first either moving the file or creating a symbolic link from myschool_cmd.py to /usr/bin, with:

sudo ln -s /full/path/to/myschool_cmd.py /usr/bin/myschool_cmd.

After that create an alias so it will be easier to run the script.

For bash users:

Open ~/.bashrc (or ~/.bash_profile if you are using Mac OS X) and append this to the end of the file:

alias ms="sudo myschool_cmd.py"

For zsh users:

Open ~/.zshrc and append this to the end of the file:

alias ms="sudo ./myschool_cmd.py"

Now you should be able to run the script, simply by running:

ms -tt

myschool_command_line's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.