Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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 \ http://www.perlmonks.org/index.pl?node=newest%20nodes%20xml%20generato +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="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="NODE"> <xsl:if test="position() &lt; 22"><!-- position() is weird --> <item> <link><xsl:text>http://www.perlmonks.org/?node_id=</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="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/"> <channel> <title>Perl Monks</title> <link>http://perlmonks.org/</link> <description>Your site for all that is Perl</description> </channel> <image> <title>Perl Monks</title> <url>http://perlmonks.org/images/perlmonkssm.gif</url> <link>http://perlmonks.org/</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
<kbd>--
my $OeufMayo = new PerlMonger::Paris({http => 'paris.mongueurs.net'});</kbd>


Comment on Re: PM Frontpage Panel for Opera (and others?)
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://129187]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-02 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (29 votes), past polls