Tags:
create new tag
, view all tags

Question

I'm trying to capture headlines from http://bioinformatics.oxfordjournals.org/ -- however the journal uses square brackets in the item title lines to specify categories ([EDITORIAL], etc). The square brackets cause problems with twiki notation for the line format ![![$link]![$title]]. Does anyone have any recommendations for getting around such a setup?

DanaCarrington

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, HeadlinesPlugin
Server OS: Fedora Core 3, kernel 2.6.12
Web server: Apache 2.0.53
Perl version: Perl 5.8.5
Client OS: Fedora Core 4, Win XP
Web Browser: Firefox 1.0.7, IE
Categories: Plugins

-- DanaCarrington - 31 Jan 2006

Answer

The latest HeadlinesPlugin version (2.0) contains a subroutine called 'recode'. This area allows for modification of text including replacement of square brackets with something less problematic. This is simply a hack at this point since it must be modified on all upgrades/installations until a better solution is available.


No, that's not the right thing to do. The HeadlinesPlugin comes with HEADER and FORMAT format strings that do a [[$link][$title]] which then gets confused. So simply replace that with a more robust <a href="$link">$title</a> and you are done. Here are the new format strings that will come with the next HeadlinesPlugin release:

   * Set HEADER = <div class="headlinesChannel"><div class="headlinesLogo"><img src="$imageurl" alt="$imagetitle" border="0" />%BR%</div><div class="headlinesTitle">$n---+!! <a href="$link">$title</a></div><div class="headlinesDate">$date</div><div class="headlinesDescription">$description</div><div class="headlinesRight">$rights</div></div>

   * Set FORMAT = <div class="headlinesArticle"><div class="headlinesTitle"><a href="$link">$title</a></div>$n<hr /><span class="headlinesDate">$date</span> <span class="headlinesCreator"> $creator</span> <span class="headlinesSubject"> $subject </span>$n<div class="headlinesText"> $description</div></div>

-- MichaelDaum - 03 Feb 2006

 
Topic revision: r2 - 2006-02-03 - MichaelDaum
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.