[gentoo-commits] proj/devmanual:master commit in: bin/, /

2024-01-19 Thread Ulrich Müller
commit: 17f7b12e1a025ce0d0307156c8a3aaa087364868
Author: Ulrich Müller  gentoo  org>
AuthorDate: Fri Jan 19 21:05:55 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Jan 19 21:05:55 2024 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=17f7b12e

Update copyright years

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 2 +-
 devbook.xsl| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 142c702..2d40cb6 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -80,7 +80,7 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 
 
 
-Copyright (C) 2001-2023 Gentoo Authors
+Copyright (C) 2001-2024 Gentoo Authors
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the
 https://www.gnu.org/licenses/gpl-2.0.html;>GNU 
General Public License, version 2.

diff --git a/devbook.xsl b/devbook.xsl
index 322e267..71a74dd 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -708,7 +708,7 @@
   
 
 
-  Copyright (C) 2001-2023 Gentoo Authors
+  Copyright (C) 2001-2024 Gentoo Authors
   
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the



[gentoo-commits] proj/devmanual:master commit in: bin/, /, xsl/

2023-11-02 Thread Ulrich Müller
commit: 35c9e7d3bb24d70320729df2fe207a5ea329be97
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Oct 30 17:41:37 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Nov  2 17:03:11 2023 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=35c9e7d3

*.xsl: XML declaration, local variables for Emacs, whitespace fixes

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh|   2 +-
 depend.xsl|   5 +
 xsl/lang.highlight.c.xsl  |  14 ++-
 xsl/lang.highlight.ebuild.xsl | 277 +-
 xsl/lang.highlight.m4.xsl |  26 ++--
 xsl/lang.highlight.make.xsl   |  18 ++-
 xsl/lang.highlight.sgml.xsl   |  16 ++-
 xsl/str.tokenize.function.xsl |  14 ++-
 8 files changed, 207 insertions(+), 165 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index d3e8480..142c702 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -168,7 +168,7 @@ find "${OUTPUTDIR}" -mindepth 1 -maxdepth 1 -mtime +1 -exec 
rm -R {} \;
 
 # build the index, rebuilding it each time
 cat << 'EOF' > "${OUTPUTDIR}"/text.xml || exit 1
-
+
 
 
 Eclass Reference

diff --git a/depend.xsl b/depend.xsl
index e0ee66c..abb139a 100644
--- a/depend.xsl
+++ b/depend.xsl
@@ -31,3 +31,8 @@
 
 
 
+
+
+
+
+

diff --git a/xsl/lang.highlight.c.xsl b/xsl/lang.highlight.c.xsl
index 089de50..f1e5937 100644
--- a/xsl/lang.highlight.c.xsl
+++ b/xsl/lang.highlight.c.xsl
@@ -1,3 +1,4 @@
+
 http://exslt.org/strings;
   xmlns:exslt="http://exslt.org/common;
@@ -46,7 +47,7 @@
 
   
   
-   
+
   
 
   
@@ -66,12 +67,17 @@
   
   
 
- 
- 
-   
+  
+  
+
   
 
 
   
 
 
+
+
+
+
+

diff --git a/xsl/lang.highlight.ebuild.xsl b/xsl/lang.highlight.ebuild.xsl
index 47d884a..5a931e0 100644
--- a/xsl/lang.highlight.ebuild.xsl
+++ b/xsl/lang.highlight.ebuild.xsl
@@ -1,3 +1,4 @@
+
 http://exslt.org/strings;
   xmlns:exslt="http://exslt.org/common;
@@ -32,23 +33,23 @@
   
 
   
