We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ac0498 commit 7a2c6e9Copy full SHA for 7a2c6e9
1 file changed
odml/scripts/odml_view.py
@@ -16,11 +16,26 @@
16
import http.server as hs
17
import socketserver
18
import sys
19
+import urllib.request as urllib2
20
import webbrowser
21
22
from docopt import docopt
23
24
PORT = 8000
25
+REPOSITORY = "https://templates.g-node.org/_resources/"
26
+STYLESHEET = "odmlTerms.xsl"
27
+
28
29
+def fetch_stylesheet():
30
+ try:
31
+ data = urllib2.urlopen("%s%s" % (REPOSITORY, STYLESHEET)).read()
32
+ data = data.decode("utf-8")
33
+ except Exception as e:
34
+ print("failed loading '%s%s': %s" % (REPOSITORY, STYLESHEET, e))
35
+ return
36
37
+ with open(STYLESHEET, "w") as fp:
38
+ fp.write(str(data))
39
40
41
def run(port=PORT):
0 commit comments