[debian-edu-commits] [Git][debian-edu/debian-edu-doc][master] 3 commits: Add date derived from SOURCE_DATE_EPOCH to manual titles. (Closes: #919887)

WolfgangSchweer gitlab at salsa.debian.org
Tue Jan 22 19:13:34 GMT 2019


WolfgangSchweer pushed to branch master at Debian Edu / debian-edu-doc


Commits:
f0547dbc by Wolfgang Schweer at 2019-01-22T18:45:29Z
Add date derived from SOURCE_DATE_EPOCH to manual titles. (Closes: #919887)

The date format is 'YYYY-MM-DD' and as such it is not localized. Most probably
some XSL template/formatting instructions could improve it.

The title line modification takes effect after running 'make update' in a single
documentation subdirectory for the related manual.
Running 'make update-sources-from-wiki' in the Git base directory will modify
all XML manual files.

- - - - -
61189305 by Wolfgang Schweer at 2019-01-22T19:03:25Z
Tell dblatex to use a specific build directory instead of a random one.

- - - - -
0bc6e82b by Wolfgang Schweer at 2019-01-22T19:12:38Z
Add changelog entries for last commits.

- - - - -


3 changed files:

- debian/changelog
- documentation/common/Makefile.common
- documentation/scripts/get_manual


Changes:

=====================================
debian/changelog
=====================================
@@ -16,6 +16,13 @@ debian-edu-doc (2.10.13) UNRELEASED; urgency=medium
   * Update Debian Edu Buster manual from the wiki.
   * d/control: use canonical URL for Vcs-Git, thanks lintian.
 
+  [ Wolfgang Schweer ]
+  * scripts/get_manual:
+    - Add date derived from SOURCE_DATE_EPOCH to manual titles.
+      (Closes: #919887).
+  * Makefile.common:
+    - Tell dblatex to use a specific build directory instead of a random one.
+
  -- Holger Levsen <holger at debian.org>  Sun, 20 Jan 2019 15:34:37 +0100
 
 debian-edu-doc (2.10.12) unstable; urgency=medium


=====================================
documentation/common/Makefile.common
=====================================
@@ -10,7 +10,7 @@ LANGUAGES = $(subst $(name).,,$(subst .po,,$(wildcard *.po)))
 # Program name and option
 DBTOEPUB = dbtoepub
 XP = xsltproc --nonet --novalid --xinclude ../common/html.xsl
-DBLATEX = SOURCE_DATE_EPOCH=$$SOURCE_DATE_EPOCH SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1 dblatex -T native -b xetex -p ../common/dblatex.xsl
+DBLATEX = SOURCE_DATE_EPOCH=$$SOURCE_DATE_EPOCH SOURCE_DATE_EPOCH_TEX_PRIMITIVES=1 dblatex "--tmpdir=texdir" -T native -b xetex -p ../common/dblatex.xsl
 SED_JA_REGEX = 's/dbtimestamp/dbtimestamp\ format=\"Y\ 年\ m\ 月\ d\ 日\"/'
 
 # Use Make internal function 'subst': substitute -manual with nothing to get


=====================================
documentation/scripts/get_manual
=====================================
@@ -166,10 +166,12 @@ echo "calling ../scripts/get_images $xmlfile $path1"
 #  -0\777  read multiple lines
 perl -0\777 -pi -e "s/<ulink url=\"$path2(.*)\/(.*)\">(.*)\n<\/ulink>/<link linkend=\"\2\">\3<\/link>/g" $xmlfile
 
+# set SOURCE_DATE_EPOCH
+SOURCE_DATE_EPOCH="$(dpkg-parsechangelog -STimestamp -l ../../debian/changelog)"
+DATE="$(date -d @$SOURCE_DATE_EPOCH +'%Y-%m-%d')"
 # make it a docbook article again
-sed -i "1,/</ s#<#<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook XML V4.4//EN\" \"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"><article lang=\"en\"><articleinfo><title>$DEBIAN_EDU_DOC_TITLE <?dbtimestamp?></title></articleinfo>\n<#" $xmlfile
+sed -i "1,/</ s#<#<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook XML V4.4//EN\" \"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"><article lang=\"en\"><articleinfo><title>$DEBIAN_EDU_DOC_TITLE $DATE</title></articleinfo>\n<#" $xmlfile
 sed -i "$ s#>#>\n</article>#" $xmlfile
-
 # remove the first empty lines
 sed -i "1,2d" $xmlfile
 



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/compare/de20f4dd327ba089b77f3ae6abaa3674ea14f713...0bc6e82b767d23287112ec0a29a4a8f5b68c60f9

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/compare/de20f4dd327ba089b77f3ae6abaa3674ea14f713...0bc6e82b767d23287112ec0a29a4a8f5b68c60f9
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20190122/58941ded/attachment-0001.html>


More information about the debian-edu-commits mailing list