-   
- 
-   
-   $(
-   
- 
-   
+
+  
+
+$(
+
+  
+
   
 
   
-   
- 
-   
-   ($(
-   
- 
-   
+
+  
+
+($(
+
+  
+
   
 
   
@@ -59,7 +60,7 @@
   
 
   
-   $
+$
   
 
   
@@ -75,9 +76,9 @@
 
   
   
-   
- 
-   
+
+  
+
 --
 
 
@@ -106,261 +107,261 @@
   $data = 'done' or $data = 'make' or $data = 'echo' or 
$data = 'cd' or $data = 'local' or $data = 'return' or
   $data = 'for' or $data = 'case' or $data = 'esac' or 
$data = 'in' or $data = '-n' or $data = '[' or $data = ']' or
   $data = '-z' or $data = '-f' or $data = '-' or 
$data = '' or $data = 'EOF'">
-   
+
   
 
   
   
-   
+  $data = 'check_KV' or $data = 'keepdir' or $data = 
'econf' or $data = 'die' or $data = 'einstall' or $data = 'einfo' or
+  $data = 'elog' or
+  $data = 'ewarn' or $data = 'eerror' or $data = 'diropts' 
or $data = 'dobin' or $data = 'docinto' or $data = 'dodoc' or
+  $data = 'doexe' or $data = 'dohard' or $data = 'dohtml' 
or $data = 'doinfo' or $data = 'doins' or $data = 'dolib' or
+  $data = 'dolib.a' or $data = 'dolib.so' or $data = 
'doman' or $data = 'dosbin' or $data = 'dosym' or $data = 'emake' or
+  $data = 'exeinto' or $data = 'exeopts' or $data = 
'fowners' or $data = 'fperms' or $data = 'insinto' or $data = 'insopts' or
+  $data = 'into' or $data = 'libopts' or $data = 'newbin' 
or $data = 'newexe' or $data = 'newins' or $data = 'newman' or
+  $data = 'newsbin' or $data = 'prepall' or $data = 
'prepalldocs' or $data = 'prepallinfo' or $data = 'prepallman' or
+  $data = 'prepallstrip' or $data = 'has' or $data = 
'unpack' or $data = 'dosed' or $data = 'into' or
+  $data = 'doinitd' or $data = 'doconfd' or $data = 
'doenvd' or $data = 'dojar' or $data = 'domo' or $data = 'dodir' or
+  $data = 'ebegin' or $data = 'eend' or $data = 'newconfd' 
or $data = 'newdoc' or $data = 'newenvd' or $data = 'newinitd' or
+  $data = 'newlib.a' or $data = 'newlib.so' or $data = 
'hasq' or $data = 'hasv' or $data = 'useq' or $data = 'usev'">
+
   
 
   
   
-   
+
   
 
   
   
-   
+
   
 
   
   
-   
+
   
 
   
   
-   
+
   
 
   
   
-   
+
   
 
   
   
-   
+  $data = 'src_install' 

[gentoo-commits] proj/devmanual:master commit in: bin/, /

2023-10-21 Thread Ulrich Müller
commit: 2957b24ceea553281746f6b4528f757f4f5d6b54
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Oct 21 23:18:09 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Oct 21 23:18:09 2023 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=2957b24c

devbook.xsl: Force end tag for empty li elements

In order to make "tidy" happy.

For some reason, xsltproc omits the end tag if the element is empty.
Apparently, an empty comment is enough to make it think differently.

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 4 ++--
 devbook.xsl| 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 74e25dc..d3e8480 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -30,11 +30,11 @@ IFS='' read -r -d '' HEADER << 'EOF'
 https://bugs.gentoo.org/; title="Report issues and find common 
issues"> Bugs
 https://forums.gentoo.org/; title="Discuss with the 
community"> Forums
 https://packages.gentoo.org/; title="Find software for your 
Gentoo"> Packages
-
+
 https://planet.gentoo.org/; title="Find out what's going on in 
the developer community"> Planet
 https://archives.gentoo.org/; title="Read up on past 
discussions"> Archives
 https://sources.gentoo.org/; title="Browse our source code"> Sources
-
+
 https://infra-status.gentoo.org/; title="Get updates on the 
services provided by Gentoo"> Infra 
Status
 
 

diff --git a/devbook.xsl b/devbook.xsl
index e06d6e0..9289eab 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -518,11 +518,11 @@
   https://bugs.gentoo.org/; title="Report 
issues and find common issues"> 
Bugs
   https://forums.gentoo.org/; 
title="Discuss with the community"> 
Forums
   https://packages.gentoo.org/; 
title="Find software for your Gentoo"> 
Packages
-  
+  
   https://planet.gentoo.org/; title="Find 
out what's going on in the developer community"> Planet
   https://archives.gentoo.org/; 
title="Read up on past discussions"> 
Archives
   https://sources.gentoo.org/; 
title="Browse our source code"> 
Sources
-  
+  
   https://infra-status.gentoo.org/; 
title="Get updates on the services provided by Gentoo"> Infra Status
 
   



[gentoo-commits] proj/devmanual:master commit in: /, bin/

2023-10-05 Thread Ulrich Müller
commit: 19153057c1dbbc3537dfc9d1ca20a12d69a46c81
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Oct  2 10:53:27 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Oct  5 18:58:34 2023 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=19153057

devbook.xsl, bin/gen-eclass-html.sh: Link to privacy policy

Bug: https://bugs.gentoo.org/613938
Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 9 +++--
 devbook.xsl| 3 +++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 7ace03b..74e25dc 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -70,10 +70,15 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 
 
 
-
+
+
 https://twitter.com/gentoo; title="@Gentoo on Twitter">
 https://www.facebook.com/gentoo.org; title="Gentoo on 
Facebook">
-
+
+
+https://wiki.gentoo.org/wiki/Foundation:Privacy_Policy;>Privacy 
Policy
+
+
 
 Copyright (C) 2001-2023 Gentoo Authors
 Gentoo is a trademark of the Gentoo Foundation, Inc.

diff --git a/devbook.xsl b/devbook.xsl
index 7b6c734..d998710 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -658,6 +658,9 @@
   https://twitter.com/gentoo; title="@Gentoo on 
Twitter">
   https://www.facebook.com/gentoo.org; 
title="Gentoo on Facebook">
 
+   
+ https://wiki.gentoo.org/wiki/Foundation:Privacy_Policy;>Privacy Policy
+   
   
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/, /

2023-01-21 Thread Ulrich Müller
commit: 2c4c9ff6b730322167ba20fc3f537aa74185723d
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Jan 21 17:37:25 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Jan 21 17:37:25 2023 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=2c4c9ff6

Update copyright years

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 2 +-
 devbook.xsl| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 6021c1e..7ace03b 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -75,7 +75,7 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 https://www.facebook.com/gentoo.org; title="Gentoo on 
Facebook">
 
 
-Copyright (C) 2001-2022 Gentoo Authors
+Copyright (C) 2001-2023 Gentoo Authors
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the
 https://www.gnu.org/licenses/gpl-2.0.html;>GNU 
General Public License, version 2.

diff --git a/devbook.xsl b/devbook.xsl
index f5b3e72..7b6c734 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -661,7 +661,7 @@
   
 
 
-  Copyright (C) 2001-2022 Gentoo Authors
+  Copyright (C) 2001-2023 Gentoo Authors
   
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the



[gentoo-commits] proj/devmanual:master commit in: bin/

2022-04-26 Thread Ulrich Müller
commit: a5bd4baa0047470e2be18ac6404347207562f0a4
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Apr 24 11:42:22 2022 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Tue Apr 26 04:37:23 2022 +
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  laumann.xyz>
Signed-off-by: Ulrich Müller  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:\([^<>]*\):\1:g' \
-e 's:\([^<>]*\):\1:g' \
-e 's:\([^<>]*\):\1:g' \
+   -e 's,mailto:[^"]*;>\([^<>]*\),\1,g' \
-e 's:\([^<>]*\):\1:g' \
-e 's:::g' \
-e 's:::g' \



[gentoo-commits] proj/devmanual:master commit in: /, bin/

2022-03-26 Thread Ulrich Müller
commit: e40ff7c7974e62e8be5a7edb4b53f2b3b0954ed7
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Mar 26 19:12:38 2022 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Mar 26 19:12:38 2022 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e40ff7c7

Update copyright years

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 2 +-
 devbook.xsl| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 7274aa2..df759e0 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -75,7 +75,7 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 https://www.facebook.com/gentoo.org; title="Gentoo on 
Facebook">
 
 
-Copyright (C) 2001-2021 Gentoo Authors
+Copyright (C) 2001-2022 Gentoo Authors
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the
 https://www.gnu.org/licenses/gpl-2.0.html;>GNU 
General Public License, version 2.

diff --git a/devbook.xsl b/devbook.xsl
index bf68e9a..9a254a7 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -661,7 +661,7 @@
   
 
 
-  Copyright (C) 2001-2021 Gentoo Authors
+  Copyright (C) 2001-2022 Gentoo Authors
   
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the



[gentoo-commits] proj/devmanual:master commit in: bin/

2021-02-25 Thread Ulrich Müller
commit: 60f8f96ce3fb52a2ebcb8e7e49dd771b1f0f246e
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Feb 25 19:29:00 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Feb 25 19:29:00 2021 +
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  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'
 Toggle navigation
 
 Home
-Eclass 
Reference
 
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-10-26 Thread Ulrich Müller
commit: 7cb71c2f1ff1da24215f40d57732d59ae7b618a4
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Sep 26 19:06:40 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Sep 26 19:06:40 2020 +
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  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,//d;/<\/BODY>/,$d' \
-   -e '/\([^<>]*\):\1:g' \
-e 's:\([^<>]*\):\1:g' \
-e 's:\([^<>]*\):\1:g' \



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-02-27 Thread Ulrich Müller
commit: bc42e92e493db3303e796f058ab512f649c49575
Author: Ulrich Müller  gentoo  org>
AuthorDate: Fri Feb 28 06:57:17 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Feb 28 06:57:17 2020 +
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  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,//d;/<\/BODY>/,$d' \
@@ -151,15 +153,15 @@ for i in "${MANPAGES[@]}"; do
-e 's:::g' \
-e 's:::g' \
-e '/.*\(.*:\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
 
 
 
@@ -180,21 +182,21 @@ installed by emerging app-doc/eclass-manpages.
 EOF
 
 if [[ -n ${NOMAN} ]]; then
-   cat <<- EOF >> "${OUTPUTDIR}"/text.xml
+   cat <<- 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1

This is only a placeholder. If you see this text in the output document,
then the eclass documentation is missing.

EOF
 else
-   echo '' >> "${OUTPUTDIR}"/text.xml
+   echo '' >> "${OUTPUTDIR}"/text.xml || exit 1
for i in $(find "${OUTPUTDIR}" -maxdepth 1 -mindepth 1 -type d | sort); 
do
-   echo "$(basename 
$i)" >> "${OUTPUTDIR}"/text.xml
+   echo "$(basename 
$i)" >> "${OUTPUTDIR}"/text.xml || exit 1
done
-   echo '' >> "${OUTPUTDIR}"/text.xml
+   echo '' >> "${OUTPUTDIR}"/text.xml || exit 1
 fi
 
-cat << EOF >> ${OUTPUTDIR}/text.xml
+cat << 'EOF' >> "${OUTPUTDIR}"/text.xml || exit 1
 
 
 



[gentoo-commits] proj/devmanual:master commit in: /, bin/

2020-02-27 Thread Ulrich Müller
commit: 2b33c9a170b122b6fd4ff33718698b25baaca889
Author: Ulrich Müller  gentoo  org>
AuthorDate: Tue Feb 25 16:27:04 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Feb 28 06:25:01 2020 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=2b33c9a1

bin/gen-eclass-html.sh: Use en-dash in page title.

For consistency with devbook.xsl. The literal character is visually
indistinguishable from other dashes when using a fixed-width font,
therefore replace it by an  escape.

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 2 +-
 devbook.xsl| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index ed43090..88f05a0 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -10,7 +10,7 @@ IFS='' read -r -d '' HEADER << 'EOF'
 
 

-   @TITLE@ - Gentoo Development Guide
+   @TITLE@  Gentoo Development Guide


https://assets.gentoo.org/tyrian/bootstrap.min.css; 
rel="stylesheet" media="screen">

diff --git a/devbook.xsl b/devbook.xsl
index 0fd8766..69a3b9a 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -452,7 +452,7 @@
 
 
 
-   – Gentoo 
Development Guide
+Gentoo 
Development Guide
   
   
   



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-02-27 Thread Ulrich Müller
commit: e01ceaed422f53a782300feaebf252773e78c2e4
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Feb 27 18:10:17 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Feb 28 06:17:47 2020 +
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  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.
+
+ -ndo not build anything, only create a placeholder index
+ -hdisplay 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 app-doc/eclass-manpages.
 
 Contents
 
-
 EOF
 
-for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
-   echo "$(basename 
$i)" >> ${OUTPUTDIR}/text.xml
-done
+if [[ -n ${NOMAN} ]]; then
+   cat <<- EOF >> "${OUTPUTDIR}"/text.xml
+   
+   This is only a placeholder. If you see this text in the output document,
+   then the eclass documentation is missing.
+   
+   EOF
+else
+   echo '' >> "${OUTPUTDIR}"/text.xml
+   for i in $(find "${OUTPUTDIR}" -maxdepth 1 -mindepth 1 -type d | sort); 
do
+   echo "$(basename 
$i)" >> "${OUTPUTDIR}"/text.xml
+   done
+   echo '' >> "${OUTPUTDIR}"/text.xml
+fi
 
 cat << EOF >> ${OUTPUTDIR}/text.xml
-
 
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-02-13 Thread Ulrich Müller
commit: f6a47cf16af9ff5ef48253d85fdac670a4a64c01
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Feb 13 12:24:58 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Feb 13 12:24:58 2020 +
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  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'
 
 Toggle navigation
 
-  Home
-  Eclass 
Reference
+Home
+Eclass 
Reference
 
 
-Master IndexEclass Reference
+
+
+Master Index
+Eclass Reference
+
+
+
 
 EOF
 



[gentoo-commits] proj/devmanual:master commit in: bin/, /

2020-02-02 Thread Ulrich Müller
commit: d09825a450135cfef920f6e9a426ff4d2c7a4fe1
Author: Ulrich Müller  gentoo  org>
AuthorDate: Tue Jan 28 19:39:18 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Feb  2 23:59:53 2020 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d09825a4

devbook.xsl: Move all header parts into the header element. Add main.

This applies to bin/gen-eclass-html.sh as well.

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh |  7 +++---
 devbook.xsl| 64 ++
 2 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 84a46fc..883c787 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -47,12 +47,13 @@ IFS='' read -r -d '' HEADER << 'EOF'
   Home
   Eclass 
Reference
 
-Master 
IndexEclass 
Reference
-   
+
+Master IndexEclass Reference
+
 EOF
 
 IFS='' read -r -d '' FOOTER << 'EOF'
-
+
 
 
 

diff --git a/devbook.xsl b/devbook.xsl
index 50315d1..be30022 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -542,48 +542,50 @@
 
   
   
-  
-
-
-  
+
+  
+  
+
+  
 
   
 
   
-
-  
-  
-  
-
-  
-
+
+
+  
+
+  
   x
   Search Results
-
-
-  No results found.
-
-
-  Close
+  
+  
+No results found.
+  
+  
+Close
+  
 
   
 
-  
-  
-
-  
-
-  
-
-
-  
-
+
+  
+
+  
+
+  
+  
+
+  
+
   
 
-  
-  
-
-  
+  
+  
+
+  
+
+  
   
 
   



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-02-02 Thread Ulrich Müller
commit: 631558f7a3726f06fafe99f43b46abae0872cfa2
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Feb  2 23:47:25 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Feb  2 23:47:25 2020 +
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  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'
 
 
 
-
+
 https://assets.gentoo.org/tyrian/site-logo.svg; type="image/svg+xml">https://assets.gentoo.org/tyrian/site-logo.png; alt="Gentoo Linux 
Logo">Development Guide
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-01-29 Thread Ulrich Müller
commit: d71cc8025960c1676a42ecc7f5efdc8252c8923b
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Jan 29 17:59:50 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Jan 29 17:59:50 2020 +
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  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



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-01-27 Thread Ulrich Müller
commit: 7dad67e1d70319bc3a4b06dd51e0ab9309b0272d
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Jan 27 20:54:05 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Jan 27 20:54:05 2020 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7dad67e1

bin/gen-eclass-html.sh: Whitespace.

Signed-off-by: Ulrich Müller  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
 
 
 Eclass Reference
-
 
+
 
 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 app-doc/eclass-manpages.
 
+
 
 
 



[gentoo-commits] proj/devmanual:master commit in: /, bin/

2020-01-22 Thread Ulrich Müller
commit: 24bc25cc1e80f77924fabf5bbe7e4afeb1980716
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Jan 22 18:06:39 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Jan 22 18:06:39 2020 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=24bc25cc

devbook.xsl: Load devmanual.css stylesheet last.

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 2 +-
 devbook.xsl| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 6ecfe9c..40f8490 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -11,11 +11,11 @@ IFS='' read -r -d '' HEADER << 'EOF'
 

@TITLE@ - Gentoo Development Guide
-   


https://assets.gentoo.org/tyrian/bootstrap.min.css; 
rel="stylesheet" media="screen">
https://assets.gentoo.org/tyrian/tyrian.min.css; 
rel="stylesheet" media="screen">
+   
https://www.gentoo.org/favicon.ico; 
type="image/x-icon">
 
 

diff --git a/devbook.xsl b/devbook.xsl
index 8d8d082..2bd73d8 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -449,11 +449,11 @@
   ../
 
   
-  
   
   
   https://assets.gentoo.org/tyrian/bootstrap.min.css; 
rel="stylesheet" media="screen" />
   https://assets.gentoo.org/tyrian/tyrian.min.css; 
rel="stylesheet" media="screen" />
+  
   https://www.gentoo.org/favicon.ico; 
type="image/x-icon" />
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-01-18 Thread Ulrich Müller
commit: a127f6386c36615333f071d98128b66875551f33
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Jan 18 08:31:55 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Jan 18 08:31:55 2020 +
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  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:\([^<>]*\):\1:g' \
-e 's:\([^<>]*\):\1:g' \
-e 's:\([^<>]*\):\1:g' \
+   -e 's:::g' \
+   -e 's:::g' \
+   -e '/.*\(.*:\2 
ID=\1>:}' \
>> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
 done



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-01-16 Thread Ulrich Müller
commit: e1543d5e7ac5b0244b43feeb9aca44ca1b33604c
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jan 16 07:45:45 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jan 16 18:49:09 2020 +
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  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 app-doc/eclass-manpages.
 EOF
 
 for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
-   echo "$(basename $i) 
Reference" >> ${OUTPUTDIR}/text.xml
+   echo "$(basename 
$i)" >> ${OUTPUTDIR}/text.xml
 done
 
 cat << EOF >> ${OUTPUTDIR}/text.xml



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-01-12 Thread Ulrich Müller
commit: da17f1301a5e7c5f9cfa6fa1d202ae78c8f6bb3b
Author: Ulrich Müller  gentoo  org>
AuthorDate: Fri Jan 10 00:33:51 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Jan 12 09:21:26 2020 +
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  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
 nor any other logical markup would be a good replacement,
so simply remove it.

Signed-off-by: Ulrich Müller  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,//d;/<\/BODY>/,$d' \
-e '/\([^<>]*\):\1:g' \
-e 's:\([^<>]*\):\1:g' \
+   -e 's:\([^<>]*\):\1:g' \
+   -e 's:\([^<>]*\):\1:g' \
>> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
 done



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-01-09 Thread Ulrich Müller
commit: ab9f4f86f29c6bdb8aea37bf5c86e74a2c605146
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jan  9 19:53:37 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jan  9 21:24:37 2020 +
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  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,//d;/<\/BODY>/,$d' \
-e '/\([^<>]*\):\1:g' \
+   -e 's:\([^<>]*\):\1:g' \
>> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
 done



[gentoo-commits] proj/devmanual:master commit in: bin/

2020-01-02 Thread Göktürk Yüksek
commit: bf62b78f01dd8676403b03af942c42a56a145625
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Thu Jan  2 23:56:26 2020 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Jan  2 23:56:26 2020 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=bf62b78f

bin/build_search_documents.py:  is a terminal node, not intermediary

Process  as a terminal node.

Reported-by: Ulrich Müller  gentoo.org>
Signed-off-by: Göktürk Yüksek  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),



[gentoo-commits] proj/devmanual:master commit in: bin/, ebuild-writing/functions/src_unpack/rpm-sources/, /, ...

2020-01-02 Thread Ulrich Müller
commit: bafa084b31225e658dc4e056f9a5d639b2be507e
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jan  2 12:54:37 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jan  2 12:54:37 2020 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=bafa084b

Update copyright years.

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh   |  2 +-
 devbook.xsl  |  2 +-
 ebuild-writing/common-mistakes/text.xml  |  2 +-
 ebuild-writing/eapi/text.xml |  6 +++---
 ebuild-writing/file-format/text.xml  |  2 +-
 ebuild-writing/functions/src_unpack/rpm-sources/text.xml |  2 +-
 ebuild-writing/users-and-groups/text.xml |  4 ++--
 ebuild-writing/using-eclasses/text.xml   |  2 +-
 eclass-writing/text.xml  |  6 +++---
 quickstart/text.xml  | 10 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index e1f9e1f..26c42e6 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -67,7 +67,7 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 https://www.facebook.com/gentoo.org; title="Gentoo on 
Facebook">
 
 
-Copyright (C) 2001-2019 Gentoo Authors
+Copyright (C) 2001-2020 Gentoo Authors
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the
 https://www.gnu.org/licenses/gpl-2.0.html;>GNU 
General Public License, version 2.

diff --git a/devbook.xsl b/devbook.xsl
index 4b16010..2a5dea2 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -597,7 +597,7 @@
   
 
 
-  Copyright (C) 2001-2019 Gentoo Authors
+  Copyright (C) 2001-2020 Gentoo Authors
   
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the

diff --git a/ebuild-writing/common-mistakes/text.xml 
b/ebuild-writing/common-mistakes/text.xml
index 12e14c1..b0f841a 100644
--- a/ebuild-writing/common-mistakes/text.xml
+++ b/ebuild-writing/common-mistakes/text.xml
@@ -180,7 +180,7 @@ The first two lines must look like this:
 
 
 
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 

diff --git a/ebuild-writing/eapi/text.xml b/ebuild-writing/eapi/text.xml
index cb49e35..7d05b15 100644
--- a/ebuild-writing/eapi/text.xml
+++ b/ebuild-writing/eapi/text.xml
@@ -43,7 +43,7 @@ Most developers prefer to set the EAPI version without 
quotes. However, the PMS
 
 
 
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -118,7 +118,7 @@ src_compile() {

 

-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=1
@@ -517,7 +517,7 @@ DEPEND="

Example:

-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=4

diff --git a/ebuild-writing/file-format/text.xml 
b/ebuild-writing/file-format/text.xml
index 6c199e0..18e5471 100644
--- a/ebuild-writing/file-format/text.xml
+++ b/ebuild-writing/file-format/text.xml
@@ -151,7 +151,7 @@ header.txt in the top directory of the Gentoo 
repository.
 
 
 
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 

diff --git a/ebuild-writing/functions/src_unpack/rpm-sources/text.xml 
b/ebuild-writing/functions/src_unpack/rpm-sources/text.xml
index d597d99..9348350 100644
--- a/ebuild-writing/functions/src_unpack/rpm-sources/text.xml
+++ b/ebuild-writing/functions/src_unpack/rpm-sources/text.xml
@@ -52,7 +52,7 @@ patches. The filename should be 
suse-fetchmail-6.2.5.54.1.ebuild.
 
 
 
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"

diff --git a/ebuild-writing/users-and-groups/text.xml 
b/ebuild-writing/users-and-groups/text.xml
index c556fd9..184f890 100644
--- a/ebuild-writing/users-and-groups/text.xml
+++ b/ebuild-writing/users-and-groups/text.xml
@@ -47,7 +47,7 @@ group ebuilds:
 
 
 
-# Copyright 2019 Gentoo Authors
+# Copyright 2019-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -76,7 +76,7 @@ user ebuilds:
 
 
 
-# Copyright 2019 Gentoo Authors
+# Copyright 2019-2020 Gentoo Authors
 # Distributed under the terms of the GNU 

[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-26 Thread Göktürk Yüksek
commit: 61d0d80f2fc493d08a97bae1e507055015f55788
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Thu Dec 26 22:43:02 2019 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Dec 26 22:43:02 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=61d0d80f

bin/build_search_documents.py: create search documents for , , 

Signed-off-by: Göktürk Yüksek  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),



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-25 Thread Göktürk Yüksek
commit: 1029f9c624e3f3bf252f20197f357cca00a20410
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Thu Dec 26 01:37:23 2019 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Dec 26 01:37:23 2019 +
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  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 '' tag is simply a fancier '-' character
@@ -42,8 +48,8 @@ def stringify_node(parent: ET.Element) -> str:
 # A paragraph typically ends with:
 #   Text\n
 # 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:



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-25 Thread Göktürk Yüksek
commit: 3d16b1e4ad1ec151916d4e1ce78596cafe6dbca1
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Thu Dec 26 00:30:21 2019 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Dec 26 00:30:21 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3d16b1e4

bin/build_search_documents.py: recurse down  and 

Signed-off-by: Göktürk Yüksek  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']:



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-25 Thread Göktürk Yüksek
commit: 10272a92abe137f187074613960ba0b84c5844a3
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Thu Dec 26 00:36:21 2019 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Dec 26 00:36:21 2019 +
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  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),



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-24 Thread Göktürk Yüksek
commit: 412fa6cd47e75ef45b7d472d6c4fbea9dcea5550
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Wed Dec 25 04:33:55 2019 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Wed Dec 25 04:35:59 2019 +
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  gentoo.org>
Signed-off-by: Göktürk Yüksek  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 '' tag is simply a fancier '-' character
 if child.tag == 'd':
 text += '-'



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-20 Thread Ulrich Müller
commit: 1bfa9bda3f10627a9798edfc65472d59bc9ffeba
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Sat Dec 21 04:36:03 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec 21 05:18:16 2019 +
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
"SLOT, :SLOT" being parsed as "SLOT,:SLOT",
removing the white space between ',' and ':'.

Signed-off-by: Göktürk Yüksek  gentoo.org>
Signed-off-by: Ulrich Müller  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:
+#   \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 '' 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
+# 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:



[gentoo-commits] proj/devmanual:master commit in: bin/, /

2019-12-19 Thread Göktürk Yüksek
commit: bcca1643a8a6704b26e2bfb990c2e830f0006ff9
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Thu Dec 19 04:05:23 2019 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Dec 19 20:57:56 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=bcca1643

rename search_index.py to build_search_documents.py, and move it to bin/

Executables go to bin/

Also, the name is misleading. The script does not build the search
index, it builds the documents for the search engine to create the
index.

Signed-off-by: Göktürk Yüksek  gentoo.org>

 Makefile | 2 +-
 search_index.py => bin/build_search_documents.py | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 4e591ac..aa29c26 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ prereq:
 # updating it, we pass it the names of ALL prerequisites ($^) and not
 # just the names of the ones that are new ($?).
 documents.js: $(XMLS)
-   ./search_index.py $^ > _documents.js
+   ./bin/build_search_documents.py $^ > _documents.js
mv _documents.js documents.js
 
 %.png : %.svg

diff --git a/search_index.py b/bin/build_search_documents.py
similarity index 100%
rename from search_index.py
rename to bin/build_search_documents.py



[gentoo-commits] proj/devmanual:master commit in: /, bin/

2019-12-19 Thread Göktürk Yüksek
commit: 926e0d0855afa40f5dcbc16b1b7c66187afd7d73
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Tue Dec 10 02:08:12 2019 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Dec 19 20:58:02 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=926e0d08

Rewrite the search functionality and extend the coverage

The current script only indexes the first  in a text.xml, and
sometimes only partially if the text is interrupted by another tag
such as .

Modify build_search_documents.py such that:
 - It recursively traverses from chapter all the way down to
   subsubsection
 - Each , , ,  is indexed separately
 - In the search results, the match entry will have the title in the
   form "Chapter[ -> Section[ -> Subsection[ -> Subsubsection]]]"

Modify search.js such that:
 - The ref returned for a match is its index into "documents" array,
   which makes it possible to retrieve the document in O(1).

Signed-off-by: Göktürk Yüksek  gentoo.org>

 bin/build_search_documents.py | 112 --
 search.js |  22 -
 2 files changed, 108 insertions(+), 26 deletions(-)

diff --git a/bin/build_search_documents.py b/bin/build_search_documents.py
index 9af2753..3816fdb 100755
--- a/bin/build_search_documents.py
+++ b/bin/build_search_documents.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 # Copyright 2019 Gentoo Authors
 # Distributed under the terms of the GNU GPL version 2 or later
 import json
@@ -6,19 +6,103 @@ import os.path
 import sys
 import xml.etree.ElementTree as ET
 
-files = sys.argv[1:]
-documents = []
-url_root = 'https://devmanual.gentoo.org/'
 
-for f in files:
-tree = ET.parse(f)
-root = tree.getroot()
-for chapter in root.findall('chapter'):
+def stringify_node(parent: ET.Element) -> str:
+"""Flatten this node and its immediate children to a string.
+
+Combine the text and tail of this node, and any of its immediate
+children, if there are any, into a flat string. The tag  is a
+special case that resolves to the dash ('-') character.
+
+Keyword arguments:
+parent -- the node to convert to a string
+
+"""
+if parent.text:
+text = parent.text.lstrip()
+else:
+text = str()
+
+for child in parent.getchildren():
+# The '' tag is simply a fancier '-' character
+if child.tag == 'd':
+text += '-'
+if child.text:
+text += child.text.lstrip()
+if child.tail:
+text += child.tail.rstrip()
+
+text += parent.tail.rstrip()
+return text.replace('\n', ' ')
+
+
+def process_node(documents: list, node: ET.Element, name: str, url: str) -> 
None:
+"""Recursively process a given node and its children based on tag values.
+
+For the top level node , extract the title and recurse
+down to the children.
+For the intermediary nodes with titles, such as , update
+the search result title and url, and recurse down.
+For the terminal nodes, such as , convert the contents of the
+node to a string, and add it to the search documents.
+
+Keyword arguments:
+documents -- the search documents array
+node -- the node to process
+name -- the title to display for the search term match
+url -- the url for the search term match in the document
+
+"""
+if node.tag == 'chapter':
+name = stringify_node(node.find('title'))
+
+for child in node:
+process_node(documents, child, name, url)
+elif node.tag in ['section', 'subsection', 'subsubsection']:
+title = stringify_node(node.find('title'))
+name += ' -> ' + title
+url = "{url_base}#{anchor}".format(
+url_base=url.split('#')[0],
+anchor=title.lower().replace(' ', '-'))
+
+for child in node:
+process_node(documents, child, name, url)
+elif node.tag in ['body', 'guide']:
+for child in node:
+process_node(documents, child, name, url)
+elif node.tag in ['p', 'important', 'note', 'warning']:
+text = stringify_node(node)
+
+documents.append({'id': len(documents),
+  'name': name,
+  'text': text,
+  'url': url})
+else:
+pass
+
+
+def main(pathnames: list) -> None:
+"""The entry point of the script.
+
+Keyword arguments:
+pathnames -- a list of path names to process in sequential order
+"""
+url_root = 'https://devmanual.gentoo.org/'
+documents = []
+
+for path in pathnames:
+tree = ET.parse(path)
+root = tree.getroot()
+
 try:
-documents.append({"name": chapter.find('title').text,
-"text": chapter.find('body').find('p').text,
- "url": url_root + os.path.dirname(f) + '/'})
-except AttributeError:
-pass
+url = url_root + os.path.dirname(path) + 

[gentoo-commits] proj/devmanual:master commit in: /, bin/

2019-12-15 Thread Ulrich Müller
commit: 0563026d23083cf20fc446d5ac6f77dcdda1ff3d
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Dec 16 06:43:11 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Dec 16 06:43:11 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0563026d

devbook.xsl: Add html lang attribute.

The W3 Validator wants to have this. Also add a newline after the
doctype declaration.

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 3 ++-
 devbook.xsl| 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index fe17064..e1f9e1f 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -6,7 +6,8 @@
 OUTPUTDIR="eclass-reference"
 
 IFS='' read -r -d '' HEADER << 'EOF'
-
+
+
 

@TITLE@ - Gentoo Development Guide

diff --git a/devbook.xsl b/devbook.xsl
index aa93b75..96a0508 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -444,7 +444,8 @@
 
   
 !DOCTYPE html
-
+
+
 
– Gentoo 
Development Guide
   



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-15 Thread Ulrich Müller
commit: aec348b31a6a4785dc2727abcc2afff6f857dfea
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 15 17:25:59 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Dec 15 17:25:59 2019 +
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  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,//d;/<\/BODY>/,$d' \
-e '/\([^<>]*\):\1:g' \
>> "${FINAL}"



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-15 Thread Ulrich Müller
commit: 1a48b2360b0be82bd6f2c828142859235c44a0b3
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 15 17:21:00 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Dec 15 17:21:00 2019 +
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  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 "/:=../\1/index.html>:" \
--e "/<\/BODY>/d" -e "/<\/HTML>/d"  \
--e "/:=../\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 '/\([^<>]*\):\1:g' \
+   >> "${FINAL}"
echo -n "${FOOTER}" >> "${FINAL}"
 done
 



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-15 Thread Ulrich Müller
commit: c8db1e8bc7da8bd7e873db5dd8f7718cc3c69908
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 15 17:10:36 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Dec 15 17:10:36 2019 +
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  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'
+
+
+   
+   @TITLE@ - Gentoo Development Guide
+   
+   
+   
+   https://assets.gentoo.org/tyrian/bootstrap.min.css; 
rel="stylesheet" media="screen">
+   https://assets.gentoo.org/tyrian/tyrian.min.css; 
rel="stylesheet" media="screen">
+   https://www.gentoo.org/favicon.ico; 
type="image/x-icon">
+
+
+
+
+https://get.gentoo.org/; role="button" class="btn get-gentoo"> Get Gentoo!
+ gentoo.org sites 
+https://www.gentoo.org/; title="Main Gentoo website"> gentoo.org
+https://wiki.gentoo.org/; title="Find and contribute 
documentation"> Wiki
+https://bugs.gentoo.org/; title="Report issues and find common 
issues"> Bugs
+https://forums.gentoo.org/; title="Discuss with the 
community"> Forums
+https://packages.gentoo.org/; title="Find software for your 
Gentoo"> Packages
+
+https://planet.gentoo.org/; title="Find out what's going on in 
the developer community"> Planet
+https://archives.gentoo.org/; title="Read up on past 
discussions"> Archives
+https://sources.gentoo.org/; title="Browse our source code"> Sources
+
+https://infra-status.gentoo.org/; title="Get updates on the 
services provided by Gentoo"> Infra 
Status
+
+
+
+
+https://assets.gentoo.org/tyrian/site-logo.svg; type="image/svg+xml">https://assets.gentoo.org/tyrian/site-logo.png; alt="Gentoo Linux 
Logo">Development Guide
+
+
+
+Toggle navigation
+
+  Home
+  Eclass 
Reference
+
+Master 
IndexEclass 
Reference
+   
+EOF
+
 IFS='' read -r -d '' FOOTER << 'EOF'
 
 
@@ -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}
-
-
-   
-   $BASENAME - Gentoo Development Guide
-   
-   
-   
-   https://assets.gentoo.org/tyrian/bootstrap.min.css; 
rel="stylesheet" media="screen">
-   https://assets.gentoo.org/tyrian/tyrian.min.css; 
rel="stylesheet" media="screen">
-   https://www.gentoo.org/favicon.ico; 
type="image/x-icon">
-
-
-
-
-https://get.gentoo.org/; role="button" class="btn get-gentoo"> Get Gentoo!
- gentoo.org sites 
-https://www.gentoo.org/; title="Main Gentoo website"> gentoo.org
-https://wiki.gentoo.org/; title="Find and contribute 
documentation"> Wiki
-https://bugs.gentoo.org/; title="Report issues and find common 
issues"> Bugs
-https://forums.gentoo.org/; title="Discuss with the 
community"> Forums
-https://packages.gentoo.org/; title="Find software for your 
Gentoo"> Packages
-
-https://planet.gentoo.org/; title="Find out what's going on in 
the developer community"> Planet
-https://archives.gentoo.org/; title="Read up on past 
discussions"> Archives
-https://sources.gentoo.org/; title="Browse our source code"> Sources
-
-https://infra-status.gentoo.org/; title="Get updates on the 
services provided by Gentoo"> Infra 
Status
-
-
-
-
-https://assets.gentoo.org/tyrian/site-logo.svg; type="image/svg+xml">https://assets.gentoo.org/tyrian/site-logo.png; alt="Gentoo Linux 
Logo">Development Guide
-
-
-
-Toggle navigation
-
-  Home
-  Eclass 
Reference
-
-Master 
IndexEclass 
Reference
-   
-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 "/:=../\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)



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-14 Thread Ulrich Müller
commit: b92472808e87a833e42fcbaee24f9ffaac012d66
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Dec 14 13:16:22 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec 14 13:16:22 2019 +
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  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'
 Copyright (C) 2001-2019 Gentoo Authors
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the
-https://creativecommons.org/licenses/by-sa/4.0/;>Creative Commons 
Attribution-ShareAlike 4.0 International License.
+https://www.gnu.org/licenses/gpl-2.0.html;>GNU 
General Public License, version 2.
 The https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html;>Gentoo
 Name and Logo Usage Guidelines apply.
   
 



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-14 Thread Ulrich Müller
commit: 6733a4e881f3fb820cbf6d2745f4c81c6fb0afbc
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Dec 14 11:59:42 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec 14 11:59:42 2019 +
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  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
 
 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 app-portage/eclass-manpages.
