Skip to content

Commit

Permalink
Put all of the styles into the html file
Browse files Browse the repository at this point in the history
  • Loading branch information
jimsch committed Sep 19, 2016
1 parent 1b7a572 commit df2fb9c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,8 @@ include lib/main.mk
lib/main.mk:
git submodule update --init

drafts_html := $(drafts_html) im.html

im.html:
python check/check.py --html --output im.html draft-ietf-sacm-information-model.xml

impages: $(GHPAGES_TMP) im.html
cp im.html $(GHPAGES_TMP)
cp -r css/* $(GHPAGES_TMP)
ls -R $(GHPAGES_TMP)

ghpages: im.html

24 changes: 20 additions & 4 deletions check/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,21 @@ def main():
print("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en-us'>", file=fout)
print("<head>", file=fout)
print("<title>SACM Information Model</title>", file=fout)
print("<script type='text/javascript' src='css/jquery.js'></script>", file=fout)
print("<script type='text/javascript' src='css/tablesorter.min.js'></script>", file=fout)
print("<script type='text/javascript'>", file=fout)
CopyFile('css/jquery.js', fout)
print("</script>", file=fout)
print("<script type='text/javascript'>", file=fout)
CopyFile('css/tablesorter.min.js', fout)
print("</script>", file=fout)
print("<script type='text/javascript'>", file=fout)
print("$(document).ready(function(){ $('#myTable').tablesorter();});", file=fout)
print("</script>", file=fout)
print("<link rel='stylesheet' href='css/jq.css' type='text/css'/>", file=fout)
print("<link rel='stylesheet' href='css/style.css' type='text/css'/>", file=fout)
# print("<style>", file=fout)
# CopyFile('css/jq.css', fout)
# print("</script>", file=fout)
print("<style>", file=fout)
CopyFile('css/style.css', fout)
print("</style>", file=fout)
print("</head>", file=fout)
print("<body>", file=fout)
print("<table id='myTable' class='tablesorter'>", file=fout)
Expand Down Expand Up @@ -477,6 +485,14 @@ def main():
print("</tbody>", file=fout)
print("</body>", file=fout)

def CopyFile(fileName, fileOut):
fin = open(fileName,"r");
lines = fin.readlines()
for line in lines:
print(line, file=fileOut)
fin.close()


def PrintError(node, text):
if node == None:
print("Error: " + text, file=sys.stderr)
Expand Down

0 comments on commit df2fb9c

Please sign in to comment.