Small Python script to generate a calendar (.ics) file from SIMASTER courses schedule.

Overview

simaster.ics

Small Python script to generate a calendar (.ics) file from SIMASTER courses schedule.

Usage

Getting the events.json file from SIMASTER

  1. Open SIMASTER > Akademik > Jadwal Kuliah.
  2. Pop up your browser's Developer Tools and go to the Network tab (or something equivalent).
  3. In the SIMASTER tab, click "Jadwal Harian".
  4. In the network tab of the Developer Tools, there should be a request like this.image
  5. The request should have a JSON response that looks like the example_data.json file.
  6. Copy all that response and save it somewhere (perhaps with the name events.json).

Using the tool

  1. Make sure that you have installed Python (>= 3.6) and pip
  2. Install all the required packages using pip
pip install -r requirements.txt
  1. Run the tool: python main.py events.json
  2. If you want output it to a file: python main.py events.json > simaster.ics
  3. You're basically done! You can use the outputted .ics file for Google Calendar or something similar.

License

This small project is licensed under the MIT License.

Contribution

Any form of contribution is highly appreciated. Feel free to contribute (or maybe even buying me a cofffee).

Comments
  • Make a user interface

    Make a user interface

    API stands for application programming interface. I think it would be more friendly for people to use it if there was an interface (a basic plain HTML should be more than enough) to generate a proper calendar URL.

    enhancement 
    opened by p4kl0nc4t 3
  • Add a Dockerfile

    Add a Dockerfile

    This PR adds a new Dockerfile file. It also adds some new lines to the README.md file (example commands for deploying with Docker).

    This PR closes #12.

    Signed-off-by: Faiz Jazadi [email protected]

    opened by p4kl0nc4t 0
  • Add a `Dockerfile` to support deployment via Docker

    Add a `Dockerfile` to support deployment via Docker

    The demo page is currently deployed on Heroku using free Heroku Dynos which will no longer be available soon.

    Starting November 28th, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for RedisĀ® will no longer be available. If you have apps using any of these resources, you must upgrade to paid plans by this date to ensure your apps continue to run and to retain your data. For students, we will announce a new program by the end of September. Learn more at https://blog.heroku.com/next-chapter

    To keep the demo running, the instance needs to be deployed somewhere else. Docker seems to be a good way to pack the project and ease deployment.

    enhancement 
    opened by p4kl0nc4t 0
  • feat: session reuse/caching

    feat: session reuse/caching

    This PR contains a new feature to allow (SIMASTER API) session reusing. Session reusing is achieved by using the cachelib library (SimpleCache is chosen for simplicity). This PR also include updates to the HTML template and the README.md file.

    This PR closes #10.

    Signed-off-by: Faiz Jazadi [email protected]

    opened by p4kl0nc4t 0
  • Allow session reusing to reduce login flood

    Allow session reusing to reduce login flood

    One of the downsides of not storing password/session is the need to log in every time a request to the API is made. This also don't look good in the logged in devices page on SIMASTER.

    Caching the logged session is not secure, but having it as an option will be nice (should not be a default setting). This way, some users can let their session token cached and have a more efficient and less floody login history.

    enhancement 
    opened by p4kl0nc4t 0
  • [New Feature] Fetch Exam Events

    [New Feature] Fetch Exam Events

    This PR essentially contains:

    1. A new type parameter from the API to identify what type of calendar events the client wants to fetch
    2. A scraper (which adds some new requirements, notably lxml2) to scrape exam events from SIMASTER
    3. A new events data processor for two different types of events data (class events and exam events)
    4. Major refactor to accomodate the above changes

    Fixes: #8

    enhancement 
    opened by p4kl0nc4t 0
  • Reshape & refactor project as a simple web app

    Reshape & refactor project as a simple web app

    This commit essentially does the following:

    • Renamed the directory api_web to web
    • Updated wsgi.py (changed import statements)
    • Added a homepage that contains a simple form interface
    • Added a route that serves the homepage
    • Refactor

    Signed-off-by: Faiz Jazadi [email protected]

    opened by p4kl0nc4t 0
  • feat!: convert whole project to a Flask project

    feat!: convert whole project to a Flask project

    Manually grabbing the events.json file is quite tiring, especially when knowing the fact that Simaster's calendar changes quite often.

    This commit converted the whole project. This project is now a web-based app which has an API to grab a specific Simaster account's calendar and return it as an iCalendar file.

    Signed-off-by: Faiz Jazadi [email protected]

    opened by p4kl0nc4t 0
  • Add a security warning

    Add a security warning

    As simaster.ics uses GET request, and credentials are passed openly, it is definitely a security issue.

    It would be helpful if there is some warning in the README.md file telling about the security issue and what could be done to prevent unwanted things.

    documentation 
    opened by p4kl0nc4t 4
  • Add a method to add meeting links to events

    Add a method to add meeting links to events

    So far, this project have been able to get in sync with SIMASTER's calendar. But, to make things easier, it would have been very nice to have those events linked with their own meeting link (only if they are online events). I am thinking about two options:

    1. To have a separate database that contains a user-curated list of meeting list (or make the API fetch another file that contains the meeting list).
    2. Crawl the eLearning page in SIMASTER for links (concern: resource)
    enhancement 
    opened by p4kl0nc4t 0