+installed by emerging app-doc/eclass-manpages.
 
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/, /

2019-12-14 Thread Ulrich Müller
commit: eb3d58f37c01096da99ae1b72f0e26e1036ae4c1
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Dec 14 10:46:59 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec 14 10:46:59 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=eb3d58f3

devbook.xsl, bin/gen-eclass-html.sh: Drop empty list item.

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 1 -
 devbook.xsl| 1 -
 2 files changed, 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index e7a72ab..e41c3df 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -19,7 +19,6 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 
 http://twitter.com/gentoo; title="@Gentoo on Twitter">
 https://www.facebook.com/gentoo.org; title="Gentoo on 
Facebook">
-
 
 
 Copyright (C) 2001-2019 Gentoo Authors

diff --git a/devbook.xsl b/devbook.xsl
index 63ff219..aa93b75 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -566,7 +566,6 @@
   
 http://twitter.com/gentoo; title="@Gentoo on 
Twitter">
 https://www.facebook.com/gentoo.org; 
title="Gentoo on Facebook">
-
   
 
 



[gentoo-commits] proj/devmanual:master commit in: /, bin/

2019-12-14 Thread Ulrich Müller
commit: 12fb6e610b2ed3f486ff3a6eb397f5eae0811e5d
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Dec 11 10:02:20 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Dec 11 10:02:20 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=12fb6e61

