[gimp] Bug 734981 - Update maintainers and authors.



commit 715c458649829ac6c6cd0be4776ca17f5969de8d
Author: Jehan <jehan girinstud io>
Date:   Mon Oct 23 23:49:01 2017 +0200

    Bug 734981 - Update maintainers and authors.
    
    Adding a XSL stylesheet to generate ./content/about/authors.md for
    gimp-web repository. This way, it will be very easy to keep an
    up-to-date authors page on the website, as long as authors.xml is
    up-to-date as well.
    Note that authors.md is git-ignored and not generated automatically. It
    will have to be manually requested with a `make authors.md`.

 .gitignore           |    1 +
 Makefile.am          |    4 ++
 authors4gimp-web.xsl |   79 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 86a4f50..46e00d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
 /Makefile
 /Makefile.in
 /aclocal.m4
+/authors.md
 /autom4te.cache
 /compile
 /config.cache
diff --git a/Makefile.am b/Makefile.am
index b5ea936..eddac25 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,6 +45,10 @@ if HAVE_XSLTPROC
        $(XSLTPROC) -o $(@) $(top_srcdir)/authors.xsl $< || rm -f $(@)
 endif
 
+authors.md: authors.xml authors4gimp-web.xsl
+if HAVE_XSLTPROC
+       $(XSLTPROC) --stringparam today "`date --iso-8601=seconds`" -o $(@) 
$(top_srcdir)/authors4gimp-web.xsl $< || rm -f $(@)
+endif
 
 EXTRA_DIST = \
        AUTHORS                 \
diff --git a/authors4gimp-web.xsl b/authors4gimp-web.xsl
new file mode 100644
index 0000000..edcfba2
--- /dev/null
+++ b/authors4gimp-web.xsl
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--  simple XSL transformation to create a text version from authors.xml  -->
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+                xmlns:dc="http://purl.org/dc/elements/1.1/";>
+
+  <xsl:output method="text" />
+  <xsl:param name="today" />
+
+  <xsl:template name="contributor">
+    <xsl:param name="role" />
+    <xsl:apply-templates select="dc:contributor[contains(@role, $role)]" />
+  </xsl:template>
+
+  <xsl:template match="/dc:gimp-authors">
+    <xsl:text>Title: Authors: The People That Made it Happen
+Date: </xsl:text><xsl:value-of select="$today"/><xsl:text>
+Modified: </xsl:text><xsl:value-of select="$today"/><xsl:text>
+Author: generated from authors.xml.
+
+## GIMP was originally written by:
+
+</xsl:text>
+    <xsl:apply-templates select="dc:creator" />
+    <xsl:text>
+## The current maintainers are:
+
+</xsl:text>
+    <xsl:apply-templates select="dc:maintainer" />
+    <xsl:text>
+## The following people have contributed code to GIMP:
+
+*Contributing patches, fixes, plugins, extensions, scripts and other [improvements to the code](/develop/).*
+
+</xsl:text>
+    <xsl:call-template name="contributor">
+      <xsl:with-param name="role" select="'author'"/>
+    </xsl:call-template>
+    <xsl:text>
+
+## The following people have contributed art to GIMP:
+
+*Contributing icons, cursors, brushes, gradients, patterns, etc.*
+
+</xsl:text>
+    <xsl:call-template name="contributor">
+      <xsl:with-param name="role" select="'artist'"/>
+    </xsl:call-template>
+    <xsl:text>
+
+## The following people have helped to document GIMP:
+
+*Contributing [documentation](/docs/).*
+
+</xsl:text>
+    <xsl:call-template name="contributor">
+      <xsl:with-param name="role" select="'documenter'"/>
+    </xsl:call-template>
+
+  </xsl:template>
+
+  <xsl:template match="dc:creator">
+    <xsl:text>* </xsl:text><xsl:apply-templates /><xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="dc:maintainer">
+    <xsl:text>* </xsl:text><xsl:apply-templates /><xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="dc:contributor">
+    <xsl:text>* </xsl:text><xsl:apply-templates /><xsl:text>
+</xsl:text>
+  </xsl:template>
+
+</xsl:stylesheet>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]