Owner
Faiz Jazadi
I code in Python (mostly), currently trying to learn C/C++.
Faiz Jazadi
Python Fstab Generator is a small Python script to write and generate /etc/fstab files based on yaml file on Unix-like systems.

PyFstab Generator PyFstab Generator is a small Python script to write and generate /etc/fstab files based on yaml file on Unix-like systems. NOTE : Th

Mahdi 2 Nov 9, 2021
Extract an archive file (zip file or tar file) stored on AWS S3

S3 Extract Extract an archive file (zip file or tar file) stored on AWS S3. Details Downloads archive from S3 into memory, then extract and re-upload

Evan 1 Dec 14, 2021
A python script to convert an ucompressed Gnucash XML file to a text file for Ledger and hledger.

README 1 gnucash2ledger gnucash2ledger is a Python script based on the Github Gist by nonducor (nonducor/gcash2ledger.py). This Python script will tak

Thomas Freeman 0 Jan 28, 2022
Python package to read and display segregated file names present in a directory based on type of the file

tpyfilestructure Python package to read and display segregated file names present in a directory based on type of the file. Installation You can insta

Tharun Kumar T 2 Nov 28, 2021
File-manager - A basic file manager, written in Python

File Manager A basic file manager, written in Python. Installation Install Pytho

Samuel Ko 1 Feb 5, 2022
A simple Python code that takes input from a csv file and makes it into a vcf file.

Contacts-Maker A simple Python code that takes input from a csv file and makes it into a vcf file. Imagine a college or a large community where each y

null 1 Feb 13, 2022
A python script generate password files in plain text

KeePass (or any desktop pw manager?) Helper WARNING: This script will generate password files in plain text. ITS NOT SECURE. I needed help remembering

Eric Thomas 1 Nov 21, 2021
gitfs is a FUSE file system that fully integrates with git - Version controlled file system

gitfs is a FUSE file system that fully integrates with git. You can mount a remote repository's branch locally, and any subsequent changes made to the files will be automatically committed to the remote.

Presslabs 2.3k Jan 8, 2023
This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that have that extension.

FileBulk This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that h

Enoc Mena 1 Jun 26, 2022
Search for files under the specified directory. Extract the file name and file path and import them as data.

Search for files under the specified directory. Extract the file name and file path and import them as data. Based on that, search for the file, select it and open it.

G-jon FujiYama 2 Jan 10, 2022
Pti-file-format - Reverse engineering the Polyend Tracker instrument file format

pti-file-format Reverse engineering the Polyend Tracker instrument file format.

Jaap Roes 14 Dec 30, 2022
Generates a clean .txt file of contents of a 3 lined csv file

Generates a clean .txt file of contents of a 3 lined csv file. File contents is the .gml file of some function which stores the contents of the csv as a map.

Alex Eckardt 1 Jan 9, 2022
PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

phithon 53 Nov 7, 2022
Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

laojunjun 13 Nov 23, 2022
Two scripts help you to convert csv file to md file by template

Two scripts help you to convert csv file to md file by template. One help you generate multiple md files with different filenames from the first colume of csv file. Another can generate one md file with several blocks.

null 2 Oct 15, 2022
Vericopy - This Python script provides various usage modes for secure local file copying and hashing.

Vericopy This Python script provides various usage modes for secure local file copying and hashing. Hash data is captured and logged for paths before

null 15 Nov 5, 2022
This simple python script pcopy reads a list of file names and copies them to a separate folder

pCopy This simple python script pcopy reads a list of file names and copies them to a separate folder. Pre-requisites Python 3 (ver. > 3.6) How to use

Madhuranga Rathnayake 0 Sep 3, 2021
Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

null 3 Feb 9, 2022
A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".

the problem What directory should your app use for storing user data? If running on macOS, you should use: ~/Library/Application Support/<AppName> If

ActiveState Software 948 Dec 31, 2022