* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-03-22 19:46 Brian Evans
0 siblings, 0 replies; 35+ messages in thread
From: Brian Evans @ 2019-03-22 19:46 UTC (permalink / raw
To: gentoo-commits
commit: b6b4d4ed8430f37e3b809096be1ab3d99ce7fe05
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 22 19:45:43 2019 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Mar 22 19:45:43 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b6b4d4ed
Reorder title header of generated pages
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index f97f2c7..65b70f0 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -47,7 +47,7 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5.bz2; do
<!DOCTYPE html><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Gentoo Development Guide: $BASENAME</title>
+ <title>$BASENAME - Gentoo Development Guide</title>
<link rel="stylesheet" href="../../devmanual.css" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="The Gentoo Devmanual is a technical manual which covers topics such as writing ebuilds and eclasses, and policies that developers should be abiding by.">
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-08-25 8:43 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-08-25 8:43 UTC (permalink / raw
To: gentoo-commits
commit: 9df1efd58647227d1371a4089b6ebdee599fdf4d
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 25 08:43:21 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 08:43:21 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=9df1efd5
gen-eclass-html.sh: Consider only manpages for HTML generation.
Closes: https://github.com/gentoo/devmanual.gentoo.org/pull/102
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index db61319..1aa57f6 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -38,6 +38,7 @@ EOF
# We also need the ebuild man page
for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5.bz2; do
BASENAME="$(basename $i .5.bz2)"
+ [[ ${BASENAME} != "${i}" ]] || continue
DIRNAME="${OUTPUTDIR}/${BASENAME}"
TMP="${DIRNAME}/index.html.tmp"
FINAL="${DIRNAME}/index.html"
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-11-07 14:09 Brian Evans
0 siblings, 0 replies; 35+ messages in thread
From: Brian Evans @ 2019-11-07 14:09 UTC (permalink / raw
To: gentoo-commits
commit: 1c4eb888a7745e793e34f34dbc741cb04a70e204
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 7 14:08:42 2019 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Nov 7 14:08:42 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=1c4eb888
bin/gen-eclass-html.sh: Fix BASENAME test
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 1aa57f6..d3b0cf2 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -38,7 +38,7 @@ EOF
# We also need the ebuild man page
for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5.bz2; do
BASENAME="$(basename $i .5.bz2)"
- [[ ${BASENAME} != "${i}" ]] || continue
+ [[ ${BASENAME} != "${i##*/}" ]] || continue
DIRNAME="${OUTPUTDIR}/${BASENAME}"
TMP="${DIRNAME}/index.html.tmp"
FINAL="${DIRNAME}/index.html"
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-11-07 15:06 Brian Evans
0 siblings, 0 replies; 35+ messages in thread
From: Brian Evans @ 2019-11-07 15:06 UTC (permalink / raw
To: gentoo-commits
commit: 6c930dc94691fd01d5d5d5096c8ab92e66a40064
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 7 15:05:10 2019 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Nov 7 15:05:10 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6c930dc9
bin/gen-eclass-html.sh: Work for all common compression methods
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
bin/gen-eclass-html.sh | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index d3b0cf2..8c9c337 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -35,13 +35,28 @@ IFS='' read -r -d '' FOOTER << 'EOF'
</html>
EOF
+guesscompress() {
+ case "$1" in
+ *.gz|*.z) echo "gunzip -c" ;;
+ *.bz2|*.bz) echo "bunzip2 -c" ;;
+ *.lz) echo "lzip -dc" ;;
+ *.lzma) echo "unlzma -c" ;;
+ *.lzo) echo "lzop -dc" ;;
+ *.xz) echo "xzdec" ;;
+ *.zst) echo "zstd -dc" ;;
+ *) echo "cat" ;;
+ esac
+}
+
# We also need the ebuild man page
-for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5.bz2; do
- BASENAME="$(basename $i .5.bz2)"
- [[ ${BASENAME} != "${i##*/}" ]] || continue
+for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
+ FILEBASE=${i##*/}
+ BASENAME="${FILEBASE%.5*}"
+ [[ ${BASENAME} != "${FILEBASE}" ]] || continue
DIRNAME="${OUTPUTDIR}/${BASENAME}"
TMP="${DIRNAME}/index.html.tmp"
FINAL="${DIRNAME}/index.html"
+ DECOMPRESS=$(guesscompress "${i}")
[[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME}
# rebuild the man page each time
cat << EOF > ${FINAL}
@@ -89,7 +104,7 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5.bz2; do
<div class="container">
EOF
# generate html pages and fix hyperlinks for eclass and ebuild man pages
- /bin/bunzip2 -c $i | /usr/bin/man2html -r - | \
+ $DECOMPRESS "$i" | /usr/bin/man2html -r - | \
sed -e "/<A HREF=/s:=.*man.*/\(.*eclass\).*html\">:=../\1/index.html>:" \
-e "/<\/BODY>/d" -e "/<\/HTML>/d" \
-e "/<A HREF=/s:=.*man.*/\(.*ebuild\).*html\">:=../\1/\index.html>:" >> ${TMP}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-09 21:39 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-12-09 21:39 UTC (permalink / raw
To: gentoo-commits
commit: 22859187debae11a52db7051f03965418c04a0d1
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 4 17:29:54 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 8 11:32:05 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=22859187
bin/gen-eclass-html.sh: Fix text.xml output.
We need to generate XML suitable as xsltproc input, not HTML output.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 7293608..9705d04 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -128,7 +128,7 @@ cat << EOF > $OUTPUTDIR/text.xml
<p>
This section provides a reference for some of the more commonly used eclasses.
Note that most eclasses have an accompanying manual page. These man pages can be
-installed by emerging <code class="docutils literal"><span class="pre">app-portage/eclass-manpages</span></code>.
+installed by emerging <c>app-portage/eclass-manpages</c>.
</p>
</body>
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-14 12:01 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-12-14 12:01 UTC (permalink / raw
To: gentoo-commits
commit: 6733a4e881f3fb820cbf6d2745f4c81c6fb0afbc
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 14 11:59:42 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 11:59:42 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6733a4e8
bin/gen-eclass-html.sh: Fix category of eclass-manpages.
The package has been moved to app-doc some time ago.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index e41c3df..8ef226d 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -127,7 +127,7 @@ cat << EOF > $OUTPUTDIR/text.xml
<p>
This section provides a reference for some of the more commonly used eclasses.
Note that most eclasses have an accompanying manual page. These man pages can be
-installed by emerging <c>app-portage/eclass-manpages</c>.
+installed by emerging <c>app-doc/eclass-manpages</c>.
</p>
</body>
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-14 13:19 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-12-14 13:19 UTC (permalink / raw
To: gentoo-commits
commit: b92472808e87a833e42fcbaee24f9ffaac012d66
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 14 13:16:22 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 13:16:22 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b9247280
bin/gen-eclass-html.sh: Eclasses are distributed under GPL-2.
Eclasses and the app-doc/eclass-manpage package are distributed under
the GPL-2 (but not CC-BY-SA). Update license info in footer accordingly.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 8ef226d..22d79da 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -24,7 +24,7 @@ IFS='' read -r -d '' FOOTER << 'EOF'
<strong>Copyright (C) 2001-2019 Gentoo Authors</strong><br><small>
Gentoo is a trademark of the Gentoo Foundation, Inc.
The text of this document is distributed under the
- <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
+ <a href="https://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License, version 2</a>.
The <a href="https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage Guidelines</a> apply.
</small>
</div>
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-15 17:25 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-12-15 17:25 UTC (permalink / raw
To: gentoo-commits
commit: 1a48b2360b0be82bd6f2c828142859235c44a0b3
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 17:21:00 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 17:21:00 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=1a48b236
bin/gen-eclass-html.sh: Fix regexp for link substitution.
The previous regexp was too greedy and combined several links into
one, if they were on the same line.
Remove dead relative links (i.e., not pointing to other eclasses).
Replace the complicated "tail" command by a simple "1,4d" in sed.
This also makes the temporary file unnecessary.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 5ccfc71..b557093 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -98,20 +98,17 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
BASENAME="${FILEBASE%.5*}"
[[ ${BASENAME} != "${FILEBASE}" ]] || continue
DIRNAME="${OUTPUTDIR}/${BASENAME}"
- TMP="${DIRNAME}/index.html.tmp"
FINAL="${DIRNAME}/index.html"
DECOMPRESS=$(guesscompress "${i}")
[[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME}
# rebuild the man page each time
echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
- # generate html pages and fix hyperlinks for eclass and ebuild man pages
- $DECOMPRESS "$i" | /usr/bin/man2html -r - | \
- sed -e "/<A HREF=/s:=.*man.*/\(.*eclass\).*html\">:=../\1/index.html>:" \
- -e "/<\/BODY>/d" -e "/<\/HTML>/d" \
- -e "/<A HREF=/s:=.*man.*/\(.*ebuild\).*html\">:=../\1/\index.html>:" >> ${TMP}
- # The first 4 lines are cruft for devmanual
- tail -n $(($(wc -l ${TMP} | awk '{print $1}') - 4)) ${TMP} >> ${FINAL}
- rm -f ${TMP}
+ # generate html pages and fix hyperlinks for eclass and ebuild man pages
+ ${DECOMPRESS} "${i}" | /usr/bin/man2html -r - \
+ | sed -e "1,4d;/<\/BODY>/d;/<\/HTML>/d" \
+ -e '/<A HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\)\.5\.html":"../\1/index.html":g' \
+ -e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
+ >> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
done
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-15 17:25 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-12-15 17:25 UTC (permalink / raw
To: gentoo-commits
commit: c8db1e8bc7da8bd7e873db5dd8f7718cc3c69908
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 17:10:36 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 17:10:36 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=c8db1e8b
bin/gen-eclass-html.sh: Move header into a variable.
This is only for better readability of the actual code, and doesn't
change functionality.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 92 ++++++++++++++++++++++++++------------------------
1 file changed, 47 insertions(+), 45 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 22d79da..5ccfc71 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -5,6 +5,51 @@
OUTPUTDIR="eclass-reference"
+IFS='' read -r -d '' HEADER << 'EOF'
+<!DOCTYPE html><html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>@TITLE@ - Gentoo Development Guide</title>
+ <link rel="stylesheet" href="../../devmanual.css" type="text/css">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="The Gentoo Devmanual is a technical manual which covers topics such as writing ebuilds and eclasses, and policies that developers should be abiding by.">
+ <link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen">
+ <link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen">
+ <link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon">
+</head>
+<body>
+<header><div class="site-title"><div class="container"><div class="row">
+<div class="site-title-buttons"><div class="btn-group btn-group-sm">
+<a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span><strong> Get Gentoo!</strong></a><div class="btn-group btn-group-sm">
+<a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"><span class="fa fa-fw fa-map-o"></span><span class="hidden-xs"> gentoo.org sites </span><span class="caret"></span></a><ul class="dropdown-menu dropdown-menu-right">
+<li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
+<li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li>
+<li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
+<li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
+<li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
+<li class="divider">
+<li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
+<li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
+<li><a href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
+<li class="divider">
+<li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a></li>
+</ul>
+</div>
+</div></div>
+<div class="logo">
+<a href="/" title="Back to the homepage" class="site-logo"><object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml"><img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo"></object></a><span class="site-label">Development Guide</span>
+</div>
+</div></div></div>
+<nav class="tyrian-navbar" role="navigation"><div class="container"><div class="row">
+<div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button></div>
+<div class="collapse navbar-collapse navbar-main-collapse"><ul class="nav navbar-nav">
+<li><a href="/index.html"><i class="fa fa-home"></i> Home</a></li>
+<li><a href="../index.html"><i class="fa fa-arrow-up"></i> Eclass Reference</a></li>
+</ul></div>
+</div></div></nav></header><div class="container"><div class="row"><div class="col-md010"><ol class="breadcrumb"><li><a href="/index.html">Master Index</a></li><li><a href="../index.html">Eclass Reference</a></li></ol></div></div></div>
+ <div class="container">
+EOF
+
IFS='' read -r -d '' FOOTER << 'EOF'
</div>
<footer><div class="container">
@@ -58,50 +103,7 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
DECOMPRESS=$(guesscompress "${i}")
[[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME}
# rebuild the man page each time
- cat << EOF > ${FINAL}
-<!DOCTYPE html><html lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>$BASENAME - Gentoo Development Guide</title>
- <link rel="stylesheet" href="../../devmanual.css" type="text/css">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="The Gentoo Devmanual is a technical manual which covers topics such as writing ebuilds and eclasses, and policies that developers should be abiding by.">
- <link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen">
- <link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen">
- <link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon">
-</head>
-<body>
-<header><div class="site-title"><div class="container"><div class="row">
-<div class="site-title-buttons"><div class="btn-group btn-group-sm">
-<a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span><strong> Get Gentoo!</strong></a><div class="btn-group btn-group-sm">
-<a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"><span class="fa fa-fw fa-map-o"></span><span class="hidden-xs"> gentoo.org sites </span><span class="caret"></span></a><ul class="dropdown-menu dropdown-menu-right">
-<li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
-<li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li>
-<li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
-<li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
-<li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
-<li class="divider">
-<li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
-<li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
-<li><a href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
-<li class="divider">
-<li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a></li>
-</ul>
-</div>
-</div></div>
-<div class="logo">
-<a href="/" title="Back to the homepage" class="site-logo"><object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml"><img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo"></object></a><span class="site-label">Development Guide</span>
-</div>
-</div></div></div>
-<nav class="tyrian-navbar" role="navigation"><div class="container"><div class="row">
-<div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button></div>
-<div class="collapse navbar-collapse navbar-main-collapse"><ul class="nav navbar-nav">
-<li><a href="/index.html"><i class="fa fa-home"></i> Home</a></li>
-<li><a href="../index.html"><i class="fa fa-arrow-up"></i> Eclass Reference</a></li>
-</ul></div>
-</div></div></nav></header><div class="container"><div class="row"><div class="col-md010"><ol class="breadcrumb"><li><a href="/index.html">Master Index</a></li><li><a href="../index.html">Eclass Reference</a></li></ol></div></div></div>
- <div class="container">
-EOF
+ echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
# generate html pages and fix hyperlinks for eclass and ebuild man pages
$DECOMPRESS "$i" | /usr/bin/man2html -r - | \
sed -e "/<A HREF=/s:=.*man.*/\(.*eclass\).*html\">:=../\1/index.html>:" \
@@ -110,7 +112,7 @@ EOF
# The first 4 lines are cruft for devmanual
tail -n $(($(wc -l ${TMP} | awk '{print $1}') - 4)) ${TMP} >> ${FINAL}
rm -f ${TMP}
- echo "${FOOTER}" >> ${FINAL}
+ echo -n "${FOOTER}" >> "${FINAL}"
done
# Remove old dirs (eclasses that were dropped from the tree)
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-15 18:05 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-12-15 18:05 UTC (permalink / raw
To: gentoo-commits
commit: aec348b31a6a4785dc2727abcc2afff6f857dfea
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 17:25:59 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 17:25:59 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=aec348b3
bin/gen-eclass-html.sh: More robust pattern matching.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index b557093..fe17064 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -105,7 +105,7 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
# generate html pages and fix hyperlinks for eclass and ebuild man pages
${DECOMPRESS} "${i}" | /usr/bin/man2html -r - \
- | sed -e "1,4d;/<\/BODY>/d;/<\/HTML>/d" \
+ | sed -e '1,/<BODY>/d;/<\/BODY>/,$d' \
-e '/<A HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\)\.5\.html":"../\1/index.html":g' \
-e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
>> "${FINAL}"
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-21 5:19 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2019-12-21 5:19 UTC (permalink / raw
To: gentoo-commits
commit: 1bfa9bda3f10627a9798edfc65472d59bc9ffeba
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 21 04:36:03 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 21 05:18:16 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=1bfa9bda
bin/build_search_documents.py: fix aggressive whitespace stripping
In stringify_node(), we aggressively strip the whitespaces around
children nodes. This results in something like
"<c>SLOT</c>, <c>:SLOT<c/>" being parsed as "SLOT,:SLOT",
removing the white space between ',' and ':'.
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/build_search_documents.py | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index 3816fdb..e19dce6 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -18,22 +18,32 @@ def stringify_node(parent: ET.Element) -> str:
parent -- the node to convert to a string
"""
+ # We usually have something like:
+ # <p>\nText
+ # Left strip the whitespace.
if parent.text:
text = parent.text.lstrip()
else:
text = str()
+ # For each child, strip the tags and append to text
+ # along with the tail text following it.
+ # The tail may include '\n' if it spans multiple lines.
+ # We will worry about those on return, not now.
for child in parent.getchildren():
# The '<d/>' tag is simply a fancier '-' character
if child.tag == 'd':
text += '-'
if child.text:
- text += child.text.lstrip()
+ text += child.text
if child.tail:
- text += child.tail.rstrip()
+ text += child.tail
- text += parent.tail.rstrip()
- return text.replace('\n', ' ')
+ # A paragraph typically ends with:
+ # Text\n</p>
+ # Right strip any spurious whitespace.
+ # Finally, get rid of any intermediate newlines.
+ return text.rstrip().replace('\n', ' ')
def process_node(documents: list, node: ET.Element, name: str, url: str) -> None:
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-25 4:36 Göktürk Yüksek
0 siblings, 0 replies; 35+ messages in thread
From: Göktürk Yüksek @ 2019-12-25 4:36 UTC (permalink / raw
To: gentoo-commits
commit: 412fa6cd47e75ef45b7d472d6c4fbea9dcea5550
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 25 04:33:55 2019 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Wed Dec 25 04:35:59 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=412fa6cd
bin/build_search_documents.py: do not use the deprecated .getchildren()
```
Deprecated since version 3.2, will be removed in version 3.9: Use
list(elem) or iteration.
```
Suggested-by: Michał Górny <mgorny <AT> gentoo.org>
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
bin/build_search_documents.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index e19dce6..37b6af9 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -30,7 +30,7 @@ def stringify_node(parent: ET.Element) -> str:
# along with the tail text following it.
# The tail may include '\n' if it spans multiple lines.
# We will worry about those on return, not now.
- for child in parent.getchildren():
+ for child in parent:
# The '<d/>' tag is simply a fancier '-' character
if child.tag == 'd':
text += '-'
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-26 1:56 Göktürk Yüksek
0 siblings, 0 replies; 35+ messages in thread
From: Göktürk Yüksek @ 2019-12-26 1:56 UTC (permalink / raw
To: gentoo-commits
commit: 10272a92abe137f187074613960ba0b84c5844a3
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 26 00:36:21 2019 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Thu Dec 26 00:36:21 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=10272a92
bin/build_search_documents.py: create documents from tables
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
bin/build_search_documents.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index d6b75ff..1aac495 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -77,10 +77,10 @@ def process_node(documents: list, node: ET.Element, name: str, url: str) -> None
for child in node:
process_node(documents, child, name, url)
- elif node.tag in ['body', 'guide', 'li', 'ul']:
+ elif node.tag in ['body', 'guide', 'li', 'ul', 'table', 'tr']:
for child in node:
process_node(documents, child, name, url)
- elif node.tag in ['p', 'important', 'note', 'warning']:
+ elif node.tag in ['p', 'important', 'note', 'warning', 'th', 'ti']:
text = stringify_node(node)
documents.append({'id': len(documents),
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-26 1:56 Göktürk Yüksek
0 siblings, 0 replies; 35+ messages in thread
From: Göktürk Yüksek @ 2019-12-26 1:56 UTC (permalink / raw
To: gentoo-commits
commit: 3d16b1e4ad1ec151916d4e1ce78596cafe6dbca1
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 26 00:30:21 2019 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Thu Dec 26 00:30:21 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3d16b1e4
bin/build_search_documents.py: recurse down <ul/> and <li/>
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
bin/build_search_documents.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index 37b6af9..d6b75ff 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -77,7 +77,7 @@ def process_node(documents: list, node: ET.Element, name: str, url: str) -> None
for child in node:
process_node(documents, child, name, url)
- elif node.tag in ['body', 'guide']:
+ elif node.tag in ['body', 'guide', 'li', 'ul']:
for child in node:
process_node(documents, child, name, url)
elif node.tag in ['p', 'important', 'note', 'warning']:
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-26 1:56 Göktürk Yüksek
0 siblings, 0 replies; 35+ messages in thread
From: Göktürk Yüksek @ 2019-12-26 1:56 UTC (permalink / raw
To: gentoo-commits
commit: 1029f9c624e3f3bf252f20197f357cca00a20410
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 26 01:37:23 2019 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Thu Dec 26 01:37:23 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=1029f9c6
bin/build_search_documents.py: handle multi-line indented text better
Beyond replacing newlines that show up in the middle of a text, remove
the whitespace following the newline (which is the indentation) as
well.
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
bin/build_search_documents.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index 1aac495..38ffd24 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -5,6 +5,12 @@ import json
import os.path
import sys
import xml.etree.ElementTree as ET
+import re
+
+
+# The regex for stripping a newline and the possible indentation
+# whitespace following it in multiline content
+whitespace_re = re.compile(r'\n[ \t]*', flags=re.M)
def stringify_node(parent: ET.Element) -> str:
@@ -28,7 +34,7 @@ def stringify_node(parent: ET.Element) -> str:
# For each child, strip the tags and append to text
# along with the tail text following it.
- # The tail may include '\n' if it spans multiple lines.
+ # The tail may include '\n', '\t', ' ' if it spans multiple lines.
# We will worry about those on return, not now.
for child in parent:
# The '<d/>' tag is simply a fancier '-' character
@@ -42,8 +48,8 @@ def stringify_node(parent: ET.Element) -> str:
# A paragraph typically ends with:
# Text\n</p>
# Right strip any spurious whitespace.
- # Finally, get rid of any intermediate newlines.
- return text.rstrip().replace('\n', ' ')
+ # Finally, get rid of any intermediate newlines and indentation whitespace.
+ return whitespace_re.sub(' ', text.rstrip())
def process_node(documents: list, node: ET.Element, name: str, url: str) -> None:
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2019-12-26 22:44 Göktürk Yüksek
0 siblings, 0 replies; 35+ messages in thread
From: Göktürk Yüksek @ 2019-12-26 22:44 UTC (permalink / raw
To: gentoo-commits
commit: 61d0d80f2fc493d08a97bae1e507055015f55788
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 26 22:43:02 2019 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Thu Dec 26 22:43:02 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=61d0d80f
bin/build_search_documents.py: create search documents for <dl/>, <dd/>, <dt/>
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
bin/build_search_documents.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index 38ffd24..b7b840c 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -83,10 +83,10 @@ def process_node(documents: list, node: ET.Element, name: str, url: str) -> None
for child in node:
process_node(documents, child, name, url)
- elif node.tag in ['body', 'guide', 'li', 'ul', 'table', 'tr']:
+ elif node.tag in ['body', 'dl', 'guide', 'li', 'ul', 'table', 'tr']:
for child in node:
process_node(documents, child, name, url)
- elif node.tag in ['p', 'important', 'note', 'warning', 'th', 'ti']:
+ elif node.tag in ['p', 'dd', 'dt', 'important', 'note', 'warning', 'th', 'ti']:
text = stringify_node(node)
documents.append({'id': len(documents),
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-01-02 23:59 Göktürk Yüksek
0 siblings, 0 replies; 35+ messages in thread
From: Göktürk Yüksek @ 2020-01-02 23:59 UTC (permalink / raw
To: gentoo-commits
commit: bf62b78f01dd8676403b03af942c42a56a145625
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 2 23:56:26 2020 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Thu Jan 2 23:56:26 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=bf62b78f
bin/build_search_documents.py: <li/> is a terminal node, not intermediary
Process <li/> as a terminal node.
Reported-by: Ulrich Müller <ulm <AT> gentoo.org>
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
bin/build_search_documents.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index b7b840c..6782969 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -83,10 +83,10 @@ def process_node(documents: list, node: ET.Element, name: str, url: str) -> None
for child in node:
process_node(documents, child, name, url)
- elif node.tag in ['body', 'dl', 'guide', 'li', 'ul', 'table', 'tr']:
+ elif node.tag in ['body', 'dl', 'guide', 'ul', 'table', 'tr']:
for child in node:
process_node(documents, child, name, url)
- elif node.tag in ['p', 'dd', 'dt', 'important', 'note', 'warning', 'th', 'ti']:
+ elif node.tag in ['p', 'dd', 'dt', 'important', 'li', 'note', 'warning', 'th', 'ti']:
text = stringify_node(node)
documents.append({'id': len(documents),
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-01-09 21:25 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-01-09 21:25 UTC (permalink / raw
To: gentoo-commits
commit: ab9f4f86f29c6bdb8aea37bf5c86e74a2c605146
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 9 19:53:37 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Jan 9 21:24:37 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=ab9f4f86
bin/gen-eclass-html.sh: Remove broken links to localhost.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 26c42e6..56bf51f 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -109,6 +109,7 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
| sed -e '1,/<BODY>/d;/<\/BODY>/,$d' \
-e '/<A HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\)\.5\.html":"../\1/index.html":g' \
-e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
+ -e 's:<A HREF="[^"]*//localhost/[^"]*">\([^<>]*\)</A>:\1:g' \
>> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
done
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-01-12 9:23 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-01-12 9:23 UTC (permalink / raw
To: gentoo-commits
commit: da17f1301a5e7c5f9cfa6fa1d202ae78c8f6bb3b
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 10 00:33:51 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 12 09:21:26 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=da17f130
bin/gen-eclass-html.sh: More man2html postprocessing.
Remove all links containing "${", because most likely these are
instances of SRC_URI containing a variable reference.
Remove <TT> since it is no longer valid in HTML5. man2html only
outputs this pair of tags (with a sequence of non-breaking spaces
inside) when it encounters a tab character in its input. Neither
<code> nor any other logical markup would be a good replacement,
so simply remove it.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 7d3d2ba..2234926 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -105,11 +105,13 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
# rebuild the man page each time
echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
# generate html pages and fix hyperlinks for eclass and ebuild man pages
- ${DECOMPRESS} "${i}" | /usr/bin/man2html -r - \
+ ${DECOMPRESS} "${i}" | /usr/bin/man2html -r \
| sed -e '1,/<BODY>/d;/<\/BODY>/,$d' \
-e '/<A HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\)\.5\.html":"../\1/index.html":g' \
-e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
-e 's:<A HREF="[^"]*//localhost/[^"]*">\([^<>]*\)</A>:\1:g' \
+ -e 's:<A HREF="[^"]*\${[^"]*">\([^<>]*\)</A>:\1:g' \
+ -e 's:<TT>\([^<>]*\)</TT>:\1:g' \
>> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
done
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-01-16 18:53 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-01-16 18:53 UTC (permalink / raw
To: gentoo-commits
commit: e1543d5e7ac5b0244b43feeb9aca44ca1b33604c
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 16 07:45:45 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Jan 16 18:49:09 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e1543d5e
bin/gen-eclass-html.sh: Don't include "Reference" in link texts.
This was redundant and inconsistent with the text generated by the
XSL stylesheet.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 2234926..db19761 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -141,7 +141,7 @@ installed by emerging <c>app-doc/eclass-manpages</c>.
EOF
for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
- echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i) Reference</uri></li>" >> ${OUTPUTDIR}/text.xml
+ echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" >> ${OUTPUTDIR}/text.xml
done
cat << EOF >> ${OUTPUTDIR}/text.xml
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-01-18 10:15 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-01-18 10:15 UTC (permalink / raw
To: gentoo-commits
commit: a127f6386c36615333f071d98128b66875551f33
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 08:31:55 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 08:31:55 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a127f638
bin/gen-eclass-html.sh: More postprocessing for man2html.
In order to silence the W3C Validator.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index db19761..6ecfe9c 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -112,6 +112,9 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
-e 's:<A HREF="[^"]*//localhost/[^"]*">\([^<>]*\)</A>:\1:g' \
-e 's:<A HREF="[^"]*\${[^"]*">\([^<>]*\)</A>:\1:g' \
-e 's:<TT>\([^<>]*\)</TT>:\1:g' \
+ -e 's:<DL COMPACT>:<DL>:g' \
+ -e 's:<TR VALIGN=top>:<TR>:g' \
+ -e '/<A NAME/{N;s:<A NAME=\(.*\)>.*</A>\(.*<H[1-6]\)>:\2 ID=\1>:}' \
>> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
done
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-01-27 20:55 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-01-27 20:55 UTC (permalink / raw
To: gentoo-commits
commit: 7dad67e1d70319bc3a4b06dd51e0ab9309b0272d
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 27 20:54:05 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Jan 27 20:54:05 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7dad67e1
bin/gen-eclass-html.sh: Whitespace.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 40f8490..fc37f03 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -128,13 +128,14 @@ cat << EOF > $OUTPUTDIR/text.xml
<guide self="eclass-reference/">
<chapter>
<title>Eclass Reference</title>
-
<body>
+
<p>
This section provides a reference for some of the more commonly used eclasses.
Note that most eclasses have an accompanying manual page. These man pages can be
installed by emerging <c>app-doc/eclass-manpages</c>.
</p>
+
</body>
<section>
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-01-29 18:00 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-01-29 18:00 UTC (permalink / raw
To: gentoo-commits
commit: d71cc8025960c1676a42ecc7f5efdc8252c8923b
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 29 17:59:50 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 29 17:59:50 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d71cc802
bin/gen-eclass-html.sh: Prevent removal of dirs.
Updating a file doesn't change the modification time of its directory,
therefore scanning for "old directories" produced false positives.
Work around the problem by touching the directory.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index fc37f03..efa7f12 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -102,6 +102,8 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
FINAL="${DIRNAME}/index.html"
DECOMPRESS=$(guesscompress "${i}")
[[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME}
+ # update the dir's mtime to prevent its removal below
+ touch ${DIRNAME}
# rebuild the man page each time
echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
# generate html pages and fix hyperlinks for eclass and ebuild man pages
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-02-03 0:05 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-02-03 0:05 UTC (permalink / raw
To: gentoo-commits
commit: 631558f7a3726f06fafe99f43b46abae0872cfa2
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 2 23:47:25 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 2 23:47:25 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=631558f7
bin/gen-eclass-html.sh: Sync from devbook.xsl.
Apply the "logo on mobile" patch to the eclass manpages, too.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index efa7f12..84a46fc 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -37,7 +37,7 @@ IFS='' read -r -d '' HEADER << 'EOF'
</ul>
</div>
</div></div>
-<div class="logo">
+<div>
<a href="/" title="Back to the homepage" class="site-logo"><object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml"><img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo"></object></a><span class="site-label">Development Guide</span>
</div>
</div></div></div>
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-02-13 12:28 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-02-13 12:28 UTC (permalink / raw
To: gentoo-commits
commit: f6a47cf16af9ff5ef48253d85fdac670a4a64c01
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 13 12:24:58 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 12:24:58 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=f6a47cf1
bin/gen-eclass-html.sh: Relative link to root page.
The absolute link was expanded to file:/// when testing locally.
A relative link is also consistent with devbook.xsl output.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 883c787..10292eb 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -44,11 +44,17 @@ IFS='' read -r -d '' HEADER << 'EOF'
<nav class="tyrian-navbar" role="navigation"><div class="container"><div class="row">
<div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button></div>
<div class="collapse navbar-collapse navbar-main-collapse"><ul class="nav navbar-nav">
-<li><a href="/index.html"><i class="fa fa-home"></i> Home</a></li>
-<li><a href="../index.html"><i class="fa fa-arrow-up"></i> Eclass Reference</a></li>
+<li><a href="../../index.html"><span class="fa fa-home"></span> Home</a></li>
+<li><a href="../index.html"><span class="fa fa-arrow-up"></span> Eclass Reference</a></li>
</ul></div>
</div></div></nav>
-<div class="container"><div class="row"><div class="col-md010"><ol class="breadcrumb"><li><a href="/index.html">Master Index</a></li><li><a href="../index.html">Eclass Reference</a></li></ol></div></div></div></header>
+<div class="container"><div class="row"><div class="col-md010">
+<ol class="breadcrumb">
+<li><a href="../../index.html">Master Index</a></li>
+<li><a href="../index.html">Eclass Reference</a></li>
+</ol>
+</div></div></div>
+</header>
<main><div class="container">
EOF
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-02-28 6:20 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-02-28 6:20 UTC (permalink / raw
To: gentoo-commits
commit: e01ceaed422f53a782300feaebf252773e78c2e4
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 27 18:10:17 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Feb 28 06:17:47 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e01ceaed
bin/gen-eclass-html.sh: New option -n to create a placeholder file.
The new strict dependencies will cause the build to fail if
eclass-reference/text.xml is missing, because it is needed as
a dependency for index.html of the previous and next documents.
Add an option that makes it possible to create the file, even if
the eclass documentation is missing.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 50 +++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 43 insertions(+), 7 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 10292eb..ed43090 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -100,8 +100,35 @@ guesscompress() {
esac
}
-# We also need the ebuild man page
-for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
+usage() {
+ cat <<- EOF >&2
+ Usage: $0 [OPTION]...
+ Convert eclass man pages to HTML.
+
+ -n do not build anything, only create a placeholder index
+ -h display this help and exit
+ EOF
+}
+
+while getopts 'nh' opt; do
+ case ${opt} in
+ n) NOMAN=true ;;
+ h) usage; exit 0 ;;
+ *) usage; exit 1 ;;
+ esac
+done
+shift $((OPTIND-1))
+
+MANPAGES=()
+[[ -n ${NOMAN} ]] || MANPAGES=(
+ $(/usr/bin/qlist eclass-manpages)
+ # We also need the ebuild man page
+ /usr/share/man/man5/ebuild.5*
+)
+
+[[ -d ${OUTPUTDIR} ]] || mkdir -p "${OUTPUTDIR}" || exit 1
+
+for i in "${MANPAGES[@]}"; do
FILEBASE=${i##*/}
BASENAME="${FILEBASE%.5*}"
[[ ${BASENAME} != "${FILEBASE}" ]] || continue
@@ -150,15 +177,24 @@ installed by emerging <c>app-doc/eclass-manpages</c>.
<section>
<title>Contents</title>
<body>
-<ul class="list-group">
EOF
-for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
- echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" >> ${OUTPUTDIR}/text.xml
-done
+if [[ -n ${NOMAN} ]]; then
+ cat <<- EOF >> "${OUTPUTDIR}"/text.xml
+ <warning>
+ This is only a placeholder. If you see this text in the output document,
+ then the eclass documentation is missing.
+ </warning>
+ EOF
+else
+ echo '<ul class="list-group">' >> "${OUTPUTDIR}"/text.xml
+ for i in $(find "${OUTPUTDIR}" -maxdepth 1 -mindepth 1 -type d | sort); do
+ echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" >> "${OUTPUTDIR}"/text.xml
+ done
+ echo '</ul>' >> "${OUTPUTDIR}"/text.xml
+fi
cat << EOF >> ${OUTPUTDIR}/text.xml
-</ul>
</body>
</section>
</chapter>
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-02-28 6:58 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-02-28 6:58 UTC (permalink / raw
To: gentoo-commits
commit: bc42e92e493db3303e796f058ab512f649c49575
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 28 06:57:17 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Feb 28 06:57:17 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=bc42e92e
bin/gen-eclass-html.sh: Check for errors. Quote variables.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 88f05a0..23f481b 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -3,6 +3,8 @@
# pre1) OOB: The host needs to emerge eclass-manpages on a daily basis.
# This script should be run before the make operation is performed
+set -o pipefail
+
OUTPUTDIR="eclass-reference"
IFS='' read -r -d '' HEADER << 'EOF'
@@ -121,10 +123,10 @@ shift $((OPTIND-1))
MANPAGES=()
[[ -n ${NOMAN} ]] || MANPAGES=(
- $(/usr/bin/qlist eclass-manpages)
+ $(/usr/bin/qlist -e eclass-manpages)
# We also need the ebuild man page
/usr/share/man/man5/ebuild.5*
-)
+) || exit 1
[[ -d ${OUTPUTDIR} ]] || mkdir -p "${OUTPUTDIR}" || exit 1
@@ -135,11 +137,11 @@ for i in "${MANPAGES[@]}"; do
DIRNAME="${OUTPUTDIR}/${BASENAME}"
FINAL="${DIRNAME}/index.html"
DECOMPRESS=$(guesscompress "${i}")
- [[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME}
+ [[ -d ${DIRNAME} ]] || mkdir -p "${DIRNAME}" || exit 1
# update the dir's mtime to prevent its removal below
- touch ${DIRNAME}
+ touch "${DIRNAME}" || exit 1
# rebuild the man page each time
- echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
+ echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}" || exit 1
# generate html pages and fix hyperlinks for eclass and ebuild man pages
${DECOMPRESS} "${i}" | /usr/bin/man2html -r \
| sed -e '1,/<BODY>/d;/<\/BODY>/,$d' \
@@ -151,15 +153,15 @@ for i in "${MANPAGES[@]}"; do
-e 's:<DL COMPACT>:<DL>:g' \
-e 's:<TR VALIGN=top>:<TR>:g' \
-e '/<A NAME/{N;s:<A NAME=\(.*\)>.*</A>\(.*<H[1-6]\)>:\2 ID=\1>:}' \
- >> "${FINAL}"
- echo -n "${FOOTER}" >> "${FINAL}"
+ >> "${FINAL}" || exit 1
+ echo -n "${FOOTER}" >> "${FINAL}" || exit 1
done
# Remove old dirs (eclasses that were dropped from the tree)
-find $OUTPUTDIR -mindepth 1 -maxdepth 1 -mtime +1 -exec rm -R {} \;
+find "${OUTPUTDIR}" -mindepth 1 -maxdepth 1 -mtime +1 -exec rm -R {} \;
# build the index, rebuilding it each time
-cat << EOF > $OUTPUTDIR/text.xml
+cat << 'EOF' > "${OUTPUTDIR}"/text.xml || exit 1
<?xml version="1.0"?>
<guide self="eclass-reference/">
<chapter>
@@ -180,21 +182,21 @@ installed by emerging <c>app-doc/eclass-manpages</c>.
EOF
if [[ -n ${NOMAN} ]]; then
- cat <<- EOF >> "${OUTPUTDIR}"/text.xml
+ cat <<- 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
<warning>
This is only a placeholder. If you see this text in the output document,
then the eclass documentation is missing.
</warning>
EOF
else
- echo '<ul class="list-group">' >> "${OUTPUTDIR}"/text.xml
+ echo '<ul class="list-group">' >> "${OUTPUTDIR}"/text.xml || exit 1
for i in $(find "${OUTPUTDIR}" -maxdepth 1 -mindepth 1 -type d | sort); do
- echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" >> "${OUTPUTDIR}"/text.xml
+ echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" >> "${OUTPUTDIR}"/text.xml || exit 1
done
- echo '</ul>' >> "${OUTPUTDIR}"/text.xml
+ echo '</ul>' >> "${OUTPUTDIR}"/text.xml || exit 1
fi
-cat << EOF >> ${OUTPUTDIR}/text.xml
+cat << 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
</body>
</section>
</chapter>
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2020-10-26 15:42 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2020-10-26 15:42 UTC (permalink / raw
To: gentoo-commits
commit: 7cb71c2f1ff1da24215f40d57732d59ae7b618a4
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 26 19:06:40 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 26 19:06:40 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7cb71c2f
bin/gen-eclass-html.sh: Generate html for make.conf(5).
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 23f481b..f7fcc73 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -124,8 +124,9 @@ shift $((OPTIND-1))
MANPAGES=()
[[ -n ${NOMAN} ]] || MANPAGES=(
$(/usr/bin/qlist -e eclass-manpages)
- # We also need the ebuild man page
+ # We also need a couple of portage man pages
/usr/share/man/man5/ebuild.5*
+ /usr/share/man/man5/make.conf.5*
) || exit 1
[[ -d ${OUTPUTDIR} ]] || mkdir -p "${OUTPUTDIR}" || exit 1
@@ -142,10 +143,10 @@ for i in "${MANPAGES[@]}"; do
touch "${DIRNAME}" || exit 1
# rebuild the man page each time
echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}" || exit 1
- # generate html pages and fix hyperlinks for eclass and ebuild man pages
+ # generate html pages and fix hyperlinks for eclass and other man pages
${DECOMPRESS} "${i}" | /usr/bin/man2html -r \
| sed -e '1,/<BODY>/d;/<\/BODY>/,$d' \
- -e '/<A HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\)\.5\.html":"../\1/index.html":g' \
+ -e '/<A HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\|make\.conf\)\.5\.html":"../\1/index.html":g' \
-e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
-e 's:<A HREF="[^"]*//localhost/[^"]*">\([^<>]*\)</A>:\1:g' \
-e 's:<A HREF="[^"]*\${[^"]*">\([^<>]*\)</A>:\1:g' \
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2021-02-25 19:30 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2021-02-25 19:30 UTC (permalink / raw
To: gentoo-commits
commit: 60f8f96ce3fb52a2ebcb8e7e49dd771b1f0f246e
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 25 19:29:00 2021 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 25 19:29:00 2021 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=60f8f96c
bin/gen-eclass-html.sh: Drop up arrow in navigation bar
This is redundant with breadcrumbs and doesn't exist anywhere else in
the document.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 4ca853a..9486852 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -47,7 +47,6 @@ IFS='' read -r -d '' HEADER << 'EOF'
<div class="navbar-header"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button></div>
<div class="collapse navbar-collapse navbar-main-collapse"><ul class="nav navbar-nav">
<li><a href="../../index.html"><span class="fa fa-home"></span> Home</a></li>
-<li><a href="../index.html"><span class="fa fa-arrow-up"></span> Eclass Reference</a></li>
</ul></div>
</div></div></nav>
<div class="container"><div class="row"><div class="col-md010">
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2022-04-26 7:41 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2022-04-26 7:41 UTC (permalink / raw
To: gentoo-commits
commit: a5bd4baa0047470e2be18ac6404347207562f0a4
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 24 11:42:22 2022 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 04:37:23 2022 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a5bd4baa
bin/gen-eclass-html.sh: Don't show mailto links
man2html's heuristic for recognition of e-mail addresses is
unreliable, therefore drop them all.
Reported-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index df759e0..6021c1e 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -149,6 +149,7 @@ for i in "${MANPAGES[@]}"; do
-e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
-e 's:<A HREF="[^"]*//localhost/[^"]*">\([^<>]*\)</A>:\1:g' \
-e 's:<A HREF="[^"]*\${[^"]*">\([^<>]*\)</A>:\1:g' \
+ -e 's,<A HREF="mailto:[^"]*">\([^<>]*\)</A>,\1,g' \
-e 's:<TT>\([^<>]*\)</TT>:\1:g' \
-e 's:<DL COMPACT>:<DL>:g' \
-e 's:<TR VALIGN=top>:<TR>:g' \
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2024-10-29 11:19 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2024-10-29 11:19 UTC (permalink / raw
To: gentoo-commits
commit: 466211ebd818b97109a9ffdec4d48e8c28d8a579
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 29 11:17:57 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 29 11:17:57 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=466211eb
bin/gen-eclass-html.sh: Use intra-document link targets
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 9dd6a56..e813f28 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -193,7 +193,7 @@ if [[ -z ${NOMAN} ]]; then
<ul class="list-group">
EOF
for i in $(find "${OUTPUTDIR}" -maxdepth 1 -mindepth 1 -type d | sort); do
- echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" \
+ echo "<li><uri link=\"::eclass-reference/$(basename $i)/\"/></li>" \
>> "${OUTPUTDIR}"/text.xml || exit 1
done
cat <<- 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2024-10-29 11:19 Ulrich Müller
2024-10-29 11:41 ` Ulrich Müller
0 siblings, 1 reply; 35+ messages in thread
From: Ulrich Müller @ 2024-10-29 11:19 UTC (permalink / raw
To: gentoo-commits
commit: 796e6b9c58c8310a1430b96b9504ffa379d5ca50
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 29 11:12:37 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 29 11:12:37 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=796e6b9c
bin/gen-eclass-html.sh: Add local variables block for Emacs
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index cdd5244..b17fbc5 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -208,3 +208,8 @@ cat << 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
</chapter>
</guide>
EOF
+
+# Local Variables:
+# tab-width: 4
+# indent-tabs-mode: t
+# End:
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
2024-10-29 11:19 Ulrich Müller
@ 2024-10-29 11:41 ` Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2024-10-29 11:41 UTC (permalink / raw
To: gentoo-commits
commit: 796e6b9c58c8310a1430b96b9504ffa379d5ca50
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 29 11:12:37 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 29 11:12:37 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=796e6b9c
bin/gen-eclass-html.sh: Add local variables block for Emacs
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index cdd5244..b17fbc5 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -208,3 +208,8 @@ cat << 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
</chapter>
</guide>
EOF
+
+# Local Variables:
+# tab-width: 4
+# indent-tabs-mode: t
+# End:
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2024-10-29 11:41 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2024-10-29 11:41 UTC (permalink / raw
To: gentoo-commits
commit: cbc990eda2422d121e775d7bdf82e00cb0160fbd
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 29 11:17:18 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 29 11:40:15 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=cbc990ed
bin/gen-eclass-html.sh: Update message for eclasses fallback
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index b17fbc5..3a4decc 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -180,31 +180,36 @@ Note that most eclasses have an accompanying manual page. These man pages can be
installed by emerging <c>app-doc/eclass-manpages</c>.
</p>
-</body>
-
-<section>
-<title>Contents</title>
-<body>
EOF
if [[ -n ${NOMAN} ]]; then
cat <<- 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
- <warning>
- This is only a placeholder. If you see this text in the output document,
- then the eclass documentation is missing.
- </warning>
+ <note>
+ This version of the devmanual does not include the eclass documentation.
+ </note>
+ </body>
EOF
else
- echo '<ul class="list-group">' >> "${OUTPUTDIR}"/text.xml || exit 1
+ cat <<- 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
+ </body>
+
+ <section>
+ <title>Contents</title>
+ <body>
+
+ <ul class="list-group">
+ EOF
for i in $(find "${OUTPUTDIR}" -maxdepth 1 -mindepth 1 -type d | sort); do
echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" >> "${OUTPUTDIR}"/text.xml || exit 1
done
- echo '</ul>' >> "${OUTPUTDIR}"/text.xml || exit 1
+ cat <<- 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
+ </ul>
+ </body>
+ </section>
+ EOF
fi
cat << 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
-</body>
-</section>
</chapter>
</guide>
EOF
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: bin/
@ 2024-10-29 11:41 Ulrich Müller
0 siblings, 0 replies; 35+ messages in thread
From: Ulrich Müller @ 2024-10-29 11:41 UTC (permalink / raw
To: gentoo-commits
commit: 9e2aa3cc903cbff82ea040cb9ca494505fce528d
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 29 11:17:57 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Oct 29 11:40:35 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=9e2aa3cc
bin/gen-eclass-html.sh: Use intra-document link targets
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 3a4decc..4a7ba89 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -200,7 +200,8 @@ else
<ul class="list-group">
EOF
for i in $(find "${OUTPUTDIR}" -maxdepth 1 -mindepth 1 -type d | sort); do
- echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i)</uri></li>" >> "${OUTPUTDIR}"/text.xml || exit 1
+ echo "<li><uri link=\"::eclass-reference/$(basename $i)/\"/></li>" \
+ >> "${OUTPUTDIR}"/text.xml || exit 1
done
cat <<- 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
</ul>
^ permalink raw reply related [flat|nested] 35+ messages in thread
end of thread, other threads:[~2024-10-29 11:41 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-27 20:55 [gentoo-commits] proj/devmanual:master commit in: bin/ Ulrich Müller
-- strict thread matches above, loose matches on Subject: below --
2024-10-29 11:41 Ulrich Müller
2024-10-29 11:41 Ulrich Müller
2024-10-29 11:19 Ulrich Müller
2024-10-29 11:19 Ulrich Müller
2024-10-29 11:41 ` Ulrich Müller
2022-04-26 7:41 Ulrich Müller
2021-02-25 19:30 Ulrich Müller
2020-10-26 15:42 Ulrich Müller
2020-02-28 6:58 Ulrich Müller
2020-02-28 6:20 Ulrich Müller
2020-02-13 12:28 Ulrich Müller
2020-02-03 0:05 Ulrich Müller
2020-01-29 18:00 Ulrich Müller
2020-01-18 10:15 Ulrich Müller
2020-01-16 18:53 Ulrich Müller
2020-01-12 9:23 Ulrich Müller
2020-01-09 21:25 Ulrich Müller
2020-01-02 23:59 Göktürk Yüksek
2019-12-26 22:44 Göktürk Yüksek
2019-12-26 1:56 Göktürk Yüksek
2019-12-26 1:56 Göktürk Yüksek
2019-12-26 1:56 Göktürk Yüksek
2019-12-25 4:36 Göktürk Yüksek
2019-12-21 5:19 Ulrich Müller
2019-12-15 18:05 Ulrich Müller
2019-12-15 17:25 Ulrich Müller
2019-12-15 17:25 Ulrich Müller
2019-12-14 13:19 Ulrich Müller
2019-12-14 12:01 Ulrich Müller
2019-12-09 21:39 Ulrich Müller
2019-11-07 15:06 Brian Evans
2019-11-07 14:09 Brian Evans
2019-08-25 8:43 Ulrich Müller
2019-03-22 19:46 Brian Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox