Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: PM Frontpage Panel for Opera (and others?)

by OeufMayo (Curate)
on Dec 04, 2001 at 01:24 UTC ( #129187=note: print w/replies, xml ) Need Help??

in reply to PM Frontpage Panel for Opera (and others?)

Heh, that was the first thing I did when Opera 6 was released! :)

Basically, I grab the Newest Nodes XML ticker, munge it with a XSL stylesheet (with xsltproc, from the GnomeXML lib) to make it look like a clean RDF, and feed it to Opera's panel displayer. I update the page every 15mn or so.

If I remember correctly, there was only a problem with namespacess in the XML output by PM which prevented it to be directly understood by Opera's panel displayer.

Crontab entry
/usr/bin/lynx -source \ +r | \ /usr/bin/xsltproc /usr/local/apache/htdocs/stylesheets/headline.xsl - +\ >/usr/local/apache/htdocs/headline.rdf
The headline.xsl stylesheet

It's a quick hack, and probably not the best way to do it.

<?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="" version="1.0"> <xsl:template match="NODE"> <xsl:if test="position() &lt; 22"><!-- position() is weird --> <item> <link><xsl:text></xsl:text>< +xsl:value-of select="@node_id" /></link> <title><xsl:value-of select="." /></title> </item> </xsl:if> </xsl:template> <xsl:template match="/"> <rdf:RDF xmlns:rdf="" xmlns=""> <channel> <title>Perl Monks</title> <link></link> <description>Your site for all that is Perl</description> </channel> <image> <title>Perl Monks</title> <url></url> <link></link> </image> <xsl:apply-templates/> </rdf:RDF> </xsl:template> <xsl:template match="INFO" /> <xsl:template match="AUTHOR" /> </xsl:stylesheet>
Opera's Panel
Opera's panel display
my $OeufMayo = new PerlMonger::Paris({http => ''});</kbd>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://129187]
[shmem]: .oO( two left hands, full of thumbs )
[erix]: well-thumbed

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-02-19 14:49 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (265 votes). Check out past polls.