Accepting request 424648 from Publishing
1 OBS-URL: https://build.opensuse.org/request/show/424648 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/asciidoc?expand=0&rev=38
This commit is contained in:
commit
aab1dd5678
260
asciidoc-change-Last-Updated-field.patch
Normal file
260
asciidoc-change-Last-Updated-field.patch
Normal file
@ -0,0 +1,260 @@
|
||||
From 9a2f59e74dde8b0df1acdfc2dde40a0a868a16a8 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph HERLANT <herlantj@gmail.com>
|
||||
Date: Fri, 14 Feb 2014 15:56:45 +0100
|
||||
Subject: Adding the ability to change "Last Updated" field
|
||||
|
||||
This commit adds the ability to change the behavior of the "Last Updated"
|
||||
field at the bottom of the html documents generated by asciidoc.
|
||||
This will be done by using the "footer-style" new attribute.
|
||||
This commit adds the ability to change it to the revision date or to skip it.
|
||||
|
||||
This commit also adds the documentation of this new feature to the user guide.
|
||||
|
||||
|
||||
---
|
||||
doc/asciidoc.txt | 16 ++++++++++++++++
|
||||
html4.conf | 13 +++++++++++++
|
||||
html5.conf | 13 +++++++++++++
|
||||
lang-cs.conf | 3 ++-
|
||||
lang-de.conf | 3 ++-
|
||||
lang-el.conf | 3 ++-
|
||||
lang-en.conf | 3 ++-
|
||||
lang-es.conf | 3 ++-
|
||||
lang-fr.conf | 3 ++-
|
||||
lang-hu.conf | 3 ++-
|
||||
lang-nl.conf | 3 ++-
|
||||
lang-uk.conf | 3 ++-
|
||||
xhtml11.conf | 13 +++++++++++++
|
||||
13 files changed, 73 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/doc/asciidoc.txt
|
||||
+++ b/doc/asciidoc.txt
|
||||
@@ -5948,6 +5948,22 @@ A short summary of changes in this docum
|
||||
prior to the first document section. The document also needs to be
|
||||
dated to output this attribute.
|
||||
|
||||
+|footer-style |html4, html5, xhtml11 |
|
||||
+Changes the "Last updated" field in the footer of the document or removes this
|
||||
+field and the revision number (in the footer only). +
|
||||
+Can take 3 values:
|
||||
+
|
||||
+- none : Don't display the "Last updated" and "Revision number" fields in the
|
||||
+ footer of the document
|
||||
+- revdate : The "Last updated" field's date in the footer will be the revision
|
||||
+ date specified in the document (`revdate` attribute)
|
||||
+- default (or any other value) : The "Last updated" field's date in the footer
|
||||
+ will be the date of the input file modification
|
||||
+
|
||||
+This attribute can be set, for example, using `:footer-style: revdate` in the
|
||||
+header of the file or using the `--attribute footer-style=revdate` command-line
|
||||
+option.
|
||||
+
|
||||
|scriptsdir |html5, xhtml11 |
|
||||
The name of the directory containing linked JavaScripts.
|
||||
See <<X35,HTML stylesheets and JavaScript locations>>.
|
||||
--- a/html4.conf
|
||||
+++ b/html4.conf
|
||||
@@ -444,11 +444,14 @@ cellspacing="0" cellpadding="4">
|
||||
|
|
||||
|
||||
[footer]
|
||||
+# Removing footer date and version if footer-style set to none
|
||||
+ifeval::["{footer-style=default}"!="none"]
|
||||
<p></p>
|
||||
<p></p>
|
||||
<hr><p><small>
|
||||
template::[footer-text]
|
||||
</small></p>
|
||||
+endif::[]
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -467,6 +470,16 @@ template::[footer-text]
|
||||
template::[docinfo]
|
||||
</head>
|
||||
|
||||
+[footer-date]
|
||||
+# Default footer date is document modification time
|
||||
+ifeval::["{footer-style=default}"!="revdate"]
|
||||
+ {docdate} {doctime}
|
||||
+endif::[]
|
||||
+# If set to "revdate", it'll be set to the revision date
|
||||
+ifeval::["{footer-style=default}"=="revdate"]
|
||||
+ {revdate}
|
||||
+endif::[]
|
||||
+
|
||||
#--------------------------------
|
||||
# article and book document types
|
||||
#--------------------------------
|
||||
--- a/html5.conf
|
||||
+++ b/html5.conf
|
||||
@@ -662,9 +662,12 @@ endif::doctype-manpage[]
|
||||
</div>
|
||||
{disable-javascript%<div id="footnotes"><hr></div>}
|
||||
<div id="footer">
|
||||
+# Removing footer date and version if footer-style set to none
|
||||
+ifeval::["{footer-style=default}"!="none"]
|
||||
<div id="footer-text">
|
||||
template::[footer-text]
|
||||
</div>
|
||||
+endif::[]
|
||||
ifdef::badges[]
|
||||
<div id="footer-badges">
|
||||
ifndef::icons[]
|
||||
@@ -688,6 +691,16 @@ endif::badges[]
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+[footer-date]
|
||||
+# Default footer date is document modification time
|
||||
+ifeval::["{footer-style=default}"!="revdate"]
|
||||
+ {docdate} {doctime}
|
||||
+endif::[]
|
||||
+# If set to "revdate", it'll be set to the revision date
|
||||
+ifeval::["{footer-style=default}"=="revdate"]
|
||||
+ {revdate}
|
||||
+endif::[]
|
||||
+
|
||||
ifdef::doctype-manpage[]
|
||||
[synopsis]
|
||||
template::[sect1]
|
||||
--- a/lang-cs.conf
|
||||
+++ b/lang-cs.conf
|
||||
@@ -23,7 +23,8 @@ manname-title=NAME
|
||||
|
||||
[footer-text]
|
||||
Verze {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Poslední úprava {docdate} {doctime}
|
||||
+Poslední úprava
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-de.conf
|
||||
+++ b/lang-de.conf
|
||||
@@ -29,7 +29,8 @@ manname-title=NAME
|
||||
|
||||
[footer-text]
|
||||
Version {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Letzte Änderung {docdate} {doctime}
|
||||
+Letzte Änderung
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-el.conf
|
||||
+++ b/lang-el.conf
|
||||
@@ -23,7 +23,8 @@ manname-title=ΌΝΟΜΑ
|
||||
|
||||
[footer-text]
|
||||
Έκδοση {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Τελευταία αναθεώρηση {docdate} {doctime}
|
||||
+Τελευταία αναθεώρηση
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-en.conf
|
||||
+++ b/lang-en.conf
|
||||
@@ -22,7 +22,8 @@ manname-title=NAME
|
||||
|
||||
[footer-text]
|
||||
Version {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Last updated {docdate} {doctime}
|
||||
+Last updated
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-es.conf
|
||||
+++ b/lang-es.conf
|
||||
@@ -25,7 +25,8 @@ manname-title=NOMBRE DE REFERENCIA
|
||||
[footer-text]
|
||||
#TODO: Translation of 'Version' and 'Last updated'.
|
||||
Version {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Last updated {docdate} {doctime}
|
||||
+Last updated
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-fr.conf
|
||||
+++ b/lang-fr.conf
|
||||
@@ -27,7 +27,8 @@ manname-title=NOM
|
||||
|
||||
[footer-text]
|
||||
Version {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Dernière mise à jour {docdate} {doctime}
|
||||
+Dernière mise à jour
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-hu.conf
|
||||
+++ b/lang-hu.conf
|
||||
@@ -25,7 +25,8 @@ manname-title=NÉV
|
||||
|
||||
[footer-text]
|
||||
Verzió {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Utolsó frissítés: {docdate} {doctime}
|
||||
+Utolsó frissítés:
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-nl.conf
|
||||
+++ b/lang-nl.conf
|
||||
@@ -29,7 +29,8 @@ manname-title=NAME
|
||||
|
||||
[footer-text]
|
||||
Versie {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Laatst bijgewerkt {docdate} {doctime}
|
||||
+Laatst bijgewerkt
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/lang-uk.conf
|
||||
+++ b/lang-uk.conf
|
||||
@@ -28,7 +28,8 @@ manname-title=НАЗВА
|
||||
[footer-text]
|
||||
#TODO: Translation of 'Version' and 'Last updated'.
|
||||
Version {revnumber}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>}
|
||||
-Last updated {docdate} {doctime}
|
||||
+Last updated
|
||||
+template::[footer-date]
|
||||
|
||||
endif::basebackend-html[]
|
||||
|
||||
--- a/xhtml11.conf
|
||||
+++ b/xhtml11.conf
|
||||
@@ -657,9 +657,12 @@ endif::doctype-manpage[]
|
||||
</div>
|
||||
{disable-javascript%<div id="footnotes"><hr /></div>}
|
||||
<div id="footer">
|
||||
+# Removing footer date and version if footer-style set to none
|
||||
+ifeval::["{footer-style=default}"!="none"]
|
||||
<div id="footer-text">
|
||||
template::[footer-text]
|
||||
</div>
|
||||
+endif::[]
|
||||
ifdef::badges[]
|
||||
<div id="footer-badges">
|
||||
ifndef::icons[]
|
||||
@@ -684,6 +687,16 @@ endif::badges[]
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+[footer-date]
|
||||
+# Default footer date is document modification time
|
||||
+ifeval::["{footer-style=default}"!="revdate"]
|
||||
+ {docdate} {doctime}
|
||||
+endif::[]
|
||||
+# If set to "revdate", it'll be set to the revision date
|
||||
+ifeval::["{footer-style=default}"=="revdate"]
|
||||
+ {revdate}
|
||||
+endif::[]
|
||||
+
|
||||
ifdef::doctype-manpage[]
|
||||
[synopsis]
|
||||
template::[sect1]
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 1 14:17:15 UTC 2016 - olaf@aepfle.de
|
||||
|
||||
- Adding the ability to change "Last Updated" field
|
||||
... to reduce build-compare noise in git.rpm
|
||||
asciidoc-change-Last-Updated-field.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 6 21:23:02 UTC 2015 - mpluskal@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package asciidoc
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -24,6 +24,7 @@ License: GPL-2.0+
|
||||
Group: Development/Tools/Doc Generators
|
||||
Url: http://www.methods.co.nz/asciidoc/
|
||||
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: asciidoc-change-Last-Updated-field.patch
|
||||
Requires: docbook-xsl-stylesheets
|
||||
Requires: python >= 2.3
|
||||
Requires: python-xml
|
||||
@ -47,6 +48,7 @@ This package contains examples and documents of asciidoc.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user