devbook.xsl: Support class="list-group" in  element.

This replaces , which was only used for the list of
eclasses. Remove  which was unused.

Update devbook.dtd and bin/gen-eclass-html.sh accordingly.

Generated output in eclass-reference/index.html is identical as
before, except for an (intentionally) removed empty line before the
closing .

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh |  8 
 devbook.dtd|  9 -
 devbook.xsl| 24 +++-
 3 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 9705d04..e7a72ab 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -135,16 +135,16 @@ installed by emerging app-portage/eclass-manpages.
 
 Contents
 
-
+
 EOF
 
 for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
-   echo "$(basename $i) 
Reference" >> ${OUTPUTDIR}/text.xml
+   echo "$(basename $i) 
Reference" >> ${OUTPUTDIR}/text.xml
 done
 
 cat << EOF >> ${OUTPUTDIR}/text.xml
-
-
+
+
 
 
 

diff --git a/devbook.dtd b/devbook.dtd
index 96d1c9d..dac1815 100644
--- a/devbook.dtd
+++ b/devbook.dtd
@@ -5,8 +5,7 @@
 
 
 
+|figure|table|ul|ol|dl">
 
 
 
@@ -75,7 +74,10 @@
 align (left|center|right) "left">
 
 
+
+
 
+
 
 
 
