test
authorMart Lubbers <mart@martlubbers.net>
Thu, 8 May 2014 11:29:49 +0000 (13:29 +0200)
committerMart Lubbers <mart@martlubbers.net>
Thu, 8 May 2014 11:29:49 +0000 (13:29 +0200)
program/hypfront/hyper.py
program/hypfront/index.html
program/hypfront/install.sh
program/hypfront/paradiso.rss.xml [new file with mode: 0644]
program/hypfront/rss.xml [new file with mode: 0644]
program/hypfront/sel.js

index bcf521e..1ab4d8e 100644 (file)
@@ -20,9 +20,9 @@ def req_pre(req):
     </head>
     <body>
     Selecteer iets en klik de link<br />
-    <button onclick="javascript:f_wie()">Wie</button>
-    <button onclick="javascript:f_wat()">Wat</button>
-    <button onclick="javascript:f_wan()">Wanneer</button>
+    <button style="color:blue" onclick="javascript:f_waar()">Waar</button>
+    <button style="color:green" onclick="javascript:f_wie()">Wie</button>
+    <button style="color:red" onclick="javascript:f_wanneer()">Wanneer</button>
 """)
 
 
index db11dec..c533b6e 100644 (file)
@@ -2,7 +2,8 @@
        <body>
                <form method="get" action="./hyper.py">
                        <table>
-                               <tr><td><p>RSS URL:  </td><td><input type="text" name="url"></td></tr>
+                               <tr><td><p>RSS URL:  </td><td><input type="text" name="url"
+                                               value="localhost/py/paradiso.rss.xml"></td></tr>
                                <tr><td><p>RSS Name: </td><td><input type="text" name="name"></td></tr>
                                <tr><td><input type="submit" value="Submit"</p>
                        </table>
index 474783d..46ac56c 100644 (file)
@@ -1,3 +1,3 @@
 sudo rm -v /var/www/py/*
-sudo cp -v --preserve ./*.{py,html,js} /var/www/py/
+sudo cp -v --preserve ./*.{xml,py,html,js} /var/www/py/
 #sudo chown -vR www-data:www-data /var/www/py
diff --git a/program/hypfront/paradiso.rss.xml b/program/hypfront/paradiso.rss.xml
new file mode 100644 (file)
index 0000000..17b9171
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" ?>\r
+<rss version="2.0">\r
+                                               <channel>
+       <title>Nieuw in de voorverkoop Paradiso</title>
+       <link>http://www.paradiso.nl/web/show/id=178182</link>
+       <description></description>
+                       <item>
+                               <title>zaterdag 31 mei 2014  - Lentekabinet Festival Afterparty   -   Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Lentekabinet-Festival-Afterparty-Locatie-Tolhuistuin-zaal.htm</link>
+                               <description></description>
+                                       <pubDate>wo, 07 mei 2014 14:46:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 4 juli 2014 20:30 - The Crimson Projekct   -   Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/The-Crimson-Projekct-Locatie-Tolhuistuin-zaal.htm</link>
+                               <description>Muziek rond King Crimson</description>
+                                       <pubDate>wo, 07 mei 2014 12:13:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>dinsdag 10 juni 2014 20:30 - Het Ultieme Natuurkunde Feestje – keynote Amanda Gefter</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Het-Ultieme-Natuurkunde-Feestje-keynote-Amanda-Gefter.htm</link>
+                               <description></description>
+                                       <pubDate>wo, 07 mei 2014 12:09:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>dinsdag 12 augustus 2014 21:00 - Kevin Drew - Locatie: Bitterzoet</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Kevin-Drew-Locatie-Bitterzoet.htm</link>
+                               <description>mede-oprichter Broken Social Scene solo</description>
+                                       <pubDate>wo, 07 mei 2014 12:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 4 juli 2014 22:00 - Palenke Soultribe</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Palenke-Soultribe.htm</link>
+                               <description>Electronische muziek en Afro-Colombiaanse ritmes</description>
+                                       <pubDate>wo, 07 mei 2014 10:12:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>maandag 3 november 2014 20:15 - Eefje de Visser: Waterwereldsteden - Locatie: Het Concertgebouw</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Eefje-de-Visser-Waterwereldsteden-Locatie-Het-Concertgebouw.htm</link>
+                               <description></description>
+                                       <pubDate>wo, 07 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>zaterdag 27 september 2014 20:30 - A Great Big World - Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/A-Great-Big-World-Locatie-Tolhuistuin-zaal-1.htm</link>
+                               <description>Hitschrijvers uit New York</description>
+                                       <pubDate>di, 06 mei 2014 12:54:52 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>zaterdag 7 juni 2014 23:00 - Benefietavond Marokkaanse Boot</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Benefietavond-Marokkaanse-Boot.htm</link>
+                               <description>Van Amsterdam naar Tanger</description>
+                                       <pubDate>di, 06 mei 2014 12:37:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 13 november 2014 19:30 - Wouter Hamel</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Wouter-Hamel-6.htm</link>
+                               <description>Sprankelende jazzy pop</description>
+                                       <pubDate>di, 06 mei 2014 11:32:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 13 juni 2014 00:00 - Legends</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Legends-30.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 10:37:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 20 juni 2014 20:30 - Typhoon   -   Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Typhoon-Locatie-Tolhuistuin-zaal.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 10:06:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>maandag 30 juni 2014 20:30 - Raphael Gualazzi       -   Locatie: People’s Place</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Raphael-Gualazzi-Locatie-Peoples-Place.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 09:48:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 3 oktober 2014 19:30 - The Antlers</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/The-Antlers-1.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>woensdag 6 augustus 2014 20:30 - Al Stewart</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Al-Stewart-1.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 10:28:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 26 juni 2014 23:30 - Dondergrondse: Fuck Forever band night</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Dondergrondse-Fuck-Forever-band-night.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:05:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 19 juni 2014 23:30 - Dondergrondse</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Dondergrondse-18.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:02:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>zaterdag 7 juni 2014 20:00 - Kina Grannis</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Kina-Grannis-1.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 3 oktober 2014 19:30 - Jay Brannan</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Jay-Brannan.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 12 juni 2014 23:30 - Dondergrondse: hosted by The Daily Indie – Live: The Future’s Dust</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Dondergrondse-hosted-by-The-Daily-Indie-Live-The-Futures-Dust.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 07:39:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>woensdag 23 juli 2014 20:00 - Blitz Kids</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Blitz-Kids.htm</link>
+                               <description></description>
+                                       <pubDate>vr, 02 mei 2014 13:00:00 GMT</pubDate>
+                       </item>
+</channel>\r
+</rss>
\ No newline at end of file
diff --git a/program/hypfront/rss.xml b/program/hypfront/rss.xml
new file mode 100644 (file)
index 0000000..17b9171
--- /dev/null
@@ -0,0 +1,128 @@
+<?xml version="1.0" ?>\r
+<rss version="2.0">\r
+                                               <channel>
+       <title>Nieuw in de voorverkoop Paradiso</title>
+       <link>http://www.paradiso.nl/web/show/id=178182</link>
+       <description></description>
+                       <item>
+                               <title>zaterdag 31 mei 2014  - Lentekabinet Festival Afterparty   -   Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Lentekabinet-Festival-Afterparty-Locatie-Tolhuistuin-zaal.htm</link>
+                               <description></description>
+                                       <pubDate>wo, 07 mei 2014 14:46:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 4 juli 2014 20:30 - The Crimson Projekct   -   Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/The-Crimson-Projekct-Locatie-Tolhuistuin-zaal.htm</link>
+                               <description>Muziek rond King Crimson</description>
+                                       <pubDate>wo, 07 mei 2014 12:13:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>dinsdag 10 juni 2014 20:30 - Het Ultieme Natuurkunde Feestje – keynote Amanda Gefter</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Het-Ultieme-Natuurkunde-Feestje-keynote-Amanda-Gefter.htm</link>
+                               <description></description>
+                                       <pubDate>wo, 07 mei 2014 12:09:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>dinsdag 12 augustus 2014 21:00 - Kevin Drew - Locatie: Bitterzoet</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Kevin-Drew-Locatie-Bitterzoet.htm</link>
+                               <description>mede-oprichter Broken Social Scene solo</description>
+                                       <pubDate>wo, 07 mei 2014 12:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 4 juli 2014 22:00 - Palenke Soultribe</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Palenke-Soultribe.htm</link>
+                               <description>Electronische muziek en Afro-Colombiaanse ritmes</description>
+                                       <pubDate>wo, 07 mei 2014 10:12:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>maandag 3 november 2014 20:15 - Eefje de Visser: Waterwereldsteden - Locatie: Het Concertgebouw</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Eefje-de-Visser-Waterwereldsteden-Locatie-Het-Concertgebouw.htm</link>
+                               <description></description>
+                                       <pubDate>wo, 07 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>zaterdag 27 september 2014 20:30 - A Great Big World - Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/A-Great-Big-World-Locatie-Tolhuistuin-zaal-1.htm</link>
+                               <description>Hitschrijvers uit New York</description>
+                                       <pubDate>di, 06 mei 2014 12:54:52 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>zaterdag 7 juni 2014 23:00 - Benefietavond Marokkaanse Boot</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Benefietavond-Marokkaanse-Boot.htm</link>
+                               <description>Van Amsterdam naar Tanger</description>
+                                       <pubDate>di, 06 mei 2014 12:37:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 13 november 2014 19:30 - Wouter Hamel</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Wouter-Hamel-6.htm</link>
+                               <description>Sprankelende jazzy pop</description>
+                                       <pubDate>di, 06 mei 2014 11:32:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 13 juni 2014 00:00 - Legends</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Legends-30.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 10:37:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 20 juni 2014 20:30 - Typhoon   -   Locatie: Tolhuistuin (zaal)</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Typhoon-Locatie-Tolhuistuin-zaal.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 10:06:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>maandag 30 juni 2014 20:30 - Raphael Gualazzi       -   Locatie: People’s Place</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Raphael-Gualazzi-Locatie-Peoples-Place.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 09:48:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 3 oktober 2014 19:30 - The Antlers</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/The-Antlers-1.htm</link>
+                               <description></description>
+                                       <pubDate>di, 06 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>woensdag 6 augustus 2014 20:30 - Al Stewart</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Al-Stewart-1.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 10:28:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 26 juni 2014 23:30 - Dondergrondse: Fuck Forever band night</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Dondergrondse-Fuck-Forever-band-night.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:05:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 19 juni 2014 23:30 - Dondergrondse</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Dondergrondse-18.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:02:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>zaterdag 7 juni 2014 20:00 - Kina Grannis</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Kina-Grannis-1.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>vrijdag 3 oktober 2014 19:30 - Jay Brannan</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Jay-Brannan.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 08:00:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>donderdag 12 juni 2014 23:30 - Dondergrondse: hosted by The Daily Indie – Live: The Future’s Dust</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Dondergrondse-hosted-by-The-Daily-Indie-Live-The-Futures-Dust.htm</link>
+                               <description></description>
+                                       <pubDate>ma, 05 mei 2014 07:39:00 GMT</pubDate>
+                       </item>
+                       <item>
+                               <title>woensdag 23 juli 2014 20:00 - Blitz Kids</title>
+                               <link>http://www.paradiso.nl/web/Agenda-Item/Blitz-Kids.htm</link>
+                               <description></description>
+                                       <pubDate>vr, 02 mei 2014 13:00:00 GMT</pubDate>
+                       </item>
+</channel>\r
+</rss>
\ No newline at end of file
index 1cd90a7..416c23e 100644 (file)
@@ -17,34 +17,28 @@ function getSelectionHtml() {
        return html;
 }
 
-function stylizeHighlightedString() 
+function stylizeHighlightedString(col
 {
-    var range               = window.getSelection().getRangeAt(0);
-    var selectionContents   = range.extractContents();
-    var span                = document.createElement("span");
+    var range = window.getSelection().getRangeAt(0);
+    var selectionContents = range.extractContents();
+    var span = document.createElement("span");
     span.appendChild(selectionContents);
     span.setAttribute("class","uiWebviewHighlight");
-
-    span.style.backgroundColor  = "red";
-    span.style.color            = "white";
-
+    span.style.backgroundColor = col;
+    span.style.color = "white";
     range.insertNode(span);
 }
 
-function f_wan() {
-       console.log("wanneer")
-       console.log(getSelectionHtml());
-       stylizeHighlightedString()
+function f_wanneer() {
+       stylizeHighlightedString("red")
 }
 
 function f_wie() {
-       console.log("wie")
-       console.log(getSelectionHtml());
+       stylizeHighlightedString("green")
 }
 
-function f_wat() {
-       console.log("wat")
-       console.log(getSelectionHtml());
+function f_waar() {
+       stylizeHighlightedString("blue")
 }