Git Product home page Git Product logo

latin-client's Introduction

LTHS Latin Client

This is a Python script designed to aid and or automate certain tasks in LTHS Latin Schoology. It can help you with vocabulary, morphology, translations and more.

Setup

  1. Clone the repository onto your local machine.
  2. Open a terminal in the project directory and create a virtual environment by running: python -m venv venv
  3. Enter the Virtual Environment via source venv/bin/activate. On Windows use venv\Scripts\activate. (Each time you run the project you need to run this command in the terminal)
  4. Install the requireements via pip install -r requirements.txt
  5. Configure the settings.json file with your Schoology username, password, and the link to your Latin Schoology course (should be in the data folder).
  6. Run the script using python main.py or python3 main.py. (Remember to run the source command to enter the project first each time)

Features

  • Automatically logs in to your LTHS Latin Schoology account.
  • Supports multiple assignment types such as, Synopsis, Compositions, Noun Adjective Agreement, Infinitive Morphology, Timed Vocabulary, Timed Morphology, and Catullus.
  • Plugins: the bot can load small javascript plugins.
  • Discord Rich Presence: display the current mode and assignment on your Discord profile.

Usage

After setting up the program, run python main.py or python3 main.py in your terminal to start the bot. Once the bot starts running, it will automatically login to your LTHS Latin Schoology account and begin listening for mode changes.

You can switch between modes by clicking on the assignment. For example, opening a synopsis assignment will put the client into synopsis mode. It should display all the relevant information on your discord account.

To use the tool, press the action button, it should be the ` key by default.

Debugger Tool

The debugging tool can be found as a function within the main script. It's a simple GUI that allows you to reload modules, inject tokens, spoof activity, and connect multiple clients together. It's run on a separate thread, so it won't interfere with the main program.W

If you're developing a plugin or making changes to the code, you can use the debugger tool to reload modules, and inject tokens, spoof activity, and connect multiple clients together. To launch the debugger tool, run python main.py --debugger or python3 main.py --debugger.

When adding a module to the program, (for example a new assignment type), you can reload the module by selecting it from a dropdown in the debugger. In order to do this however you must add the imported module to the module list found within the debugger function.

Contributing

Contributions are welcome! However, I cannot maintain this project anymore as I no longer have access to the LTHS Latin Server. (I graduated lol) If you would like to contribute, please feel free to open a pull request.

Adding a new assignment type

To add a new assignment type, create a new python file in the main folder. The python file should be called the same thing as the assignment itself (or a shortened version). To add this into the program, you must add text from the assignment page title into the "modes" list which can be found in the info.py file <line 25>.

This list is used in the main.py when scanning for assignments and switching modes. If the assignment title contains any of the strings in the modes list, it will switch to that mode. For example, if the assignment title is "Synopsis 1-10", it will switch to synopsis mode. To add the new python file for that mode, you must first import the file into the main.py then go to the main.py file again <line 307> and add the function call to the switch statement.

There are 2 main switch statements inside main.py. The first for "doAction" is for when you hit the action key. The second "enterKey" is for when you hit the enter key. If you want your function to run once, have it reset the key back to False, otherwise it will keep running unless the user hits the key again.

Formatting

This project is ment to follow the following formatting rules:

- tab size: 4
- snake_case for variables and functions
- docstrings for functions
- comments for code that is hard to understand (although I did not follow this rule very well)
- Reduce redundant code, chances are it's the information you're looking for can be found in the info.py file
- Use the debugger tool to test your code (The debugger lets you keep running the program while you make changes to the code, just reload the module and it should update (How to reload can be found in the debugger section of this readme))

Cache files can be shared btw.

License

This project is licensed under the MIT License - see the LICENSE file for details.

latin-client's People

Contributors

will-hellinger avatar

Stargazers

 avatar

Watchers

Kostas Georgiou 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.