[FFmpeg-devel] [PATCH] ffmpeg-web: rss support

Michael Niedermayer michaelni at gmx.at
Fri Dec 30 21:32:43 CET 2011


On Fri, Dec 30, 2011 at 12:58:16PM +0100, Clément Bœsch wrote:
> On Fri, Dec 30, 2011 at 06:13:33AM +0100, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  Makefile |   21 ++++++++++++++++++++-
> >  1 files changed, 20 insertions(+), 1 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index 3db62aa..01ecf27 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -3,7 +3,7 @@
> >  SRCS = about bugreports consulting contact documentation download \
> >         index legal projects shame
> >  
> > -TARGETS = $(addsuffix .html,$(addprefix htdocs/,$(SRCS)))
> > +TARGETS = $(addsuffix .html,$(addprefix htdocs/,$(SRCS))) htdocs/main.rss
> >  
> >  PAGE_DEPS = src/template_head1 src/template_head2 src/template_footer sed_commands
> >  
> > @@ -18,4 +18,23 @@ htdocs/%.html: src/% src/%_title $(PAGE_DEPS)
> >  	cat src/template_head1 $<_title src/template_head2 - \
> >  	src/template_footer > $@
> >  
> > +htdocs/main.rss: htdocs/index.html
> > +	echo '<?xml version="1.0" encoding="UTF-8" ?>' > $@
> > +	echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">' >> $@
> > +	echo '<channel>' >> $@
> > +	echo '        <title>FFmpeg RSS</title>' >> $@
> > +	echo '        <link>http://ffmpeg.org</link>' >> $@
> > +	echo '        <description>FFmpeg RSS</description>' >> $@
> > +	echo '        <atom:link href="http://ffmpeg.org/test.rss" rel="self" type="application/rss+xml" />' >> $@
> > +	grep '<a *id=".*" *></a><h3>.*20..,.*</h3>' $< | sed 'sX<a *id="\(.*\)" *> *</a> *<h3>\(.*20..\), *\(.*\)</h3>X\
> > +    <item>\
> > +        <title>\2, \3</title>\
> > +        <link>http://ffmpeg.org/index.html#\1</link>\
> > +        <guid>http://ffmpeg.org/index.html#\1</guid>\
> > +    </item>\
> > +X' >> $@
> > +	echo '</channel>' >> $@
> > +	echo '</rss>' >> $@
> > +
> > +
> >  .PHONY: all clean
> 
> Oh and forgot to say: you should add a sth like <link href="/main.rss"
> rel="alternate" type="application/rss+xml" title="ffmpeg.org" /> on the
> main template (not sure this line is valid).

added and seems to work, thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111230/fa61515e/attachment.asc>


More information about the ffmpeg-devel mailing list