Small script to help you get started with using Github for your studies @ UiT-IFI
The follow script creates a structure of Github repositories, as well as local repositories resembling this structure:
╔══════════════════════════╗ ┌─────┐
║ IFI Survival Kit ║ │ uit │
║ Structure ║ └──┬──┘
╚══════════════════════════╝ │ ...n semesters
┌──────────────────┼──────────────────┬ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
│ │ │
┌─────────────┴┐ ┌───────┴───────┐ ┌┴──────────────┐
│first_semester│ │second_semester│ │third_semester │
└┬──────┬─────┬┘ └┬──────┬──────┬┘ └┬──────┬──────┬┘
│ │ │ │ │ │ │ │ │
┌─────┴┐ ┌───┴──┐ ┌┴─────┐┌────┴─┐ ┌──┴───┐ ┌┴─────┐┌────┴─┐ ┌──┴───┐ ┌┴─────┐
│ inf- │ │ mat- │ │ mat- ││ inf- │ │ inf- │ │ sta- ││ inf- │ │ fys- │ │ ? │
│ 1100 │ │ 1005 │ │ 1001 ││ 1101 │ │ 1400 │ │ 1001 ││ 2200 │ │ 0100 │ │ │
└──────┘ └──────┘ └──────┘└──────┘ └──────┘ └──────┘└──────┘ └──────┘ └──────┘
The structure can be found in its entirety in structure.json
The script also creates an additional resource folder by default, such as report templates.
- Python 3.5 (or higher)
- requests (script will prompt to install if not found)
- A Github access token with repo permissions.
Run the script with ./script.py
.
The script will then prompt the user for all the required parameters.
-h, --help
Help menu-t <TOKEN>, --token <TOKEN>
Github access token-e <EMAIL>, --email <EMAIL>
Github email (Used for signing commits)-c <PATH>, --config <PATH>
Path to config file (defaults to structure.json)
Make changes to the structure.json
to suit your needs before running the script.
Note: It can be smart to check structure.json
to make sure it suits your personal needs.
This script does not account for the optional courses, and any other kinds of repositories. If you want these in the structure you can follow these steps:
- To add a repository to the structure, create a repository as usual. (Guide)
- Move into the parent repository you want to add the repository within e.g
cd first_semester
- Use the command
git submodule add <URL>
- Commit the newly added submodule within the parent repository
As of right now, this option is not featured within the script. Such a tool could possibly be made, but for now manual labor is required. see #6 for status.
We do not take any responsibility for anything. You use the script at your own discretion, and it is recommended that you understand how it works. If you have any questions, submit these as issues
See something that could be restructured or cleaned? Maybe you have some nice resources to add?
Fork the project, and create a pull request!
We use the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
more about his can be found in license.
- @maxjohansen for the initial gist and folder structure that lead to the idea!
- @raymonshansen for this report template