@@ -83,9 +85,6 @@
 
 
 
-
-
-
 
 
 

diff --git a/devbook.xsl b/devbook.xsl
index cadd975..94cbf96 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -204,15 +204,21 @@
   
 
   
-
-  
-
-  
-list-group-item
-  
-
-  
-list-group-item
+
+  
+
+  
+
+  list-group-item
+
+
+  
+
+  
+  
+
+  
+
   
 
   



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-12-09 Thread Ulrich Müller
commit: 22859187debae11a52db7051f03965418c04a0d1
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Dec  4 17:29:54 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Dec  8 11:32:05 2019 +
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  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
 
 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 app-portage/eclass-manpages.
+installed by emerging app-portage/eclass-manpages.
 
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/, appendices/contributing/, /

2019-12-02 Thread Ulrich Müller
commit: 6a670a59ec76dd21871c4846f39e3a4650a983a8
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Nov 28 13:21:57 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Nov 29 09:29:08 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6a670a59

Relicense the devmanual under CC-BY-SA-4.0.

Bug: https://bugs.gentoo.org/558732#c10
Signed-off-by: Ulrich Müller  gentoo.org>

 LICENSE  | 776 +--
 README.md|   2 +-
 appendices/contributing/text.xml |   4 +-
 bin/gen-eclass-html.sh   |   2 +-
 devbook.xsl  |   2 +-
 5 files changed, 427 insertions(+), 359 deletions(-)

