...
 
Commits (211)
hooks/
merges/
platforms/
plugins/
res/
*.apk
#npm -g install cordova #(https://cordova.apache.org/)
#cordova create WvSVPlan
cordova platform add android # und mehr
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin
cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.file
cordova plugin add org.apache.cordova.file-transfer
cordova plugin add org.apache.cordova.network-information
cordova plugin add de.appplant.cordova.plugin.local-notification
cordova build
This diff is collapsed.
WvS-VPlan lädt automatisch den Vertretungsplan von Moodle und parst ihn.
Bauen
=====
Siehe BUILDING:
* NodeJS installieren und mit npm Apache Cordova installieren [Infos zu NodeJS](https://nodejs.org/) [Infos zu Cordova](https://cordova.apache.org/)
* Android-Plattform installieren und zu einem neuen Cordova-Projekt hinzufügen [Infos dazu](https://developer.android.com/index.html)
* Plugins hinzufügen
* Das WvS-VPlan-Repository in den Cordova-Projektordner klonen (`git clone https://...`) [Infos dazu](https://git-scm.com/)
* mit `cordova run` die App bauen und auf dem Emulator oder am angeschlossenen Gerät starten
Editieren
=========
* In www/ liegen die Dateien für die App (index.html, js/index.js, css/index.css)
* Mit Cordova werden hybride Webanwendungen geschrieben, d. h. die App ist in Javascript und HTML5 geschrieben
* Benutzte Bibliotheken: jQuery + jQuery Mobile, PDF.js, piwik.js
* Das Projekt ist AGPLv3-lizensiert: Du darfst dir den Code ansehen, du darfst ihn bearbeiten und bauen und deine eigene Version publizieren; du musst aber den Quellcode offenlegen [Infos dazu](https://www.gnu.org/licenses/agpl-3.0.html).
Funktionsweise
==============
0. Sind aktuelle, also Pläne des heutigen Tages oder später vorhanden, werden diese aus dem Speicher angezeigt.
1. Die App loggt sich (automatisch) auf Moodle ein.
2. Die App sucht nach einem Link "Vertretungsplan".
3. Die App öffnet jeden Link auf der Planübersicht
4. und verfolgt die Weiterleitung dieser Links auf die
5. Datei (PDF), die dann heruntergeladen wird.
6. Nach dem Rendering des PDFs wird die Darstellung als Bild gespeichert.
7. Aus der PDF-Tabelle wird der Text extrahiert und als Textdatei auf dem Gerät gespeichert.
8. Der extrahierte Text wird mithilfe eines (langen!) regulären Ausdrucks abgescannt, auf der Suche nach Vertretungen von der eigenen und zusätzlich festgelegten Klassen.
9. Wurde etwas gefunden, werden alle Kürzel aufgelöst, die Tabellenzeile zu einem Text umformuliert und ein Teilen-Button generiert, eine Benachrichtigung festgelegt sowie die Vertretung über dem angezeigten Plan dargestellt.
sudo npm install -g cordova
cordova platform update android
cordova plugin rm \
de.appplant.cordova.plugin.local-notification \
nl.x-services.plugins.socialsharing \
org.apache.cordova.file-transfer \
org.apache.cordova.file \
org.apache.cordova.network-information \
org.apache.cordova.device
cordova plugin add \
https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git \
https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git \
https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git \
https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git \
https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin \
https://github.com/katzer/cordova-plugin-local-notifications.git
<?xml version="1.0" encoding="UTF-8"?>
<!-- config.xml reference: https://cordova.apache.org/docs/en/3.4.0/config_ref_index.md.html -->
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "***REMOVED***"
version = "1.0.6">
<name>WvS-VPlan</name>
<description>
WvS-VPlan lädt den Vertretungsplan des Werner-von-Siemens-Gymnasiums vollautomatisch herunter, zeigt ihn dir an und benachrichtigt dich bei wichtigen Vertretungen.
</description>
<author href="http://***REMOVED***">
</author>
<property name="aapt.ignore.assets" value="&lt;dir&gt;res:!.git" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="auto" />
<preference name="splash-screen-duration" value="0" />
<icon src="res/icons/80.png" />
<icon src="res/icons/36-ldpi.png" gap:platform="android" gap:density="ldpi" />
<icon src="res/icons/48-mdpi.png" gap:platform="android" gap:density="mdpi" />
<icon src="res/icons/72-hdpi.png" gap:platform="android" gap:density="hdpi" />
<icon src="res/icons/96-xhdpi.png" gap:platform="android" gap:density="xhdpi" />
<icon src="res/icons/80.png" gap:platform="blackberry" />
<icon src="res/icons/80.png" gap:platform="blackberry" gap:state="hover"/>
<icon src="res/icons/57.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icons/72-hdpi.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icons/57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icons/72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icons/48-mdpi.png" gap:platform="winphone" />
<icon src="res/icons/173.png" gap:platform="winphone" gap:role="background" />
<access origin="http://*.***REMOVED***" />
<access origin="https://*.***REMOVED***" />
</widget>
<!DOCTYPE html>
<html>
<head>
<title>WvS VPlan Updates</title>
</head>
<body>
<ul>
<!-- Nachricht des Tages, seit 1.0.2 -->
<li id="motd">
<script type="text/javascript">
function christmas() {
var emojis = ["🎄 ", "⛄ ", "🎁 ", "❄ ", "🎅 ", "🎶 ", "🔔 ", "🌟 ", "👼"];
return emojis[moment().date() % emojis.length];
}
$('.motd').html(christmas());
</script>
</li>
<li id="0.8_alpha"><!-- id = Versionsstring -->
<!-- ok / hangon (seit 0.9.5) / info / warn / force -->
force
</li>
<li id="0.9_beta">
force
</li>
<li id="0.9.1_beta">
force
</li>
<li id="0.9.2_rc1">
force
</li>
<li id="0.9.3_rc2">
force
</li>
<li id="0.9.3.1_rc2">
force
</li>
<li id="0.9.4_rc3">
force
</li>
<li id="0.9.5_rc4">
force
</li>
<li id="0.9.6_rc5">
force
</li>
<li id="0.9.7_rc6">
info
</li>
<li id="0.9.8_rc7">
info
</li>
<li id="0.9.9_rc8">
info
</li>
<li id="0.9.10_rc9">
info
</li>
<li id="1.0.0">
info
</li>
<li id="1.0.1">
info
</li>
<li id="1.0.2">
warn
</li>
<li id="1.0.3">
info
</li>
<li id="1.0.4">
force
</li>
<li id="1.0.5">
warn
</li>
<li id="1.0.6">
ok
</li>
</ul>
</body>
</html>
#!/bin/bash
mogrify -resize 173 -write 173.png original.png
mogrify -resize 36 -write 36-ldpi.png original.png
mogrify -resize 48 -write 48-mdpi.png original.png
mogrify -resize 114 -write 57-2x.png original.png
mogrify -resize 57 -write 57.png original.png
mogrify -resize 144 -write 72-2x.png original.png
mogrify -resize 72 -write 72-hdpi.png original.png
mogrify -resize 80 -write 80.png original.png
mogrify -resize 96 -write 96-xhdpi.png original.png
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.