vertretungsplanme / substitution-schedule-parser

Java library for parsing schools' substitution schedules. Supports multiple different systems mainly used in the German-speaking countries, including Untis, svPlan, and DAVINCI
https://vertretungsplan.app
Mozilla Public License 2.0
39 stars 8 forks source link

Add ability to parse untis-monitor from file #53

Open BenediktKrimmel opened 6 years ago

BenediktKrimmel commented 6 years ago

As far as I know, you currently can only parse a substitution schedule which you get via HTTP GET.

However, in some cases, that's not really useful since you'd have to host the subst_001.htm on a web server for it to be retrievable with the parser.

johan12345 commented 6 years ago

Our app uses the parser for parsing schedules from websites of schools, so that is why HTTP GET is the easiest way for our use case. That is why there is also the LoginHandler class to allow for handling different types of login forms that might be encountered on such websites.

Just out of curiosity, what would you like to use the parser for and why is the schedule stored locally in that case?

I would accept a pull request that adds support for parsing schedules from files, but we would need to discuss about how the corresponding configuration would look like. Also, for consistency, this would need to be implemented in all parsers (at least all where it makes sense, not e.g. WebUntis, LegionBoard, IPHIS, stundenplan24, eschool - which are all web applications where the schedules are automatically published on a web server by the school)

BenediktKrimmel commented 6 years ago

My school exports untis-monitor. However it doesn't display the exported subst_001.htm online because it has to make it password protected for data protection and it uses a different method to display the schedule online.

johan12345 commented 6 years ago

The parser might still work even though the schedule is password protected online. Using LoginHandler it can handle many different kinds of login forms. It only won't work if it is uploaded as a PDF or image file or if the necessary CSS class attributes are removed from the subst_001.htm.