diff --git a/LICENSE b/LICENSE
index c90487c..4681ab8 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,359 +1,427 @@
-Creative Commons Legal Code
+Attribution-ShareAlike 4.0 International
 
-Attribution-ShareAlike 3.0 Unported
+===
 
-CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
-LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
-ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
-INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
-REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
-DAMAGES RESULTING FROM ITS USE.
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
 
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+   wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More considerations
+ for the public:
+   wiki.creativecommons.org/Considerations_for_licensees
+
+===
+
+Creative Commons Attribution-ShareAlike 4.0 International Public
 License
 
-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
-COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
-COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
-AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
-
-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
-TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
-BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
-CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND

[gentoo-commits] proj/devmanual:master commit in: bin/

2019-11-07 Thread Brian Evans
commit: 6c930dc94691fd01d5d5d5096c8ab92e66a40064
Author: Brian Evans  gentoo  org>
AuthorDate: Thu Nov  7 15:05:10 2019 +
Commit: Brian Evans  gentoo  org>
CommitDate: Thu Nov  7 15:05:10 2019 +
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  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'
 
 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

 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 "/:=../\1/index.html>:" \
 -e "/<\/BODY>/d" -e "/<\/HTML>/d"  \
 -e "/:=../\1/\index.html>:" >> 
