Giter Site home page Giter Site logo

ashkantaravati / schedule-transformer Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 212 KB

Schedule Transformer is a hobby project of mine which can be useful for my fellow students at IAUCTB to get a good timetable view of their weekly schdeule of the classes they've taken in the present semester.

Home Page: https://transformer-taravati.fandogh.cloud/

HTML 3.48% JavaScript 96.28% Dockerfile 0.24%

schedule-transformer's Introduction

Introduction

Schedule Transformer is a hobby project of mine which can be useful for my fellow students at IAUCTB to get a good timetable view of their weekly schdeule of the classes they've taken in the present semester.

Usage

Pretty Simple; You save the contents you get at stu.iauctb.ac.ir/program_hafteh2.aspx as an *.html file, then go to latest production version which I've deployed on Fandogh PaaS or your own deployment, upload the file and click the button. If the file is valid, and hopefully its structure hasn't been changed recently in a way that triggers a failure, you get your timetable right away.

Screenshot

screenshot

Missing Features

  • Print Preview
  • Mobile Friendliness
  • Load/Save Functionality
  • Add Extra Events Manually

Contributions

Contributions are very much welcome!

Technical Specifications

Dependencies

As mentioned in package.json

Application Workflow

  • server.js is run by node.
  • The application starts listening for GET requests for / and POSTS requests for /upload on port 8080.
  • Requests for /static are handled by express.static.
  • We are going to use docker. We'll be mapping the host machine's port of our desire to port 8080 on our container. on fandogh it will be mapped to default HTTP and HTTPS ports.
  • You GET the index.html page which contains a browse and an upload button.
  • You browse and select an html file which is the saved file of 'program_hafteh2.aspx'
  • The file is POSTed in an AJAX call.
  • A JSON array of courses is returned as response.
  • upload form is disappeared.
  • JSON is parsed.
  • Timetable is rendered.
  • server.js is the entry point of the app which listens for request on the web using express.js framework.
  • When receiving GET on /, index.html will be served.
  • When receiving valid POST containing a .html file, logic on sheduleProcessor.js is invoked to process the file.
  • sheduleProcessor.js receives the html file, assuming it contains lots of useless tags.
  • First it finds the appropriate table tag, then sanitizes it and then starts extracting data.
  • For an easier pattern matching and spiting of data, the contents of the table are somehow modified before any further processing.
  • After extraction, data are turned to instances of Course class defined in Course.js file.
  • An array of Course instances is prepared and serialized as JSON.
  • A JSON array is returned is the response to received POST request.

schedule-transformer's People

Contributors

ashkantaravati avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.