Changeset 35d9770
- Timestamp:
- 07/07/2007 10:30:37 AM (17 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 12.2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gimp3, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/for-12.3, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/spidermonkey128, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- c425f86
- Parents:
- 3c6bf83
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r3c6bf83 r35d9770 4 4 # $LastChangedBy$ 5 5 # $Date$ 6 6 7 # Adjust these to suit your installation 7 OUTPUTDIR = $(HOME)/public_html/blfs-book 8 BASEDIR= $(HOME)/public_html/blfs-book-xsl 8 9 DUMPDIR= $(HOME)/blfs-commands 9 INSTALL = install 10 JADE = openjade 11 DOCBOOK = /usr/share/sgml/docbook/dsssl-stylesheets-1.78 12 BASEDIR= $(HOME)/public_html/blfs-book-xsl 13 TEXBASEDIR= $(HOME)/public_html/blfs-book-tex 10 CHUNK_QUIET=1 11 ROOT_ID="" 12 PDF_OUTPUT=BLFS-BOOK.pdf 14 13 NOCHUNKS_OUTPUT=BLFS-BOOK.html 15 SRCDIR = $(PWD)16 14 17 all: blfs 15 ifdef V 16 Q = 17 else 18 Q = @ 19 endif 18 20 19 blfs: 20 @if [ -z $(BASEDIR) ]; then \ 21 echo "Envar BASEDIR is not set!" ; \ 22 exit 1 ; \ 23 fi 24 @echo "Generating XHTML Version of BLFS Book with xsltproc..." 25 @echo " BASEDIR = $(BASEDIR)" 26 @$(INSTALL) -d $(BASEDIR) 27 xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR)/ \ 28 stylesheets/blfs-chunked.xsl index.xml 29 if [ ! -e $(BASEDIR)/stylesheets ]; then \ 21 blfs: validxml profile-html 22 @echo "Generating chunked XHTML files..." 23 $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \ 24 -stringparam rootid $(ROOT_ID) -stringparam base.dir $(BASEDIR)/ \ 25 stylesheets/blfs-chunked.xsl /tmp/blfs-html.xml 26 27 @echo "Copying CSS code and images..." 28 $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \ 30 29 mkdir -p $(BASEDIR)/stylesheets; \ 31 30 fi; 32 cp stylesheets/*.css $(BASEDIR)/stylesheets33 if [ ! -e $(BASEDIR)/images ]; then \31 $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets 32 $(Q)if [ ! -e $(BASEDIR)/images ]; then \ 34 33 mkdir -p $(BASEDIR)/images; \ 35 34 fi; 36 cp images/*.png $(BASEDIR)/images37 cd $(BASEDIR); sed -i -e "s@../stylesheets@stylesheets@g" *.html38 cd $(BASEDIR); sed -i -e "s@../images@images@g" *.html35 $(Q)cp images/*.png $(BASEDIR)/images 36 $(Q)cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" *.html 37 $(Q)cd $(BASEDIR)/; sed -i -e "s@../images@images@g" *.html 39 38 40 for filename in `find $(BASEDIR) -name "*.html"`; do \ 39 @echo "Running Tidy and obfuscate.sh..." 40 $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \ 41 41 tidy -config tidy.conf $$filename; \ 42 42 true; \ … … 45 45 done; 46 46 47 pdf: validxml 48 @echo "Generating profiled XML for PDF..." 49 $(Q)xsltproc --nonet --stringparam profile.condition pdf \ 50 --output /tmp/blfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \ 51 /tmp/blfs-full.xml 47 52 48 nochunks: 49 @echo "Generating nochunks version of BLFS..." 50 xsltproc --xinclude --nonet -stringparam profile.condition html \ 51 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ 52 stylesheets/blfs-nochunks.xsl index.xml 53 @echo "Generating FO file..." 54 $(Q)xsltproc --nonet -stringparam rootid $(ROOT_ID) \ 55 --output /tmp//blfs-pdf.fo stylesheets/blfs-pdf.xsl /tmp/blfs-pdf.xml 56 $(Q)sed -i -e 's/span="inherit"/span="all"/' /tmp/blfs-pdf.fo 53 57 54 tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true 58 @echo "Generating PDF file..." 59 $(Q)if [ ! -e $(BASEDIR) ]; then \ 60 mkdir -p $(BASEDIR); \ 61 fi; 62 $(Q)fop /tmp/blfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 55 63 56 sh obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) 64 nochunks: validxml profile-html 65 @echo "Generating non chunked XHTML file..." 66 $(Q)xsltproc --nonet -stringparam profile.condition html \ 67 -stringparam rootid $(ROOT_ID) --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ 68 stylesheets/blfs-nochunks.xsl /tmp/blfs-html.xml 57 69 58 sed -i -e "s@text/html@application/xhtml+xml@g" \ 59 $(BASEDIR)/$(NOCHUNKS_OUTPUT) 70 @echo "Running Tidy..." 71 $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true 72 @echo "Running obfuscate.sh..." 73 $(Q)sh obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) 74 $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" \ 75 $(BASEDIR)/$(NOCHUNKS_OUTPUT) 60 76 61 pdf: 62 xsltproc --xinclude --nonet --stringparam profile.condition pdf \ 63 --output blfs-pdf.xml stylesheets/blfs-profile.xsl index.xml 64 xsltproc --xinclude --nonet --output blfs.fo \ 65 stylesheets/blfs-pdf.xsl blfs-pdf.xml 66 sed -i -e "s/inherit/all/" blfs.fo 67 fop.sh blfs.fo blfs.pdf 68 $(INSTALL) -d $(BASEDIR)/pdf 69 rm blfs.fo 70 mv blfs.pdf $(BASEDIR)/pdf 77 validxml: 78 @echo "Validating the book..." 79 $(Q)xmllint --nonet --noent --xinclude --postvalid \ 80 -o /tmp/blfs-full.xml index.xml 71 81 72 tex: 73 @if [ -z $(TEXBASEDIR) ]; then \ 74 echo "Envar TEXBASEDIR is not set!" ; \ 75 exit 1 ; \ 76 fi 77 @echo "Generating TeX Version of BLFS Book with xsltproc..." 78 @echo " TEXBASEDIR = $(TEXBASEDIR)" 79 @$(INSTALL) -d $(TEXBASEDIR) 80 # Using profiles in book source to exclude parts of the book from TeX 81 # i.e., Changelog 82 xsltproc --nonet --output $(TEXBASEDIR)/index.xml \ 83 --stringparam "profile.role" "book" \ 84 http://docbook.sourceforge.net/release/xsl/current/profiling/profile.xsl \ 85 index.xml 86 @cd $(TEXBASEDIR) && xsltproc --nonet -o blfs-book.tex \ 87 $(SRCDIR)/stylesheets/blfs-tex.xsl index.xml 82 profile-html: validxml 83 @echo "Generating profiled XML for XHTML..." 84 $(Q)xsltproc --nonet --stringparam profile.condition html \ 85 --output /tmp/blfs-html.xml stylesheets/lfs-xsl/profile.xsl \ 86 /tmp/blfs-full.xml 88 87 89 dump-commands: 90 xsltproc --xinclude --nonet --output $(DUMPDIR)/ \ 91 stylesheets/dump-commands.xsl index.xml 88 blfs-patch-list: validxml 89 @echo "Generating blfs-patch-list..." 90 $(Q)xsltproc --nonet --output /tmp/blfs-patch-list \ 91 stylesheets/patcheslist.xsl /tmp/blfs-full.xml 92 $(Q)sed -e "s|^.*/||" /tmp/blfs-patch-list > /tmp/blfs-patches 93 $(Q)sort /tmp/blfs-patches > blfs-patch-list 92 94 93 validate: 94 xmllint --noout --nonet --xinclude --postvalid index.xml 95 wget-list: validxml 96 @echo "Generating wget list..." 97 $(Q)mkdir -p $(BASEDIR) 98 $(Q)xsltproc --nonet --output $(BASEDIR)/wget-list \ 99 stylesheets/wget-list.xsl /tmp/lfs-full.xml 95 100 96 validate-pdf: 97 xsltproc --xinclude --nonet --stringparam profile.condition pdf \ 98 --output blfs-pdf.xml stylesheets/blfs-profile.xsl index.xml 99 xmllint --noout --nonet --postvalid blfs-pdf.xml 101 test-links: validxml 102 @echo "Generating test-links file..." 103 $(Q)mkdir -p $(BASEDIR) 104 $(Q)xsltproc --nonet --stringparam list_mode full \ 105 --output $(BASEDIR)/test-links stylesheets/wget-list.xsl \ 106 /tmp/lfs-full.xml 100 107 101 blfs-patch-list: 102 @echo "Generating blfs-patch-list..." 103 xsltproc --xinclude --nonet \ 104 --output blfs-patch-list stylesheets/patcheslist.xsl index.xml 105 sed -e "s|^.*/||" blfs-patch-list > blfs-patches 106 sort blfs-patches > blfs-patch-list 107 rm blfs-patches 108 109 wget-list: 110 mkdir -p $(BASEDIR) 111 xsltproc --xinclude --nonet stylesheets/wget-list.xsl index.xml > $(BASEDIR)/wget-list 112 113 test-links: 114 mkdir -p $(BASEDIR) 115 xsltproc --xinclude --nonet --stringparam list_mode full \ 116 stylesheets/wget-list.xsl index.xml > $(BASEDIR)/test-links 117 rm -f $(BASEDIR)/{good,bad,true_bad}_urls 118 for URL in `cat $(BASEDIR)/test-links`; do \ 108 @echo "Cheking URLs, first pass..." 109 $(Q)rm -f $(BASEDIR)/{good,bad,true_bad}_urls 110 $(Q)for URL in `cat $(BASEDIR)/test-links`; do \ 119 111 wget --spider --tries=2 --timeout=60 $$URL >>/dev/null 2>&1; \ 120 112 if test $$? -ne 0 ; then echo $$URL >> $(BASEDIR)/bad_urls ; \ … … 122 114 fi; \ 123 115 done 124 for URL2 in `cat $(BASEDIR)/bad_urls`; do \ 116 117 @echo "Cheking URLs, second pass..." 118 $(Q)for URL2 in `cat $(BASEDIR)/bad_urls`; do \ 125 119 wget --spider --tries=2 --timeout=60 $$URL2 >>/dev/null 2>&1; \ 126 120 if test $$? -ne 0 ; then echo $$URL2 >> $(BASEDIR)/true_bad_urls ; \ … … 129 123 done 130 124 131 .PHONY : blfs-patch-list wget-list test-links 125 dump-commands: validxml 126 @echo "Dumping book commands..." 127 $(Q)xsltproc --output $(DUMPDIR)/ \ 128 stylesheets/dump-commands.xsl /tmp/lfs-full.xml 129 130 validate: 131 @echo "Validating the book..." 132 $(Q)xmllint --noout --nonet --xinclude --postvalid index.xml 133 134 all: blfs nochunks pdf 135 136 world: all blfs-patch-list dump-commands wget-list test-links 137 138 .PHONY : all blfs blfs-patch-list dump-commands nochunks pdf profile-html \ 139 test-links validate validxml wget-list world -
introduction/welcome/changelog.xml
r3c6bf83 r35d9770 43 43 44 44 <listitem> 45 <para>July 7th, 2007</para> 46 <itemizedlist> 47 <listitem> 48 <para>[manuel] - Updated book rendering framework to use the new 49 LFS-XSL Stylesheets.</para> 50 </listitem> 51 </itemizedlist> 52 </listitem> 53 54 <listitem> 45 55 <para>July 6th, 2007</para> 46 56 <itemizedlist> -
obfuscate.sh
r3c6bf83 r35d9770 7 7 # obfuscate email addresses in XML/HTML 8 8 # Script written (and slight perl modification) by Archaic <archaic AT linuxfromscratch D0T org> 9 # Modified from "sed -i" to old style "sed -e" by Manuel Canales <manuel AT linuxfromscratch D0T org> 10 # to prevent hangs on very long files, like nonckunked books. 9 11 # Original Perl expression by Anderson Lizardo <lizardo AT linuxfromscratch D0T org> 10 12 # Released under the GNU General Public License … … 29 31 #cp "$1" "$1".bak 30 32 31 for i in `grep -o '"mailto:.*@.*"' "$1" |cut -d\" -f2|sed -e 's|^mailto:||' -e 's|"$||'`; do33 for i in `grep -o '"mailto:.*@.*"' ${1} |cut -d\" -f2|sed -e 's|^"mailto:||' -e 's|"$||'`; do 32 34 link=`echo $i | perl -pe 's/[^\n]/"\\\&#".ord($&)."\;"/ge'` 33 35 plaintext=`echo $i | sed -e 's|@| AT |' -e 's|\.| D0T |g'` 34 sed -i "s|mailto:$i|mailto:$link|" "$1" 35 sed -i "s|$i|$plaintext|" "$1" 36 cp ${1}{,.tmp} 37 sed -e "s|mailto:$i|mailto:$link|" \ 38 -e "s|$i|$plaintext|" ${1}.tmp > ${1} 39 rm ${1}.tmp 36 40 done 37 41 #rm $FILE.tmp 38 42 #exit 0
Note:
See TracChangeset
for help on using the changeset viewer.