${TMP}



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-11-07 Thread Brian Evans
commit: 1c4eb888a7745e793e34f34dbc741cb04a70e204
Author: Brian Evans  gentoo  org>
AuthorDate: Thu Nov  7 14:08:42 2019 +
Commit: Brian Evans  gentoo  org>
CommitDate: Thu Nov  7 14:08:42 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=1c4eb888

bin/gen-eclass-html.sh: Fix BASENAME test

Signed-off-by: Brian Evans  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"



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-08-25 Thread Ulrich Müller
commit: 9df1efd58647227d1371a4089b6ebdee599fdf4d
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Aug 25 08:43:21 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sun Aug 25 08:43:21 2019 +
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  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"



[gentoo-commits] proj/devmanual:master commit in: bin/, /

2019-06-11 Thread Ulrich Müller
commit: 3d08cb6dbfaf429219ad62c9a2ca3ceb2399f29f
Author: Ulrich Müller  gentoo  org>
AuthorDate: Tue Jun 11 10:40:12 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Tue Jun 11 10:40:12 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3d08cb6d

Update copyright line in footer to "Gentoo Authors"

Signed-off-by: Ulrich Müller  gentoo.org>

 bin/gen-eclass-html.sh | 2 +-
 devbook.xsl| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 7897f68..db61319 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -22,7 +22,7 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 
 
 
-Copyright (C) 2001-2019 Gentoo Foundation, Inc.
+Copyright (C) 2001-2019 Gentoo Authors
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the
 http://creativecommons.org/licenses/by-sa/3.0/;>Creative Commons 
Attribution-ShareAlike 3.0 Unported License.

diff --git a/devbook.xsl b/devbook.xsl
index c25c82c..8fba56c 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -555,7 +555,7 @@
   
 
 
-  Copyright (C) 2001-2019 Gentoo Foundation, 
Inc.
+  Copyright (C) 2001-2019 Gentoo Authors
   
 Gentoo is a trademark of the Gentoo Foundation, Inc.
 The text of this document is distributed under the



[gentoo-commits] proj/devmanual:master commit in: bin/, /

2019-04-20 Thread Brian Evans
commit: 0560e898971b8e26c945dc3b0c4e8185249daa1f
Author: Brian Evans  gentoo  org>
AuthorDate: Fri Apr 19 13:14:46 2019 +
Commit: Brian Evans  gentoo  org>
CommitDate: Fri Apr 19 13:14:46 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0560e898

Remove defunct Google+

Signed-off-by: Brian Evans  gentoo.org>

 bin/gen-eclass-html.sh | 2 +-
 devbook.xsl| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 65b70f0..7897f68 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -18,8 +18,8 @@ IFS='' read -r -d '' FOOTER << 'EOF'
 
 
 http://twitter.com/gentoo; title="@Gentoo on Twitter">
-https://plus.google.com/+Gentoo; title="+Gentoo on Google+">
 https://www.facebook.com/gentoo.org; title="Gentoo on 
Facebook">
+
 
 
 Copyright (C) 2001-2019 Gentoo Foundation, Inc.

diff --git a/devbook.xsl b/devbook.xsl
index 4a47b6b..c25c82c 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -550,8 +550,8 @@
 
   
 http://twitter.com/gentoo; title="@Gentoo on 
