git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Ackermann <th.acker66@arcor.de>
To: th.acker66@arcor.de, git@vger.kernel.org
Cc: th.acker66@arcor.de
Subject: [Patch 5/5] Create pdf from all html files
Date: Sat, 6 Oct 2012 17:58:01 +0200 (CEST)	[thread overview]
Message-ID: <1206625172.269796.1349539081024.JavaMail.ngmail@webmail08.arcor-online.net> (raw)
In-Reply-To: <505841759.269631.1349538675925.JavaMail.ngmail@webmail08.arcor-online.net>

- use wkhtmltopdf to combine all html files into a single pdf file "git-doc.pdf"
- provide make target "fullpdf" to create "git-doc.pdf"

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/.gitignore      |  1 +
 Documentation/Makefile        |  9 +++++++++
 Documentation/footerend.txt   |  4 ++++
 Documentation/footerstart.txt |  7 +++++++
 Documentation/makedocpdf.sh   | 25 +++++++++++++++++++++++++
 Makefile                      |  6 ++++++
 6 files changed, 52 insertions(+)
 create mode 100644 Documentation/footerend.txt
 create mode 100644 Documentation/footerstart.txt
 create mode 100644 Documentation/makedocpdf.sh

diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index d62aebd..fba4730 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -10,3 +10,4 @@ howto-index.txt
 doc.dep
 cmds-*.txt
 manpage-base-url.xsl
+docfiles.txt
diff --git a/Documentation/Makefile b/Documentation/Makefile
index abd27b5..c4c2a30 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -189,6 +189,9 @@ info: git.info gitman.info
 
 pdf: user-manual.pdf
 
+fullpdf: pdf all
+	./makedocpdf.sh
+
 install: install-man
 
 install-man: man
@@ -213,6 +216,10 @@ install-pdf: pdf
 	$(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
 	$(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
 
+install-fullpdf: fullpdf install-pdf
+	$(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
+	$(INSTALL) -m 644 git-doc.pdf $(DESTDIR)$(pdfdir)
+
 install-html: html
 	'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
 
@@ -252,6 +259,8 @@ clean:
 	$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
 	$(RM) *.texi *.texi+ *.texi++ git.info gitman.info
 	$(RM) *.pdf
+	$(RM) docfiles.txt
+	$(RM) RelNotes/*.html
 	$(RM) howto-index.txt howto/*.html doc.dep
 	$(RM) technical/*.html technical/api-index.txt
 	$(RM) $(cmds_txt) *.made
diff --git a/Documentation/footerend.txt b/Documentation/footerend.txt
new file mode 100644
index 0000000..ed16923
--- /dev/null
+++ b/Documentation/footerend.txt
@@ -0,0 +1,4 @@
+    </td>
+  </tr>
+</table>
+</body></html>
diff --git a/Documentation/footerstart.txt b/Documentation/footerstart.txt
new file mode 100644
index 0000000..a2746ef
--- /dev/null
+++ b/Documentation/footerstart.txt
@@ -0,0 +1,7 @@
+<html>
+<head></head>
+<body style="border:0; margin: 0;" onload="subst()">
+<table style="border-top: 1px solid black; width: 100%">
+  <tr>
+    <td class="section"></td>
+    <td style="text-align:center">
diff --git a/Documentation/makedocpdf.sh b/Documentation/makedocpdf.sh
new file mode 100644
index 0000000..fd9f5bb
--- /dev/null
+++ b/Documentation/makedocpdf.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+rm -f git-doc.pdf
+
+cat /dev/null >docfiles.txt
+
+ls gittutorial.html      >>docfiles.txt
+ls gittutorial-2.html    >>docfiles.txt
+ls everyday.html         >>docfiles.txt
+ls gitworkflows.html     >>docfiles.txt
+ls git-*.html            >>docfiles.txt
+ls git[acdghikmnr]*.html >>docfiles.txt
+ls gitweb*.html          >>docfiles.txt
+ls howto-index.html      >>docfiles.txt
+ls howto/*.html          >>docfiles.txt
+ls technical/*.html      >>docfiles.txt
+ls RelNotes/*.html       >>docfiles.txt
+
+cat /dev/null >footer.html
+
+cat footerstart.txt      >>footer.html
+cat ../GIT-VERSION-FILE  >>footer.html
+cat footerend.txt        >> footer.html
+
+cat docfiles.txt | xargs cat | wkhtmltopdf --book --footer-html footer.html --disable-external-links - git-doc.pdf
diff --git a/Makefile b/Makefile
index 8413606..2ddb3c9 100644
--- a/Makefile
+++ b/Makefile
@@ -2485,6 +2485,9 @@ info:
 pdf:
 	$(MAKE) -C Documentation pdf
 
+fullpdf:
+	$(MAKE) -C Documentation fullpdf
+
 XGETTEXT_FLAGS = \
 	--force-po \
 	--add-comments \
@@ -2796,6 +2799,9 @@ install-info:
 install-pdf:
 	$(MAKE) -C Documentation install-pdf
 
+install-fullpdf:
+	$(MAKE) -C Documentation install-fullpdf
+
 quick-install-doc:
 	$(MAKE) -C Documentation quick-install
 
-- 
1.7.11.msysgit.1

  parent reply	other threads:[~2012-10-06 15:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-06 15:51 [Patch 0/5] Create single PDF for all HTML files Thomas Ackermann
2012-10-06 15:53 ` [Patch 1/5] Fix some asciidoc layout problems Thomas Ackermann
2012-10-06 18:39   ` Junio C Hamano
2012-10-06 19:10     ` Jeff King
2012-10-07  8:01     ` Aw: " Thomas Ackermann
2012-10-06 15:55 ` [Patch 2/5] Create html documents for all files in Documentation/technical Thomas Ackermann
2012-10-06 18:45   ` Philip Oakley
2012-10-06 15:55 ` [Patch 3/5] Create html documents for all files in Documentation/RelNotes Thomas Ackermann
2012-10-06 18:48   ` Philip Oakley
2012-10-06 19:21   ` Jeff King
2012-10-07 20:53     ` Junio C Hamano
2012-10-15 11:48       ` Michael J Gruber
2012-10-15 20:49         ` Junio C Hamano
2012-10-06 15:57 ` [Patch 4/5] Create html documents for all files in Documentation/howto Thomas Ackermann
2012-10-06 15:58 ` Thomas Ackermann [this message]
2012-10-06 19:11   ` [Patch 5/5] Create pdf from all html files Jeff King
2012-10-06 19:32 ` [Patch 0/5] Create single PDF for all HTML files Jeff King
2012-10-07 20:54   ` Junio C Hamano
2012-10-07  8:14 ` Aw: " Thomas Ackermann
2012-10-07 22:52   ` Jeff King
2012-10-15 11:55     ` Michael J Gruber
2012-10-15 17:42       ` Jeff King
2012-10-08 22:53   ` Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1206625172.269796.1349539081024.JavaMail.ngmail@webmail08.arcor-online.net \
    --to=th.acker66@arcor.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).