add food skript

This commit is contained in:
Götz 2017-09-23 15:28:38 +02:00
parent 6df81d2e29
commit e1442feb67
21 changed files with 14061 additions and 0 deletions

1353
bootstrap-4.0.0-beta-dist/css/bootstrap-grid.css vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,330 @@
html {
box-sizing: border-box;
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: transparent;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
@-ms-viewport {
width: device-width;
}
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
font-size: 1rem;
font-weight: normal;
line-height: 1.5;
color: #212529;
background-color: #fff;
}
[tabindex="-1"]:focus {
outline: none !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: .5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
dfn {
font-style: italic;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]):not([tabindex]) {
color: inherit;
text-decoration: none;
}
a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover {
color: inherit;
text-decoration: none;
}
a:not([href]):not([tabindex]):focus {
outline: 0;
}
pre,
code,
kbd,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
border-style: none;
}
svg:not(:root) {
overflow: hidden;
}
a,
area,
button,
[role="button"],
input,
label,
select,
summary,
textarea {
-ms-touch-action: manipulation;
touch-action: manipulation;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #868e96;
text-align: left;
caption-side: bottom;
}
th {
text-align: left;
}
label {
display: inline-block;
margin-bottom: .5rem;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html [type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
html{box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{box-sizing:inherit}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

8185
bootstrap-4.0.0-beta-dist/css/bootstrap.css vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3831
bootstrap-4.0.0-beta-dist/js/bootstrap.js vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

10
ofu-food.html Normal file
View File

@ -0,0 +1,10 @@
<!doctype html><html lang="de"><head><meta charset="utf-8"><meta name="description" content="Sammelwebsite für das Essen der Uni Bamberg"><meta name="keywords" content="OFU, Otto-Friedrich, Universität, Bamberg"><link rel="stylesheet" href="bootstrap.css"><title>Essen an der OFU</title></head><body><p>Last execute: 23.09.2017</p><div class="container"><h2>Cafeteria Erba-Insel</h2><p class="bodytext">24.07. Rinderhacksteak an Cognacsoße und Spätzle<br/>25.07.  Gemüseschnitzel mit Kräutercreme und Kartoffeln<br/>26.07.  Penne-Nudeln mit Hackfleischsoße<br/>27.07.  Kaiserschmarrn mit Apfelmus</p><h2>Cafeteria Markusplatz</h2><p class="bodytext">24.07.  Vegetarisches Chili sin Carne<br/>25.07.  Gemüseschnitzel mit Kräutercreme und Kartoffeln<br/>26.07.  Überbackene Zucchini an Paprikasoße mit Püree<br/>27.07.  Kaiserschmarrn mit Apfelmus</p><div><h2>Mensa Austraße</h2><h5>Montag 18.09.</h5><div class="title">Rindergeschnetzeltes "Provencial"</div><a href="https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=2&amp;tx_thmensamenu_pi2%5Baction%5D=show&amp;tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&amp;cHash=511e047953ee1370c3b82c11a04624bb#toggle">Zusatzstoffe / Allergene &amp; sonstige Informationen</a><div class="title">Pizza "Speciale"</div><a href="https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=2&amp;tx_thmensamenu_pi2%5Baction%5D=show&amp;tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&amp;cHash=511e047953ee1370c3b82c11a04624bb#toggle">Zusatzstoffe / Allergene &amp; sonstige Informationen</a><div class="title">Gebackene Kartoffeltaschen "Kräuterfrischkäse" an Salatgarnitur</div><a href="https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=2&amp;tx_thmensamenu_pi2%5Baction%5D=show&amp;tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&amp;cHash=511e047953ee1370c3b82c11a04624bb#toggle">Zusatzstoffe / Allergene &amp; sonstige Informationen</a></div><div><h2>Feki Mensa</h2><h5>Montag 18.09.</h5><div class="title">Rindergeschnetzeltes "Provencial"</div><a href="https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=3&amp;tx_thmensamenu_pi2%5Baction%5D=show&amp;tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&amp;cHash=c3fe5ebb35e5fba3794f01878e798b7c#toggle">Zusatzstoffe / Allergene &amp; sonstige Informationen</a><div class="title">Schwarzer Heilbutt an Krebsrahmsoße</div><a href="https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=3&amp;tx_thmensamenu_pi2%5Baction%5D=show&amp;tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&amp;cHash=c3fe5ebb35e5fba3794f01878e798b7c#toggle">Zusatzstoffe / Allergene &amp; sonstige Informationen</a><div class="title">Pizza "Speciale"</div><a href="https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=3&amp;tx_thmensamenu_pi2%5Baction%5D=show&amp;tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&amp;cHash=c3fe5ebb35e5fba3794f01878e798b7c#toggle">Zusatzstoffe / Allergene &amp; sonstige Informationen</a><div class="title">Gebackene Kartoffeltaschen "Kräuterfrischkäse" an Salatgarnitur</div><a href="https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=3&amp;tx_thmensamenu_pi2%5Baction%5D=show&amp;tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&amp;cHash=c3fe5ebb35e5fba3794f01878e798b7c#toggle">Zusatzstoffe / Allergene &amp; sonstige Informationen</a></div><h2>Feki.de Happy Hour Guide</h2><div class="tab-pane" id="food" role="tabpanel">
<h2>Aktuelle HappyHours</h2>
<table class="table">
</table>
<p>Leider sind gerade keine HappyHours :( </p>
<h2>Kommende HappyHours</h2>
<table class="table">
</table>
<p>Leider kommen keine HappyHours mehr :( </p>
</div></div></body></html>

View File

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="useProjectProfile" value="false" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
ofu-food/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5.3 (/usr/bin/python3.5)" project-jdk-type="Python SDK" />
</project>

8
ofu-food/.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ofu-food.iml" filepath="$PROJECT_DIR$/.idea/ofu-food.iml" />
</modules>
</component>
</project>

11
ofu-food/.idea/ofu-food.iml generated Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>

155
ofu-food/.idea/workspace.xml generated Normal file
View File

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9425633f-e857-40f1-8ce2-44554cae0276" name="Default" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="ofu-food.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/ofu-food.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2860">
<caret line="143" column="29" lean-forward="false" selection-start-line="143" selection-start-column="29" selection-end-line="143" selection-end-column="29" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/ofu-food.py" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="27" />
<option name="width" value="1920" />
<option name="height" value="1053" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="ofu-food" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="ofu-food" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="9425633f-e857-40f1-8ce2-44554cae0276" name="Default" comment="" />
<created>1506172952943</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1506172952943</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="27" width="1920" height="1053" extended-state="7" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/ofu-food.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2860">
<caret line="143" column="29" lean-forward="false" selection-start-line="143" selection-start-column="29" selection-end-line="143" selection-end-column="29" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

144
ofu-food/ofu-food.py Normal file
View File

@ -0,0 +1,144 @@
import requests
from bs4 import BeautifulSoup
import urllib
import datetime
from shutil import copyfile
OUTPUTFILE = "../ofu-food.html"
# OUTPUTFILE = "/media/data_1/www/html/ofu-food.html"
CSSFILE_SRC = "../bootstrap-4.0.0-beta-dist/css/bootstrap.css"
CSSFILE = "bootstrap.css"
LINK_FEKI_MENSA = "https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=3&tx_thmensamenu_pi2%5Baction%5D=show&tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&cHash=c3fe5ebb35e5fba3794f01878e798b7c"
LINK_AUSTR_MENSA = "https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/speiseplaene.html?tx_thmensamenu_pi2%5Bmensen%5D=2&tx_thmensamenu_pi2%5Baction%5D=show&tx_thmensamenu_pi2%5Bcontroller%5D=Speiseplan&cHash=511e047953ee1370c3b82c11a04624bb"
LINK_ERBA_CAFETE = "https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/sonderspeiseplaene/cafeteria-erba-insel.html"
LINK_MARKUS_CAFETE = "https://www.studentenwerk-wuerzburg.de/bamberg/essen-trinken/sonderspeiseplaene/cafeteria-markusplatz.html"
LINK_FEKIDE_GUIDE = "https://www.feki.de/happyhour"
def getHtmlHeader():
head = '<head>'
head += '<meta charset="utf-8">'
head += '<meta name="description" content="Sammelwebsite für das Essen der Uni Bamberg">'
head += '<meta name="keywords" content="OFU, Otto-Friedrich, Universität, Bamberg">'
head += '<link rel="stylesheet" href="' + CSSFILE + '">'
head += '<title>Essen an der OFU</title>'
head += '</head>'
return head
def getExecuteTime():
return "<p>Last execute: " + datetime.datetime.today().strftime("%d.%m.%Y") + "</p>"
def getFoodHtml(erbaHtml, markusHtml, austrHtml, fekiHtml, happyHourHtml):
html = '<!doctype html>'
html += '<html lang="de">'
html += getHtmlHeader()
html += '<body>'
html += getExecuteTime()
html += '<div class="container">'
html += str(erbaHtml)
html += str(markusHtml)
html += str(austrHtml)
html += str(fekiHtml)
html += str(happyHourHtml)
html += '</div>'
html += '</body>'
html += '</html>'
return html
def getFoodDiv(html, divClass):
soup = BeautifulSoup(html, "lxml")
return soup.find("div", {"class": divClass})
def getHappyHourGuideFood(html):
soup = BeautifulSoup(html, "lxml")
return soup.find("div", {"id": "food"})
def getWebPages():
erbaCafete = requests.get(LINK_ERBA_CAFETE).content
markusCafete = requests.get(LINK_MARKUS_CAFETE).content
austrMensa = requests.get(LINK_AUSTR_MENSA).content
fekiMensa = requests.get(LINK_FEKI_MENSA).content
happyHourGuide = requests.get(LINK_FEKIDE_GUIDE).content
return (erbaCafete, markusCafete, austrMensa, fekiMensa, happyHourGuide)
def getSpecificParts():
erbaCafete, markusCafete, austrMensa, fekiMensa, happyHourGuide = getWebPages()
erbaCafeteFood = getFoodDiv(erbaCafete, "csc-default")
markusCafeteFood = getFoodDiv(markusCafete, "csc-default")
austrMensaFood = getFoodDiv(austrMensa, "day")
fekiMensaFood = getFoodDiv(fekiMensa, "day")
happyHourGuideFood = getHappyHourGuideFood(happyHourGuide)
return (erbaCafeteFood, markusCafeteFood, austrMensaFood, fekiMensaFood, happyHourGuideFood)
def writeHtml(html):
with open(OUTPUTFILE, "w") as file:
file.write(html)
def stripCafeteFood(html):
soup = BeautifulSoup(str(html), "lxml")
food = soup.find_all("p", {"class": "bodytext"})
return food[(food.__len__() - 2)]
def htmlErbaCafete(food):
html = '<h2>Cafeteria Erba-Insel</h2>'
html += str(food)
return html
def htmlMarkusCafete(food):
html = '<h2>Cafeteria Markusplatz</h2>'
html += str(food)
return html
def htmlHappyHour(food):
html = '<h2>Feki.de Happy Hour Guide</h2>'
html += str(food)
return html
def getFoodMensa(austrMensaFood, title):
html = '<div>'
html += '<h2>' + title + '</h2>'
soup = BeautifulSoup(str(austrMensaFood), "lxml")
foodDay = soup.find("div", {"class": "day"}).h5
html += str(foodDay)
foods = soup.find_all("article", {"class": "menu"})
for food in foods:
soupSingleFood = BeautifulSoup(str(food), "lxml")
singleFood = soupSingleFood.find("div", {"class": "title"})
alergenLink = soupSingleFood.find("div", {"class": "additnr"}).a
html += str(singleFood)
html += str(alergenLink)
html += '</div>'
return html
def main():
(erbaCafeteFood, markusCafeteFood, austrMensaFood, fekiMensaFood, happyHourGuideFood) = getSpecificParts()
erbaCafeteFood = stripCafeteFood(erbaCafeteFood)
erbaCafeteFood = htmlErbaCafete(erbaCafeteFood)
markusCafeteFood = stripCafeteFood(markusCafeteFood)
markusCafeteFood = htmlMarkusCafete(markusCafeteFood)
happyHourGuideFood = htmlHappyHour(happyHourGuideFood)
austrMensaFood = getFoodMensa(austrMensaFood, "Mensa Austraße")
fekiMensaFood = getFoodMensa(fekiMensaFood, "Feki Mensa")
html = getFoodHtml(erbaCafeteFood, markusCafeteFood, austrMensaFood, fekiMensaFood, happyHourGuideFood)
writeHtml(html)
main()
copyfile(CSSFILE_SRC, CSSFILE)