mirror of https://github.com/KLayout/klayout.git
Enhanced user doc (css, title)
This commit is contained in:
parent
15518c3984
commit
ea31e76c92
|
|
@ -8,7 +8,7 @@ node("master") {
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("Producing doc") {
|
stage("Producing doc") {
|
||||||
sh "./scripts/extract_user_doc.sh"
|
sh "./scripts/extract_user_doc.sh -i " + BRANCH_NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("Publish doc") {
|
stage("Publish doc") {
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,200 @@ def xml2html(t)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
title = "KLayout "
|
||||||
|
title += (ENV["KLAYOUT_VERSION"] || "$version") + " "
|
||||||
|
title += "("
|
||||||
|
title += (ENV["KLAYOUT_VERSION_DATE"] || "$date") + " "
|
||||||
|
title += (ENV["KLAYOUT_VERSION_REV"] || "$rev")
|
||||||
|
title += ") "
|
||||||
|
title += ($target_info && $target_info != "" ? "[#{$target_info}] " : "")
|
||||||
|
|
||||||
|
HEADER=<<"END"
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<title>KLayout Documentation</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="format.css"/>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
body,p,h1,h2,h3,h4,li,ul,td,div,span {
|
||||||
|
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
tt,pre {
|
||||||
|
font-family: Lucidatypewriter, Andale Mono, Courier, monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
tt {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus {
|
||||||
|
outline: none;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #378eb2;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #378eb2;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.img-link:hover {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.img-link img {
|
||||||
|
border-color: #378eb2;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.img-link:hover img {
|
||||||
|
border-color: #378eb2;
|
||||||
|
padding: 0px;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #378eb2;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
body,p,ul,ol,td,li {
|
||||||
|
font-size: 11pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
large {
|
||||||
|
font-size: 16pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 8pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
p,img,h4,h3 {
|
||||||
|
margin-top: 7pt;
|
||||||
|
margin-bottom: 7pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,tt {
|
||||||
|
font-size: 11pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.body {
|
||||||
|
table-layout: fixed;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.content {
|
||||||
|
background-color: white;
|
||||||
|
vertical-align: top;
|
||||||
|
padding: 0.5cm;
|
||||||
|
position: absolute;
|
||||||
|
margin: 0;
|
||||||
|
left: 220px;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
overflow: auto;
|
||||||
|
color: #303030;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.text {
|
||||||
|
margin-left: 5mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.text {
|
||||||
|
padding: 2mm;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.img-link,img.img-link:hover {
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #fff8c0;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.img-overview,img.img-overview:hover {
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #fff8c0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.img-title,p.img-title {
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-bottom-color: black;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.img-subscript,p.img-subscript {
|
||||||
|
font-size: 11pt;
|
||||||
|
color: black;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-family: Impact, Charcoal, sans-serif;
|
||||||
|
color: #b2844f;
|
||||||
|
padding-right: 0.5cm;
|
||||||
|
padding-top: 1mm;
|
||||||
|
padding-bottom: 1mm;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 32pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-family: Palatino Linotype, Book Antiqua;
|
||||||
|
border-bottom-width: 0.25mm;
|
||||||
|
border-bottom-color: #b2844f;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
padding-top: 3mm;
|
||||||
|
padding-bottom: 1mm;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 18pt;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-family: Palatino Linotype, Book Antiqua;
|
||||||
|
padding-top: 2mm;
|
||||||
|
padding-bottom: 1mm;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
padding-top: 2mm;
|
||||||
|
padding-bottom: 1mm;
|
||||||
|
margin-bottom: 0mm;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 11pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<small>#{title}</small>
|
||||||
|
END
|
||||||
|
|
||||||
|
TAIL=<<"END"
|
||||||
|
</body>
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
hs = RBA::HelpSource.new
|
hs = RBA::HelpSource.new
|
||||||
|
|
||||||
|
|
@ -34,7 +228,7 @@ hs.urls.each do |url|
|
||||||
fn = ($target_doc + url).sub(/\.xml$/, ".html")
|
fn = ($target_doc + url).sub(/\.xml$/, ".html")
|
||||||
|
|
||||||
t = hs.get(url)
|
t = hs.get(url)
|
||||||
t = xml2html(t)
|
t = HEADER + xml2html(t) + TAIL
|
||||||
|
|
||||||
tt = nil
|
tt = nil
|
||||||
if File.exists?(fn)
|
if File.exists?(fn)
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,17 @@ src=""
|
||||||
|
|
||||||
self=$(realpath $(which $0))
|
self=$(realpath $(which $0))
|
||||||
inst_dir=$(dirname $self)
|
inst_dir=$(dirname $self)
|
||||||
|
info=""
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
a="$1"
|
a="$1"
|
||||||
shift
|
shift
|
||||||
if [ "$a" = "-h" ]; then
|
if [ "$a" = "-h" ]; then
|
||||||
echo "extract_user_doc.sh"
|
echo "./scripts/extract_user_doc -i <branch-info>"
|
||||||
echo " ./scripts/extract_user_doc"
|
|
||||||
exit 1
|
exit 1
|
||||||
|
elif [ "$a" = "-i" ]; then
|
||||||
|
info="$1"
|
||||||
|
shift
|
||||||
else
|
else
|
||||||
echo "invalid option $a"
|
echo "invalid option $a"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -20,6 +23,7 @@ while [ "$1" != "" ]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
doc_src=./src/lay/lay/doc
|
doc_src=./src/lay/lay/doc
|
||||||
|
. ./version.sh
|
||||||
|
|
||||||
for qt in 5 4; do
|
for qt in 5 4; do
|
||||||
|
|
||||||
|
|
@ -50,7 +54,7 @@ for qt in 5 4; do
|
||||||
export KLAYOUT_HOME=$bin
|
export KLAYOUT_HOME=$bin
|
||||||
|
|
||||||
rm -f $bin/help-index.xml
|
rm -f $bin/help-index.xml
|
||||||
$bin/klayout -rx -b -rd "target_doc=$target_doc" -rd "qt=$qt" -r $inst_dir/extract_user_doc.rb
|
$bin/klayout -rx -b -rd "target_doc=$target_doc" -rd "target_info=$info" -rd "qt=$qt" -r $inst_dir/extract_user_doc.rb
|
||||||
|
|
||||||
# just big:
|
# just big:
|
||||||
# mv $bin/help-index.xml $target_doc/help-index.data
|
# mv $bin/help-index.xml $target_doc/help-index.data
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue