Commit 102f1acf authored by Carsten Eie Frigaard's avatar Carsten Eie Frigaard
Browse files

update

parent 4813eb33
PYCOURSE=mk_course.py PYCOURSE=mk_course.py
all: all:
$(PYCOURSE) -v $(PYCOURSE) -v -o ../Html/
edit: edit:
joe $(PYCOURSE) joe $(PYCOURSE)
sync: sync:
scp L??.html si:Itmal_E21/ cd .. && scp -r Html si:ITMAL_E21/
ssh si "cd Itmal_E21 && git pull" ssh si "cd ITMAL_E21 && git pull"
clean: clean:
@ rm -f out.html L??.html @ rm -f out.html L??.html
......
COURSE COURSE
LESSON L01 LESSON L0X
\h5{Formål} \h5{Formål}
...@@ -19,7 +19,7 @@ derfor til sidst på Scikit-learns Pipelines. ...@@ -19,7 +19,7 @@ derfor til sidst på Scikit-learns Pipelines.
\li{næste item} \li{næste item}
} }
LESSON L02 LESSON L01
\h1{Introduktion} \h1{Introduktion}
...@@ -132,12 +132,12 @@ kick-start.} ...@@ -132,12 +132,12 @@ kick-start.}
\h5{Slides} \h5{Slides}
\px{ \px{
\link{lesso01.pdf,[ITU]/L01.pdf} \link{,[GITMAL]/L01/lesson01.pdf}
} }
REFS REFS
[ITU]http://itundervisning [ITU] https://itundervisning.ase.au.dk/ITMAL_E21/Html
[2] sfd zdf [GITMAL] https://itundervisning.ase.au.dk/ITMAL_E21
END END
......
...@@ -78,7 +78,24 @@ if __name__ == '__main__': ...@@ -78,7 +78,24 @@ if __name__ == '__main__':
elif c=="link": elif c=="link":
args = a.split(",") args = a.split(",")
assert len(args)==2 assert len(args)==2
v = f"{left}span style='font-family: courier new, courier;'{right}{left}a href='{args[1]}'{right}{args[0]}{left}/a{right}{left}/span{right}"
arg0 = isStr(args[0])
arg1 = isStr(args[1])
if len(arg1)==0:
ERR("need second link argument, currently empty")
if len(arg0)==0:
n = arg1.rfind('/')
if n<=0:
ERR(f"if first argument to link is empty, second arg='{arg1}' must contain at least one slash '/'")
arg0 = arg1[n+1:]
if len(arg0)==0:
ERR("second arg still empty, this was not expected")
v = f"{left}span style='font-family: courier new, courier;'{right}{left}a href='{arg1}'{right}{arg0}{left}/a{right}{left}/span{right}"
elif c=="px": elif c=="px":
c = "p" c = "p"
v = f"{left}{c} style='margin-left: 30px'{right}{a}{left}/{c}{right}" v = f"{left}{c} style='margin-left: 30px'{right}{a}{left}/{c}{right}"
...@@ -251,9 +268,8 @@ if __name__ == '__main__': ...@@ -251,9 +268,8 @@ if __name__ == '__main__':
assert isStr(htmlcontent).find("DOCTYPE")<0 and htmlcontent.find("<html>")<=0 and htmlcontent.find("<body>")<=0 assert isStr(htmlcontent).find("DOCTYPE")<0 and htmlcontent.find("<html>")<=0 and htmlcontent.find("<body>")<=0
#bodystyle = "style='font-family: Verdana;font-size: 12pt;color: #494c4e;'" #bodystyle = "style='font-family: Verdana;font-size: 12pt;color: #494c4e;'"
bodystyle = "style='font-family: times new roman, times, serif;font-size: 13pt;color: #424222;'" bodystyle = "style='font-family: times new roman, times, serif;font-size: 13pt;color: #424222;'"
return f"<!DOCTYPE html>\n<html>\n<body {bodystyle}>\n" + htmlcontent + "\n</body>\n</html>" meta = "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>"
return f"<!DOCTYPE html>\n<html>\n{meta}\n<body {bodystyle}>\n" + htmlcontent + "\n</body>\n</html>"
for i in htmlstructure: for i in htmlstructure:
assert isStr(i).find("LESSON")==0 assert isStr(i).find("LESSON")==0
......
Supports Markdown
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