diff options
author | Pjotr Prins | 2020-05-24 10:31:24 -0500 |
---|---|---|
committer | Pjotr Prins | 2020-05-24 10:31:24 -0500 |
commit | c3bbd48601cdb4bec510db72bd2296724874f4f3 (patch) | |
tree | b61ca5b473cc30aa971264994697c70c06f20c56 /bh20simplewebuploader/main.py | |
parent | a3c37de9105a784a8f73d3925269c847108baa17 (diff) | |
download | bh20-seq-resource-c3bbd48601cdb4bec510db72bd2296724874f4f3.tar.gz bh20-seq-resource-c3bbd48601cdb4bec510db72bd2296724874f4f3.tar.lz bh20-seq-resource-c3bbd48601cdb4bec510db72bd2296724874f4f3.zip |
Display About/FAQ
Diffstat (limited to 'bh20simplewebuploader/main.py')
-rw-r--r-- | bh20simplewebuploader/main.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index a30d350..eb9a0f5 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -428,7 +428,19 @@ def blog_page(): @app.route('/about') def about_page(): - return render_template('about.html',menu='ABOUT') + buf = "" + in_body = False + begin_body = re.compile(r"<body>",re.IGNORECASE) + end_body = re.compile(r"(</body>|.*=\"postamble\")",re.IGNORECASE) + with open('doc/web/about.html') as f: + for line in f: + if end_body.match(line): + break + if in_body: + buf += line + elif begin_body.match(line): + in_body = True + return render_template('about.html',menu='ABOUT',embed=buf) ## Dynamic API functions starting here ## This is quick and dirty for now, just to get something out and demonstrate the queries |