Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Claudia
fsr-bioinfo-website
Commits
84461f60
Commit
84461f60
authored
Dec 05, 2018
by
Claudia
Browse files
quickfix
parent
2ed72ed2
Pipeline
#373
failed with stages
in 1 minute and 42 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
84461f60
...
...
@@ -5,5 +5,7 @@ You wanna change something on the website?
2.
Look at the result in
`output/`
3.
Finally upload content of
`output`
to website.
Tipp: run
`python build-jinja2-html.py -h`
Beware: the templates are no valid html documents!
build-jinja2-html.py
View file @
84461f60
...
...
@@ -23,7 +23,7 @@ args = parser.parse_args() ## show values ##
if
args
.
output
is
None
:
args
.
output
=
"output"
print
(
"Input-Ordner: %s"
%
args
.
templates
)
print
(
"
Root
: %s"
%
args
.
root
)
print
(
"
Base template
: %s"
%
args
.
root
)
print
(
"Output-Ordner: %s"
%
args
.
output
)
print
(
"StET: %s"
%
args
.
stet
)
#print ("Termin: %s" % args.zeit )
...
...
@@ -48,10 +48,10 @@ def print_html_doc(outer_template, content_template):
def
create_website
(
current_content_file
):
nameparts
=
current_content_file
.
split
(
"-"
)
a_file
=
open
(
args
.
output
+
nameparts
[
len
(
nameparts
)
-
1
],
"w"
)
a_file
.
write
(
"<!-- This file was generated: please
read README.md!
-->"
)
a_file
.
write
(
"<!-- This file was generated: please
check https://gitlab.bau-ha.us/Miau/fsr-bioinfo-website
-->"
)
a_file
.
write
(
print_html_doc
(
args
.
root
,
current_content_file
))
print
(
"Created %s"
%
a_file
.
name
)
if
__name__
==
'__main__'
:
for
current_content_file
in
glob
.
glob
(
args
.
templates
+
"*.html"
):
print
current_content_file
create_website
(
current_content_file
)
output/index.html
View file @
84461f60
<!-- This file was generated: please
read README.md!
-->
<!DOCTYPE html>
<!-- This file was generated: please
check https://gitlab.bau-ha.us/Miau/fsr-bioinfo-website
-->
<!DOCTYPE html>
<html
lang=
"de"
>
<head>
<meta
charset=
"utf-8"
>
...
...
output/schueler.html
View file @
84461f60
<!-- This file was generated: please
read README.md!
-->
<!DOCTYPE html>
<!-- This file was generated: please
check https://gitlab.bau-ha.us/Miau/fsr-bioinfo-website
-->
<!DOCTYPE html>
<html
lang=
"de"
>
<head>
<meta
charset=
"utf-8"
>
...
...
output/student.html
View file @
84461f60
<!-- This file was generated: please
read README.md!
-->
<!DOCTYPE html>
<!-- This file was generated: please
check https://gitlab.bau-ha.us/Miau/fsr-bioinfo-website
-->
<!DOCTYPE html>
<html
lang=
"de"
>
<head>
<meta
charset=
"utf-8"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment