TWiki> TWiki Web>HeadlinesPlugin (revision 1)EditAttach

Headlines Plugin


This plugin displays RSS and ATOM feeds from news sites. Use it to build news portals that show headline news.

Note: ( ) is a good site listing many RSS feeds.

Syntax Rules


Parameter Explanation Default
"..." source of RSS feed; this can be an url (starting with http) or a web.topic location for internal feeds None; is required
href="..." (Alternative to above) N/A
refresh="60" Refresh rate in minutes for caching feed; "0" for no caching Global REFRESH setting
limit="12" Maximum number of items shown Global LIMIT setting
header Header. Can include these variables: - $channeltitle, $title: title of channel (channel.title)
- $channellink, $link: link of channel (
- $channeldescription, $description: description (channel.description)
- $channeldate, $date: publication date of the channel (channel.pubDate)
- $rights: copyrights of the channel (channel.copyright)
- $imagetitle: title text for site (image.title)
- $imagelink: link for site (
- $imageurl: URL of image (image.url)
- $imagedescription: description of image (image.description)
Global HEADER setting
format Format of one item. Can include these variables:
- $title: news item title (item.title)
- $link: news item link (
- $description: news item description (item.description)
- $date: the publication date (item.pubDate,
- $category: the article category (item.category)
Global FORMAT setting

The header and format parameters might also use variables rendering the dc, image and content namespace information. Note, that only bits of interest have been implemented so far and those namespaces might not be implemented fully yet.

Rendering the dc namespace

The following variables are extracting the dc namespace info, that could be used in header and format. Nnote, that some of the variables are already used above. This is done by purpose to use different feeds with the same formating parameters. If there's a conflict the non-dc tags have higher precedence, i.e. a <title> content </title> is prefered over <dc:title> content </dc:title> .

  • $title: channel/article title (dc:title)
  • $creator: channel creator (dc:creator)
  • $subject: subject text; this will also add an image according to the subject hash list, see above (dc:subject)
  • $description: ... (dc:description)
  • $publisher: the channel/article publisher (dc:publisher)
  • $contributor: ... (dc:contributor)
  • $date: ... (dc:date)
  • $type: ... (dc:type)
  • $format: ... (dc:format)
  • $identifier: ... (dc:identifier)
  • $source: ... (dc:source)
  • $language: ... (dc:language)
  • $relation: ... (dc:relation)
  • $coverage: ... (dc: coverage)
  • $rights: ... (dc: rights)

Rendering the image namespace

An image:item is converted into an <img> tag using the following mappings:

  • src: image url (rdf:about attribute of the image.item tag)
  • alt: image title (title)
  • width: image width (image:width)
  • height: image height image:height)

Rendering the content namespace

The variable $content is refering to the <content:encoding> content </content:encoding>.


Slashdot News


  header="*[[$link][$title]]:* $description" 
  format="$t* [[$link][$title]]"
to get the latest Slashdot news as a bullet list format:

Business Opportunities Weblog


%HEADLINES{"" limit="3"}%

to get the latest postings on the "Business Opportunities" weblog:

Mon, 24 Nov 2014 22:34:48 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Mon, 24 Nov 2014 22:29:09 +0000 Dane Carlson

If you think that tea has to come in tea bags, you're missing out on a whole world of flavor and experience. Simple Loose Leaf is a tea subscription service that specializes in loose leaf tea, offering subscriptions that the customer is able to fully customize. According to the company, they believe in changing the way loose leaf tea subscriptions are sold and think that every tea lover should have the opportunity to create the perfect tea time experience for themselves and those they love. I recently had the opportunity to ask one of the founders, Andrew Flocks, more about the company.

What's special about Simple Loose Leaf?

In a word: Choice. There is no other tea subscription service that offers the ability to customize a tea subscription. The other element that makes Simple Loose Leaf different, and perhaps special, is that we do not offer traditional retail services. We sell subscriptions. All non-subscription services, i.e. our Samples, are designed to drive customers to our subscriptions. We do not offer our teas for sales out side of the subscriptions and the samples. We are a subscription service above all else.

Where'd the idea come from?

About 2 years ago we, my brother and I, were looking at different websites to start. One of the concepts that was on the table was a specialty tea-ware website that would feature handmade designer tea pots, tea cups, saucers etc. But it got tabled due to difficulty finding reliable suppliers and the fact that we would enter a market, tea, that was filled with some real heavy hitters. i.e. Teavana and Adagio and David's Tea, and countless smaller boutique websites that are amazing. So we decided that we could not bring any measurable value into the retail tea market.

Move forward to the start of 2013 and we came back to the idea of tea and added the idea of tea subscriptions. We decided to focus on the part of the tea market that we felt we could bring the most value. And that was the subscription side. From there we looked at what the tea subscription market had to offer and saw that nobody offered a custom tea subscription service.

How does it compare to it's competition?

All other subscription services offer what is called a Tea of the Month Club. In this club you pay between $10 and $20 per month and the company sends you a tea or teas. Some companies offer great value with these clubs and others offer very sub par value. But none offer the ability to build your own subscription. We currently offer 126 different teas to choose from and offer subscriptions up to 6 months in length.

Who really needs it?

Who needs Simple Loose Leaf? Every tea drinker that loves to explore and expand their love of tea. With the huge selection we offer, you can go for over 10 years and not repeat a single tea.


Anyone already using it in any interesting ways?

Yes, we have a customer that has started a 12 month, a 2x 6 month, subscription for her mother-in-law. She is an avid tea drinker and wants to introduce her mother-in-law to new teas. So she is doing a ''12 Months of Tea'' for her mother-in-law's birthday.

Where do you see it in five years?

I sat here for 15 minutes trying to figure out an answer to this question. And to be honest in five years we want to have an efficient company that is nimble and energetic. In the next 2 years? We want to have a steadily growing customer base that expands by 10% every month. In the coming year we want to be THE subscription website that everyone sends their fellow tea lovers to. We want to be known for customer service, second to none, and a selection of teas that will make the most stoic of tea connoisseur tear up.

Who's behind it? (Tell us more about you.)

There are three siblings behind Simple Loose Leaf. I handle most of the day to day operations of Simple Loose Leaf. My name is Andrew Flocks, I attended the University of Arkansas where I received a degree in Economics/Finance. Simple Loose Leaf is my 4th e-commerce store. I also currently own a specialty sandblasting company that specializes in traveling to cemeteries and doing engraving on monuments. (I am not great it talking about myself. If you would like more info let me know.)

Can you describe a typical working day?

The typical day at Simple Loose Leaf can be broken into two different types of days. The days that are close to the end of the month and the days that are not close to the end of the month. The days that are not close to the end of the month are filled with marketing efforts and doing polishing work on the website (A/B Testing and Google Analytics) The days that are close to the end of the month are filled with order fulfillment, inventory management, labeling, mailing and a little bit of sleep in there somewhere.


What's your background?

My background is Sales and Entrepreneurship. Out of college I started working for an HR outsourcing company doing business development and sales. I left that to take over the sandblasting business. During the end of college and starting at the HR company I tried my hand at online monument, tombstone, sales and then pivoted into pet memorials. (Note: Both of those businesses are not very much fun.)

What motivates you to keep going?

Every step I have taken up to this point has been easier. My very first website was rubbish. My next website, for pet memorials, was a diamond in the rough. But I started to get it. My next website, designed to sell high end men's accessories, was a good website but a bad business. Simple Loose Leaf was an immense amount of work to set up, but it has come together how we originally envisioned it. That is the first time that has happened. Motivation? It is far easier to take the next step than it is to go back.

If you were to start again, what would you do differently?

Maybe start Simple Loose Leaf sooner, but the process so far has been going good. It is the hardest thing I have ever done, but it is awesome.

Please tell us a secret&hellip

I do not like tea in the morning. I wake up with coffee and go to sleep with tea.

Anything else you think I should know or ask you about?


Any final words for aspiring entrepreneurs?

Seek criticism. The power of an entrepreneur is the power to convince, convince others you are doing something amazing. And more dangerously, to convince yourself that you are perfect. Find the people that do not love you and get them to tell you what you are doing wrong. Your friends, for the most part, are not good at criticizing you so you have to look else where. And if you don't know where to find criticism, go to Reddit. Redditors will tell you precisely what they think. You have to take their thoughts, filter them, and then improve yourself.

I need a banana after that, I have some hand cramps.

You can find out more about Loose Leaf Tea at their website. You can also interact with them on Facebook and Twitter.

Mon, 24 Nov 2014 20:17:52 +0000 Dane Carlson

One is important for the idea. The other for the execution. Can you guess which one is which?


Mon, 24 Nov 2014 18:06:22 +0000 Dane Carlson

A few months ago I made the trek to the sylvan campus of the IBM research labs in Yorktown Heights, New York, to catch an early glimpse of the fast-arriving, long-overdue future of artificial intelligence. This was the home of Watson, the electronic genius that conquered Jeopardy! in 2011. The original Watson is still here-it’s about the size of a bedroom, with 10 upright, refrigerator-shaped machines forming the four walls. The tiny interior cavity gives technicians access to the jumble of wires and cables on the machines’ backs. It is surprisingly warm inside, as if the cluster were alive.

Today’s Watson is very different. It no longer exists solely within a wall of cabinets but is spread across a cloud of open-standard servers that run several hundred “instances” of the AI at once. Like all things cloudy, Watson is served to simultaneous customers anywhere in the world, who can access it using their phones, their desktops, or their own data servers. This kind of AI can be scaled up or down on demand. Because AI improves as people use it, Watson is always getting smarter; anything it learns in one instance can be immediately transferred to the others. And instead of one single program, it’s an aggregation of diverse software engines-its logic-deduction engine and its language-parsing engine might operate on different code, on different chips, in different locations-all cleverly integrated into a unified stream of intelligence.

Consumers can tap into that always-on intelligence directly, but also through third-party apps that harness the power of this AI cloud. Like many parents of a bright mind, IBM would like Watson to pursue a medical career, so it should come as no surprise that one of the apps under development is a medical-diagnosis tool. Most of the previous attempts to make a diagnostic AI have been pathetic failures, but Watson really works. When, in plain English, I give it the symptoms of a disease I once contracted in India, it gives me a list of hunches, ranked from most to least probable. The most likely cause, it declares, is Giardia-the correct answer. This expertise isn’t yet available to patients directly; IBM provides access to Watson’s intelligence to partners, helping them develop user-friendly interfaces for subscribing doctors and hospitals. “I believe something like Watson will soon be the world’s best diagnostician-whether machine or human,” says Alan Greene, chief medical officer of Scanadu, a startup that is building a diagnostic device inspired by the Star Trek medical tricorder and powered by a cloud AI. “At the rate AI technology is improving, a kid born today will rarely need to see a doctor to get a diagnosis by the time they are an adult.”

Medicine is only the beginning. All the major cloud companies, plus dozens of startups, are in a mad rush to launch a Watson-like cognitive service. According to quantitative analysis firm Quid, AI has attracted more than $17 billion in investments since 2009. Last year alone more than $2 billion was invested in 322 companies with AI-like technology. Facebook and Google have recruited researchers to join their in-house AI research teams. Yahoo, Intel, Dropbox, LinkedIn, Pinterest, and Twitter have all purchased AI companies since last year. Private investment in the AI sector has been expanding 62 percent a year on average for the past four years, a rate that is expected to continue.

Amid all this activity, a picture of our AI future is coming into view, and it is not the HAL 9000-a discrete machine animated by a charismatic (yet potentially homicidal) humanlike consciousness-or a Singularitan rapture of superintelligence. The AI on the horizon looks more like Amazon Web Services-cheap, reliable, industrial-grade digital smartness running behind everything, and almost invisible except when it blinks off. This common utility will serve you as much IQ as you want but no more than you need. Like all utilities, AI will be supremely boring, even as it transforms the Internet, the global economy, and civilization. It will enliven inert objects, much as electricity did more than a century ago. Everything that we formerly electrified we will now cognitize. This new utilitarian AI will also augment us individually as people (deepening our memory, speeding our recognition) and collectively as a species. There is almost nothing we can think of that cannot be made new, different, or interesting by infusing it with some extra IQ. In fact, the business plans of the next 10,000 startups are easy to forecast: Take X and add AI. This is a big deal, and now it’s here.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %HEADLINESPLUGIN_SHORTDESCRIPTION%. Note: Don't modify the settings here; copy and customize the settings in Main.TWikiPreferences. For example, to customize the USERAGENTNAME setting, create a HEADLINESPLUGIN_USERAGENTNAME setting in Main.TWikiPreferences.

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Show headline news in TWiki pages based on RSS and ATOM news feeds from external sites

  • Refresh rate in minutes for cached feeds. Disable caching: 0, default: 60
    • Set REFRESH = 60

  • Maximum number of items shown. Default: 100
    • Set LIMIT = 100

  • Use LWP::UserAgent, or fallback to TWiki's internal getUrl() method. Default: yes

  • Timeout fetching a feed using the LWP::UserAgent. Default: 20

  • Name of user agent. Default: TWikiHeadlinesPlugin/2.21
      * Set USERAGENTNAME = TWikiHeadlinesPlugin/2.21

  • Default header: (variables are explained in the syntax rules)
      * 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>

  • Default format of one item: (variables are explained in the syntax rules)
      * Set FORMAT = <div class="headlinesArticle"><div class="headlinesTitle"><a href="$link">$title</a></div>$n<span class="headlinesDate">$date</span> <span class="headlinesCreator"> $creator</span> <span class="headlinesSubject"> $subject </span>$n<div class="headlinesText"> $description</div></div>

  • Values taken from configure: (only supported if CPAN:LWP is installed)
    • $TWiki::cfg{PROXY}{HOST} - proxy host, such as "";
    • $TWiki::cfg{PROXY}{PORT} - proxy port, such as "8080";
    • $TWiki::cfg{PROXY}{SkipProxyForDomains} - domains excluded from proxy, such as ",";

Style sheets

The default HEADER and FORMAT settings use the following styles. See the style.css file defining the default CSS properties (indentation illustrates enclosure).

  • headlinesRss: output of the HeadlinesPlugin (div)
    • headlinesChannel: channel header (div)
      • headlinesLogo: channel logo (div)
      • headlinesTitle: channel title (div)
      • headlinesDate: channel date (div)
      • headlinesDescription: channel description (div)
      • headlinesRight: channel copyright (div)
    • headlinesArticle: one news item (div)
      • headlinesTitle: article title (div)
      • headlinesDate: article date (span)
      • headlinesCreator: author of article (span)
      • headlinesSubject: subect category of the article (span)
      • headlinesText: article text (div)

Plugin Installation Instructions

  • Download the ZIP file
  • Unzip it in your twiki installation directory. Content:
    File: Description:
    data/TWiki/HeadlinesPlugin.txt plugin topic
    pub/TWiki/HeadlinesPlugin/style.css default css
    lib/TWiki/ plugin perl module
    lib/TWiki/HeadlinesPlugin/ plugin core
    Check if above examples show a news feed instead of variable.
  • Optionally, run to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
  • Alternatively, manually make sure the dependencies listed in the table below are resolved.
    Digest::MD5>=2.33Required. Download from CPAN:Digest::MD5
    LWP::UserAgent>=5.803Optional. Download from CPAN:LWP::UserAgent

Plugin Info

Plugin Author: TWiki:Main.PeterThoeny, TWiki:Main.MichaelDaum
Copyright: © 2002-2009, Peter Thoeny, TWIKI.NET; 2005-2007, Michael Daum
License: GPL (GNU General Public License)
Plugin Version: v2.21 - 12 Feb 2009
Change History:  
12 Feb 2009: {PROXY}{HOST} supports domain with and without protocol -- Peter Thoeny
06 Feb 2009: added {PROXY}{SkipProxyForDomains} configure setting, added USERAGENTNAME plugin setting -- Peter Thoeny
11 Dec 2008: added {PROXY}{HOST} and {PROXY}{PORT} configure settings -- Peter Thoeny
13 Sep 2007: fixed parsing of content:encoded
23 Jul 2006: improved atom parser; if a posting has no title default to 'Untitled'
26 Apr 2006: added lazy compilation
10 Feb 2006: packaged using the TWiki:Plugins/BuildContrib; minor fixes
03 Feb 2006: off-by-one: limit="n" returned n+1 articles; make FORMAT and HEADER format strings more robust
23 Jan 2006: released v2.00
05 Dec 2005: internal feed urls must be absolute
02 Dec 2005: added web.topic shorthand for internal feeds
29 Nov 2005: fixed CDATA handling
21 Nov 2005: added ATOM support; extended RSS support; added dublin core support; added content support; optionally using LWP to fetch feeds to follow redirections; corrected CPAN dependencies ; recoding special chars from html integer to entity encoding to increase browser compatibility; added css support; use getWorkArea() if available
11 May 2005: TWiki:Main.WillNorris: added DevelopBranch compatability
31 Oct 2004: Fixed taint issue by TWiki:Main.AdrianWeiler; small performance improvement
29 Oct 2004: Fixed issue of external caching if mod_perl or SpeedyCGI is used
02 Aug 2002: Implemented caching of feeds, thanks to TWiki:Main/RobDuarte
11 Jun 2002: Initial version (V1.000)
Perl Version: 5.8
TWiki:Plugins/Benchmark: GoodStyle 100%, FormattedSearch 99.5%, HeadlinesPlugin 94%
Plugin Home: TWiki:Plugins/HeadlinesPlugin
Feedback: TWiki:Plugins/HeadlinesPluginDev
Appraisal: TWiki:Plugins/HeadlinesPluginAppraisal

-- TWiki:Main.PeterThoeny - 12 Jan 2009
-- TWiki:Main.MichaelDaum - 13 Sep 2007

Edit | Attach | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2009-02-12 - 19:55:45 - TWikiContributor
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on at TWiki:TWiki.HeadlinesPlugin