threads / discuss / 16087

request for pre-generated git.info pages

Subject: request for pre-generated git.info pages

## tl;dr

6 messages between Oct 29, 2008 and Oct 31, 2008.

replies: 5people: 4as markdown or json

Leo Razoumov· Oct 29, 2008, 22:00 UTC · lore

I am an emacs user but with my current setup I have difficulties generating git.info pages. Main Git repo already provides pre-generated man and html documentation in "man" and "html" branches. I would kindly beg to extend this privilege to "info" pages to benefit all the emacs users out there.

--Leo--
Mike Ralphson· Oct 30, 2008, 09:06 UTC · re: Leo Razoumov · lore

Re: request for pre-generated git.info pages

2008/10/29 Leo Razoumov <slonik.az@gmail.com>:
Show 5 quoted lines
> I am an emacs user but with my current setup I have difficulties
> generating git.info pages. Main Git repo already provides
> pre-generated man and html  documentation in "man" and "html"
> branches. I would kindly beg to extend this privilege to "info" pages
> to benefit all the emacs users out there.

Unfortunately I don't have a working asciidoc etc toolchain either (though I will take a look at getting it working on my central git box which is Linux based). As I'm not an emacs or Info user I probably wouldn't know if they were building correctly anyway.

However, if anyone can do the above, I'll be happy to help them get set up to push an 'info' branch to gitbuild.git (http://repo.or.cz/w/git/gitbuild.git).

How often would you want the info pages rebuilt? Just the versions which Junio tags? Or would you only want them built from one branch (e.g. maint)?

Mike
Miklos Vajna· Oct 30, 2008, 09:33 UTC · re: Mike Ralphson · lore

Re: request for pre-generated git.info pages

On Thu, Oct 30, 2008 at 09:06:35AM +0000, Mike Ralphson <mike.ralphson@gmail.com> wrote:
> How often would you want the info pages rebuilt? Just the versions
> which Junio tags? Or would you only want them built from one branch
> (e.g. maint)?

Probably it could be done in a similar way to the html and the man pages (each time master is updated + for tags).

Mike Ralphson· Oct 30, 2008, 12:01 UTC · re: Mike Ralphson · lore

Re: request for pre-generated git.info pages

2008/10/30 Mike Ralphson <mike.ralphson@gmail.com>:
> Unfortunately I don't have a working asciidoc etc toolchain either
> (though I will take a look at getting it working on my central git box
> which is Linux based). As I'm not an emacs or Info user I probably
> wouldn't know if they were building correctly anyway.

The only machine at my disposal with a working Python installation (and I'm afraid I don't feel inclined to install it anywhere else, Python on AIX is painful, and obviously if I was a Python nut, I'd be running mercurial anyway, right?) is my desktop cygwin installation.

At least there obtaining asciidoc was no problem, but I think I'm stuck in some docbook2x dependency hell with lots of twisty turny prerequisities, all alike.

Now deep in a dark cave with a sign saying "Can't locate XML/Handler/SGMLSpl.pm in @INC", which is where my adventure ends. Score 0/100.

So a volunteer would still be appreciated.
Mike
Kalle Olavi Niemitalo· Oct 30, 2008, 23:06 UTC · re: Leo Razoumov · lore

Re: request for pre-generated git.info pages

"Leo Razoumov" <slonik.az@gmail.com> writes:
> I am an emacs user but with my current setup I have difficulties
> generating git.info pages.

This bug in docbook2x 0.8.8 can result in empty *.texi files: http://sourceforge.net/tracker/index.php?func=detail&aid=1912754&group_id=7856&atid=107856 `db2x_teximl' does not honor `--to-stdout'

With docbook2x 0.8.3, I successfully built git.info and gitman.info. However, the Info browser does not recognize cross-references between them. I am playing with some patches to fix those.

Kalle Olavi Niemitalo· Oct 31, 2008, 00:19 UTC · re: Kalle Olavi Niemitalo · lore

Re: request for pre-generated git.info pages

Kalle Olavi Niemitalo <kon@iki.fi> writes:
> However, the Info browser does not recognize cross-references
> between them.  I am playing with some patches to fix those.

This seems to fix it, although the result isn't pretty. Not signed off.

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 62269e3..56e1cf5 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -184,12 +184,12 @@ git.info: user-manual.texi
 
 user-manual.texi: user-manual.xml
 	$(RM) $@+ $@
-	$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
+	$(DOCBOOK2X_TEXI) -s texi.xsl user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
 	mv $@+ $@
 
 gitman.texi: $(MAN_XML) cat-texi.perl
 	$(RM) $@+ $@
-	($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --to-stdout $(xml);)) | \
+	($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) -s texi.xsl --to-stdout $(xml);)) | \
 	$(PERL_PATH) cat-texi.perl $@ >$@+
 	mv $@+ $@
 
diff --git a/Documentation/texi.xsl b/Documentation/texi.xsl
new file mode 100644
index 0000000..5c6f4cd
--- /dev/null
+++ b/Documentation/texi.xsl
@@ -0,0 +1,17 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://docbook2x.sourceforge.net/xmlns/Texi-XML"
+                version="1.0">
+  <!-- docbook2x 0.8.3 recognizes sf.net but not sourceforge.net.  -->
+  <xsl:import href="http://docbook2x.sf.net/latest/xslt/texi/docbook.xsl"/>
+
+  <!-- In a man page, asciidoc.conf expands linkgit to citerefentry.
+       Each man page goes in gitman.texi so ref/@file is not needed.  -->
+  <xsl:template match="citerefentry[starts-with(refentrytitle, 'git')]">
+    <ref node="{refentrytitle}" />
+  </xsl:template>
+
+  <!-- In Git User's Manual, user-manual.conf expands linkgit to ulink.  -->
+  <xsl:template match="ulink[starts-with(@url, 'git') and substring(@url, string-length(@url) - 4) = '.html']">
+    <ref node="{substring(@url, 1, string-length(@url) - 5)}" file="gitman.info" />
+  </xsl:template>
+</xsl:stylesheet>

← back to recent threads