Finish ability to automagically fetch news from the GNOME website and attach

right below FreeBSD GNOME news.
This commit is contained in:
Maxim Sobolev 2002-01-28 17:05:24 +00:00
parent b7c490ce38
commit bcf521974a
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=11950
2 changed files with 12 additions and 8 deletions

View file

@ -16,9 +16,13 @@ DOCS+= contact.sgml
DATA= index.html newsflash.html
CLEANFILES= index.html newsflash.html
CLEANFILES= index.html
CLEANFILES+= newsflash.html
CLEANFILES+= gnotices.rdf
index.html: index.xsl news.xml includes.xsl ../includes.xsl
GNOTICES_RDF_URL= http://news.gnome.org/gnome-news/rdf
index.html: index.xsl news.xml includes.xsl ../includes.xsl gnotices.rdf
${XSLTPROC} ${XSLTPROCOPTS} -o index.html \
${.CURDIR}/index.xsl ${.CURDIR}/news.xml
.if !defined(NO_TIDY)
@ -32,8 +36,8 @@ newsflash.html: newsflash.xsl news.xml includes.xsl ../includes.xsl
-${TIDY} ${TIDYOPTS} ${.TARGET}
.endif
gnotices.xml: rdf-news.xsl gnotices.rdf
${XSLTPROC} ${XSLTPROCOPTS} -o ${.TARGET} \
${.CURDIR}/rdf-news.xsl ${.CURDIR}/gnotices.rdf
gnotices.rdf::
fetch -qo - ${GNOTICES_RDF_URL} | ${SED} 's|rdf:RDF|rdf| ; \
s|xmlns.*[^>]||' > ${.TARGET}
.include "${WEB_PREFIX}/share/mk/web.site.mk"

View file

@ -169,17 +169,17 @@
<p><font size="+1" color="#990000"><b>GNOME Project News</b></font><br/>
<font size="-1">
<xsl:for-each select="document('gnotices.xml')/descendant::event[position() &lt; 10]">
<xsl:for-each select="document('gnotices.rdf')/descendant::item[position() &lt; 10]">
&#183; <a>
<xsl:attribute name="href">
<xsl:value-of select="url"/>
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="title"/><br/>
</a>
</xsl:for-each>
<a>
<xsl:attribute name="href">
<xsl:value-of select="document('gnotices.xml')/gnotices/base"/>
<xsl:value-of select="document('gnotices.rdf')/descendant::channel/link"/>
</xsl:attribute>More...
</a>
</font></p>