noisive / stoned-crone

eVision iOS Timetable App
https://noisive.github.io/stoned-crone
2 stars 2 forks source link

WingIt

[Bitrise Test Status]()

README

WingIt is an app for keeping track of your University of Otago timetable

For more background information, see our first assignment

So what does WingIt do?

WingIt grabs your university timetable for the week, stores it offline, and displays it in a pleasant user interface with notifications. This makes it much easier and more reliable than the current alternatives for keeping track of your classes.

Installation

Release versions are available through the App Store
The latest version of the app can be manually built and installed on an iOS device through Xcode 9.
Clone this repository, open WingIt.xcoworkspace and build.

Usage

If your timetable is not loaded into the app, such as when it is being used for the first time, the app will prompt you to log into your eVision so that it can load and parse your timetable. WingIt is now ready for use.

Updating timetable

If your timetable for the week has changed compared to the currently loaded week, you should manually update it. To do this, log in via the left sidebar menu to refresh the data for the current week (Monday to Sunday).

Connectivity issues can occasionally mean the app hangs during this process. Clicking cancel and retrying will rectify this.

Internal working documention

WingIt is a iOS tool for managing University of Otago classes. It uses a webview in the app to log you in to eVision, injects JavaScript to navigate pages, then more JavaScript trickery to pull your timetable out of the webview.

Once it has retrieved your timetable from eVision, it's thrown at a Parser which unjumbles the mess of JavaScript, HTML, & JSON which eVision has kindly messed up in order to display your timetable as easy as possible (albeit with some bad practice thrown in). This parser also handles saving your sorted time table to your phone's internal storage. It is written in C++.

The data acquisition process is the most important and most likely to break part of the app. The login occurs first in the UI by loading a hidden browser page, obtaining user credentials, and using javascript injection to navigate to the timetable page. The HTML is then scraped for a mangled json object, the text of which is passed to the custom Parser in C++.

The parser, in parser.cpp, is the part that will need updating as eVision changes its interface and the html/javascript tags that bookend the relevant data get shuffled. It has been modularised to make this easier to do while referencing an html timetable example.

The test case comparison timetables will have to be replaced should such an eVision change occur. Sourcing varied course samples is the challenge.

Once the data is extracted into structs for each timetable event, which are loaded into a representation of the week’s timetable, it is written into a csv database, for persistent storage.

Each time the app starts up, swift calls initiate the C++ CSV loader, which restores the offline data to an accessible form.
Swift then recreates its representation of the timetables by calling accessor methods on the data. It then loads and presents this to the user.

Why "stoned-crone"?

Greek Mythology has 3 crones working on the tapestry of life, that can see the past and future. They have the "vision". "e" is a colloquial term for MDMA, or ecstacy, a narcotic. Hence, "e-Vision" = "stoned-crone"