Twitter">
-https://plus.google.com/+Gentoo; title="+Gentoo 
on Google+">
 https://www.facebook.com/gentoo.org; 
title="Gentoo on Facebook">
+
   
 
 



[gentoo-commits] proj/devmanual:master commit in: bin/

2019-03-22 Thread Brian Evans
commit: b6b4d4ed8430f37e3b809096be1ab3d99ce7fe05
Author: Brian Evans  gentoo  org>
AuthorDate: Fri Mar 22 19:45:43 2019 +
Commit: Brian Evans  gentoo  org>
CommitDate: Fri Mar 22 19:45:43 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b6b4d4ed

Reorder title header of generated pages

Signed-off-by: Brian Evans  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
 
 

-   Gentoo Development Guide: $BASENAME
+   $BASENAME - Gentoo Development Guide






[gentoo-commits] proj/devmanual:master commit in: /, bin/

2019-03-22 Thread Brian Evans
commit: 534ad84860ac80c3984bf96a8b31a3c8c495b403
Author: Brian Evans  gentoo  org>
AuthorDate: Fri Mar 22 18:12:47 2019 +
Commit: Brian Evans  gentoo  org>
CommitDate: Fri Mar 22 18:12:47 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=534ad848

Add list-group attributes to some items

Signed-off-by: Brian Evans  gentoo.org>

 bin/gen-eclass-html.sh |  6 +++---
 devbook.xsl| 21 +++--
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index e87f60f..f97f2c7 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -119,16 +119,16 @@ installed by emerging app-porta
 
 Contents
 
-
+
 EOF
 
 for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
-   echo "$(basename $i) Reference" >> ${OUTPUTDIR}/text.xml
+   echo "$(basename $i) 
Reference" >> ${OUTPUTDIR}/text.xml
 done
 
 cat << EOF >> ${OUTPUTDIR}/text.xml
 
-
+
 
 
 

diff --git a/devbook.xsl b/devbook.xsl
index 2c8e506..4a47b6b 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -205,6 +205,14 @@
 
   
 
+  
+list-group-item
+  
+
+  
+list-group-item
+  
+
   
   
 
@@ -279,6 +287,7 @@
   
 
   
+
 
   
   

[gentoo-commits] proj/devmanual:master commit in: /, bin/

2019-03-22 Thread Brian Evans
commit: d541c4c23305121c02ed18668b6019e86cfc2404
Author: Brian Evans  gentoo  org>
AuthorDate: Fri Mar 22 13:19:16 2019 +
Commit: Brian Evans  gentoo  org>
CommitDate: Fri Mar 22 13:19:16 2019 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=d541c4c2

Create script for eclass-reference

This was previously held in infra but contains no identifying information

Bug: https://bugs.gentoo.org/536654
Signed-off-by: Brian Evans  gentoo.org>

 .gitignore |   1 +
 bin/gen-eclass-html.sh | 135 +
 2 files changed, 136 insertions(+)

diff --git a/.gitignore b/.gitignore
index b364f07..720d4d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 *.html
 *.png
+eclass-reference/

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
new file mode 100755
index 000..e87f60f
--- /dev/null
+++ b/bin/gen-eclass-html.sh
@@ -0,0 +1,135 @@
+#!/bin/bash
+
+# pre1) OOB: The host needs to emerge eclass-manpages on a daily basis.
+# This script should be run before the make operation is performed
+
+OUTPUTDIR="eclass-reference"
+
+IFS='' read -r -d '' FOOTER << 'EOF'
+
+
+
+
+
+Questions or comments?
+  Please feel free to https://www.gentoo.org/inside-gentoo/contact/;>contact us.
+
+
+
+
+http://twitter.com/gentoo; title="@Gentoo on Twitter">
+https://plus.google.com/+Gentoo; title="+Gentoo on Google+">
+https://www.facebook.com/gentoo.org; title="Gentoo on 
Facebook">
+
+
+Copyright (C) 2001-2019 Gentoo Foundation, Inc.
+Gentoo is a trademark of the Gentoo Foundation, Inc.
+The text of this document is distributed under the
+http://creativecommons.org/licenses/by-sa/3.0/;>Creative Commons 
Attribution-ShareAlike 3.0 Unported License.
+The https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html;>Gentoo
 Name and Logo Usage Guidelines apply.
+  
+
+
+https://assets.gentoo.org/tyrian/jquery.min.js";>https://assets.gentoo.org/tyrian/bootstrap.min.js";>
+
+
+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)"
+   DIRNAME="${OUTPUTDIR}/${BASENAME}"
+   TMP="${DIRNAME}/index.html.tmp"
+   FINAL="${DIRNAME}/index.html"
+   [[ -d ${DIRNAME} ]] || mkdir -p ${DIRNAME}
+   # rebuild the man page each time
+   cat << EOF > ${FINAL}
+
+
+   
+   Gentoo Development Guide: $BASENAME
+   
+   
+   
+   https://assets.gentoo.org/tyrian/bootstrap.min.css; 
rel="stylesheet" media="screen">
+   https://assets.gentoo.org/tyrian/tyrian.min.css; 
rel="stylesheet" media="screen">
+   https://www.gentoo.org/favicon.ico; 
type="image/x-icon">
+
+
+
+
+https://get.gentoo.org/; role="button" class="btn get-gentoo"> Get Gentoo!
+ gentoo.org sites 
+https://www.gentoo.org/; title="Main Gentoo website"> gentoo.org
+https://wiki.gentoo.org/; title="Find and contribute 
documentation"> Wiki
+https://bugs.gentoo.org/; title="Report issues and find common 
issues"> Bugs
+https://forums.gentoo.org/; title="Discuss with the 
community"> Forums
+https://packages.gentoo.org/; title="Find software for your 
Gentoo"> Packages
+
+https://planet.gentoo.org/; title="Find out what's going on in 
the developer community"> Planet
+https://archives.gentoo.org/; title="Read up on past 
discussions"> Archives
+https://sources.gentoo.org/; title="Browse our source code"> Sources
+
+https://infra-status.gentoo.org/; title="Get updates on the 
services provided by Gentoo"> Infra 
Status
+
+
+
+
+https://assets.gentoo.org/tyrian/site-logo.svg; type="image/svg+xml">https://assets.gentoo.org/tyrian/site-logo.png; alt="Gentoo Linux 
Logo">Development Guide
+
+
+
+Toggle navigation
+
+  Home
+  Eclass 
Reference
+
+Master 
IndexEclass 
Reference
+   
+EOF
+# generate html pages and fix hyperlinks for eclass and ebuild man pages
+/bin/bunzip2 -c $i | /usr/bin/man2html -r - | \
+sed -e "/:=../\1/index.html>:" \
+-e "/<\/BODY>/d" -e "/<\/HTML>/d"  \
+-e "/:=../\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}
+   echo "${FOOTER}" >> ${FINAL}
+done
+
+# Remove old dirs (eclasses that were dropped from the tree)
+find $OUTPUTDIR -mindepth 1 -maxdepth 1 -mtime +1 -exec rm -R {} \;
+
+# build the index, rebuilding it each time
+cat << EOF > $OUTPUTDIR/text.xml
+
+
+
+Eclass Reference
+
+
+
+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 app-portage/eclass-manpages.
+
+
+
+
+Contents
+
+
+EOF
+
+for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
+   echo "$(basename