Skip to content
Tethering Wiki to ERP
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Added json files to gitignore Jun 10, 2019
LICENSE Initial commit Nov 2, 2018
Pipfile.lock Bump urllib3 from 1.24.1 to 1.24.2 Jun 12, 2019 Added link for hercules api Aug 12, 2019 modified twerp and add_timetable_to_wiki acc to pep8 Jun 10, 2019 Add and remove comments Nov 4, 2018 added two files for extracting data and making table Dec 11, 2018
requirements.txt add GitPython in requirements and added files generated by pywikibot … Dec 11, 2018 Added new feature Jun 12, 2019 change the download link to mirror link on github Jun 12, 2019 modified files acc to pep8 Jun 10, 2019
twerp.png Edit image Nov 4, 2018 added tabulated content for some sections Jul 17, 2019 modified acc to pep8 Jun 10, 2019


Tethering Wiki to ERP

It uses the hercules API to update the 'Metakgp' wiki pages every semester for all the relevant pages with all the possible details. It is aimed at being the one bot that needs to be ran one a semester for updating with all the relevant info, including calling blackjack (bot for grades updation) and performing the duties of kakashi bots


Rajat is a twerp. He complains about the wiki not being updated frequently and is not willing to edit the pages by himself..... Presenting to you twerp - The complete remedy for twerp. Let the bot handle it.


As of now it can

  • Add the timetable for the courses being offered by IITKGP in a semester to the corresponding page on metakgp wiki. Example

  • Update the time-table of existing prof pages.

  • Updates the course pages with the data obtained from the google form.


  • Update the pages on professors with the following features (The script written will be running on per semester basis ):

    • Time Table of non-existing prof pages by creating the page first and adding to it.
    • Append to his profile, the list of courses that he taught in a semester.
  • Call (a modified) Blackjack script to update the grades.

Using twerp

  • Running using pipenv:
        Clone and change your directory to this repo and run pipenv install:
            This will install the requirements and will create a virtual environment

        Run pipenv shell:
            This will activate the virtualenv

  • Running using pip:
        Clone and change your directory to this repo and run pip install -r requirements.txt

  • Run the file if you have downloaded first time or want to add a new wiki or modify an old wiki configurations:

  • It will first clone pywikibot repo in folder named wiki_files in your current directory

  • It will ask for the link of the wiki and the with which you want to save it:     For metakgp write:
            link =
            name = metakgp         family = 5 (it'll be mediawiki)

  • It will then generate user files (set username as Twerp) and don't set any bot password yet, it will ask during runtime

  • Run the bot :

For updating data from form under Course Archiving Drive

We are collecting information from masses to update courses on metakgp wiki in this form. Below is the process on how to update from the sheet to the wiki using twerp.

  • First enable the Google Sheets API, check here for its doc.
  • Obtain the credentials.json file from the Google API Console.
  • Create a new sheet that is copy of response sheet and delete entries till we have already updated (mentioned below).
  • See about the sheetID of the new Google Spreadsheet and basic usage of Google Sheet API here
  • It will ask for the sheetID during runtime, make sure you should have the credentials.json file in the same folder as
  • If the script stops in between, please remove entries till the row that have been updated during this runtime otherwise duplicate entries will be created.

Once the update is done, manually verify if the update was successful and make edits if any necessary.

NOTE: Updated till row number 29


Join the slack channel :

You can’t perform that action at this time.