Commit f8a279c9 authored by Jorge S. Mendes de Jesus's avatar Jorge S. Mendes de Jesus
Browse files

update documentation

parent 9d5deebe
/.pydevproject
/.project
/.settings/
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.8</pydev_property>
</pydev_project>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="www"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="AfricaTour">
<wb-resource deploy-path="/" source-path="/www"/>
<property name="context-root" value="AfricaTour"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.web"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="wst.web" version="1.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
FROM python:2.7
FROM python:3.8.4-alpine3.11
COPY ./server.py /opt/leuven/server.py
COPY ./www /opt/leuven/www
......
Intro
-----
Generic instructions and documentation concerning the Leuven virtual tour
- [http://leuven.isric.org/](http://leuven.isric.org/)
- [https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html](https://ees.kuleuven.be/africa-in-profile/virtuele-tentoonstelling/index.html)
Deployment
----------
Tour is run from OC, project leuven:
```
oc project leuven
docker build -t docker-registry.wur.nl/isric/leuven/leuven-v0-2:latest .
docker push docker-registry.wur.nl/isric/leuven/leuven-v0-2:latest
oc import-image leuven-v0-2
```
Google tour key
---------------
The google tour key is associated to the `worlsoilmuseum@gmail.com`
```
key=AIzaSyBNjBofeB7ALxZAN0oTSEOJwQfYvzQfl8w
```
The key is used on `index.html` around line 30:
```javascirpt
<script>
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBNjBofeB7ALxZAN0oTSEOJwQfYvzQfl8w&callback=initTour";
$("head").append(s);
</script>
```
Google tour medatainfo
----------------------
Development Notes
-----------------
Hierbij de files voor de virtuele tour
De bestanden staan geordend zoals ze op mijn machine werken
......@@ -18,3 +65,4 @@ De gebruikte video’s staan in de folder www/assets/video.
De foto’s van de objecten in de vitrinekasten en de foto’s van de panelen staan in www/images.
#!/usr/bin/python3
""" Script to server the page independent """
import sys,os
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
from socket import socket, SOCK_DGRAM,AF_INET
HandlerClass = SimpleHTTPRequestHandler
ServerClass = BaseHTTPServer.HTTPServer
Protocol = "HTTP/1.0"
SubFolder= "www"
port = 80 # For testing change to another port
import os
import http.server
import socketserver
def getIP():
"""Determines the current IP inside the WUR network."""
s=socket(AF_INET,SOCK_DGRAM)
s.connect(("216.58.209.164",0)) #google.com
try:
return s.getsockname()[0]
except:
return "127.0.0.1"
SubFolder = "www"
ip = "0.0.0.0"
port = 80 # For testing change to another port (you can only bind to port 80 as root)
os.chdir(os.path.join(os.path.abspath(os.curdir),SubFolder))
server_address = (getIP(), port)
HandlerClass.protocol_version = Protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.serve_forever()
\ No newline at end of file
server_address = (ip, port)
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(server_address, Handler) as httpd:
print(f"serving at: {ip}:{port}")
httpd.serve_forever()
......@@ -26,10 +26,10 @@
<script type="text/javascript" src="assets/js/tour.js"></script> <!-- this js contains the initTour -->
<script >
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBNjBofeB7ALxZAN0oTSEOJwQfYvzQfl8w&sensor=false&callback=initTour";
s.typet = "text/javascript";
s.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBNjBofeB7ALxZAN0oTSEOJwQfYvzQfl8w&callback=initTour";
$("head").append(s);
</script>
</script>
</html>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment