Skip to content

Script to set up a structure of Github repositories using submodules and the Github API. Specially made for use by students at UiT-IFI.

License

Notifications You must be signed in to change notification settings

jonjohansen/IFI-Survival-Kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small script to help you get started with using Github for your studies @ UiT-IFI

Overview

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.

Requirements

Usage

Run the script with ./script.py. The script will then prompt the user for all the required parameters.

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)

Customization

Before running the script

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.

Afterwards

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:

  1. To add a repository to the structure, create a repository as usual. (Guide)
  2. Move into the parent repository you want to add the repository within e.g cd first_semester
  3. Use the command git submodule add <URL>
  4. Commit the newly added submodule within the parent repository

Converting all the submodules to ssh

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.

Disclaimer

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

Contributing

See something that could be restructured or cleaned? Maybe you have some nice resources to add?

Fork the project, and create a pull request!

License

We use the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
more about his can be found in license.

Contributions

About

Script to set up a structure of Github repositories using submodules and the Github API. Specially made for use by students at UiT-IFI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published