Headlines Plugin


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

Note: Syndic8.com ( http://www.syndic8.com/ ) lists many RSS feeds.

Syntax Rules


ParameterSorted ascending 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
format Format of one item. Can include these variables:
- $title: news item title (item.title)
- $link: news item link (item.link)
- $description: news item description (item.description)
- $date: the publication date (item.pubDate, item.date)
- $category: the article category (item.category)
Global FORMAT setting
header Header. Can include these variables: - $channeltitle, $title: title of channel (channel.title)
- $channellink, $link: link of channel (channel.link)
- $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 (image.link)
- $imageurl: URL of image (image.url)
- $imagedescription: description of image (image.description)
Global HEADER setting
href="..." (Alternative to above) N/A
limit="12" Maximum number of items shown Global LIMIT setting
refresh="60" Refresh rate in minutes for caching feed; "0" for no caching Global REFRESH setting
touch="..." Touch (edit/save) topics if the feed has updates. Specify a comma-space delimited list of TopicNames or Web.TopicNames, such as "%TOPIC%, NewsLetter". Useful to send out newsletter using MailerContrib, showing new feeds since last newsletter. To update feeds, visit topics with feeds in regular intervals (using cron with wget or the like). N/A

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


%HEADLINES{ "http://slashdot.org/slashdot.rdf" 
  header="*[[$link][$title]]:* $description" 
  format="$t* [[$link][$title]]"
to get the latest Slashdot news as a bullet list format:

Business Opportunities Weblog


%HEADLINES{ "http://www.business-opportunities.biz/feed" limit="2" }%

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

Thu, 30 Oct 2014 03:14:12 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Thu, 30 Oct 2014 03:12:05 +0000 Dane Carlson

A hardware store in California has the first robotic shopping assistants. Soon, they’ll be everywhere.

In the future, we’ll be writing books in our sleep. This is really going to change NY Times Best Seller list.

Blink: Honey, we shrunk the optometrist’s office. It fit’s on the table, and makes house calls.

How often have you had this problem: “The trouble with ignorance is that it feels so much like expertise.”

This flying ambulance drone will probably save your life one day.

Wed, 29 Oct 2014 22:09:50 +0000 Dane Carlson

Instagate: Tailgate In A Box™ is the easiest way to tailgate, BBQ, or picnic anywhere, anytime. The, patent-pending, Instagate, has everything you need to keep the party going including a 60 quart cooler, a grill, 3 grilling tools, 3 fold out table platforms, condiments, cups, plates, utensils, napkins, ping pong balls, a lighter/bottle opener, recycling bags and trash bags. It’s made of eco-friendly recyclable and biodegradable materials so you can just bring the fun, and leave the mess when you’re done.

Invented by Matthew MacLean, a Kickstarter campaign to raise $25,000 was successful earlier this month. Last week, Matt pitched his product live on ABC’s Good Morning America. Afterwards, I spoke with him about Instagate.

My questions are below in bold. Enjoy!

Hi Matt – Thank you for taking the time to answer my interview questions. Why did you create Instagate?

I started this business because it is something I am passionate about. I want to make people's lives easier anyway I can, and my first product, the Instagate: Tailgate In A Box, does exactly that. The Instagate came naturally as a solution to a problem that myself and many people face. Tailgating is a lot of fun, but planning one is also a lot of work. Instagate makes tailgating and barbecuing somewhere easier and more affordable for everyone who wants to spend less time packing, prepping, and cleaning up and more time having fun.

How did you bring it to life?

It took a lot of work getting to where we are now, and I foresee even more work ahead, but it mostly involved a lot of phone calls, clear communication, a ton of meetings with manufacturers, doing market research, working with designers, and putting together the best product we could come up with.

Where do you see the business in five years?

I have big dreams for Instagate. Most of which I will keep to myself for now, but I really see Instagate as the future of tailgating for a certain demographic of the market. We will not try to be the solution for everyone, but for the people who want an easier and more convenient way of tailgating, barbecuing, or picnicking we are focused on providing the best and most creative turnkey solutions for them. We plan on the original Instagate, which we are in the process of launching now, to be the first of many creative solutions.


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

There are only so many minutes in a day, so getting this product together in time for our Kickstarter launch was a matter of prioritization. That being said, there are things that we had to spend more time focusing on and in turn, had less time to spend on other things. Other things I would like to spend more time on include promoting, advertising, and marketing. It's hard to get the word out on a new product coming to market. Luckily, Kickstarter was a great platform to launch on and I believe we will have more opportunities to make improvements in our business model going forward.

What does your typical day look like?

The first thing I do every day is make a list of my top 3 priorities for that day then underneath the top 3, I list everything else that is on my to do list. I always try and make sure I get the top 3 items done first, and then try to accomplish as much of the rest of the list as possible. I try to prioritize my e-mails as much as I can and not let them bog me down too much. I typically spend most of my day on the phone, putting documents and ideas together, getting feedback from people that I trust, thinking of new opportunities, and staying as organized as possible. I am learning that prioritization of tasks is extremely important and knowing what must get done first is key to being successful. Staying on top of things and making sure you are moving forward at all times is extremely important.

What is one trend that really excites you?

I am a big supporter of the so called ''entrepreneurial revolution''. The idea that in today's society the individual has exponentially more resources to help them start their business than he or she had 50, 25, or even 5 years ago. I believe if you have a good solution for a problem that a lot of people have, there has never been a better time than now to bring that idea to reality. It is really a very exciting time to be an entrepreneur.

What was the worst job you ever had and what did you learn from it?

I cleaned bathrooms at one of the biggest dive bars in the country when I was in college. I learned many things from that experience that you would probably not want me to share, but one I can share is that it taught me that there is no job that is too small and even the littlest jobs are important to the success of a larger business.

As an entrepreneur, what is the one thing you do over and over and recommend everyone else do, too?

Establish a productive daily routine and stick to it. Live in day tight compartments. Plan for the future and learn from the past, but focus on what you can do each day to make yourself better.

What is one failure you had as an entrepreneur, and how did you overcome it?

Our go to market product for Instagate is the 8th iteration of our prototype. The original design had problems, but I just kept focusing on solving each problem as they arose and it led to the product we have today. I believe every problem has a solution, and each obstacle you face can be overcome in one way or another. It may not be the way you originally planned on things working, but adapting and overcoming these obstacles is key.

What is one business idea that you are willing to give away to our readers?

I am a big believer in using technology (in the right way) to making people's lives easier. Instagate is what I am focused on now, but I have a bunch of ideas on the back burner that do just this. A very abstract idea I have is some kind of technology that I can best sum up as ''Pandora for your lifestyle''. Pandora is great at recommending songs that fit your mood and your taste in music. With all the advances in biometrics and neuroscience that are going on today, I would love to develop some kind of product that brings this idea to your lifestyle, recommending things to do, people to catch up with, new products, etc. that increase your overall well-being and happiness. I know it sounds out there, but I am still working on it.

If you could change one thing in the world, what would it be and how would you go about it?

I would reduce the negative feedback loop that seems to pervade media channels throughout the world. There is too much negativity in our world today. We live in an amazing world, yes there are things that we need to improve upon on as a society, but we also need to focus more on all the great things that happen every day in the world.

What are your three favorite online tools or resources and what do you love about them?

I love anything that helps with productivity. Some apps that I use right now are Trello, Todoist, and Wave Receipts. All these help improve my business efficiencies and help me get the things that I need to do done.

What is the one book that you recommend our community should read and why?

That's a tough one. I am a fan of so many books and have taken bits and pieces of advice and information from so many that are so important to me. One book that I can say was literally ''life-changing'' for me would be the ''4 Hour Work Week'' by Tim Ferriss. It is a very interesting look on work life and although I do not believe a 4 hour work week is really practical or even good for you or society, it does provide a lot of resources and advice that helped me transition from the corporate grind of finance into entrepreneurship. I believe the key for all of us is finding the right balance of personal life and work life. An added bonus is if you can focus your work life on something you are passionate about.

When was the last time you laughed out loud? What caused it?

Last night, when my girlfriend and I were commiserating on how terribly our Fantasy Football teams were doing. She gets more upset than I do, which I find hilarious for some reason.

Who is your hero?

I have so many role models. Lori Greiner, Marc Cuban, Richard Branson, and so many more, but I have to say my heroes are my parents. I am lucky to have two amazing parents who have taught me so much and have supported me no matter what I do.

Do you (or did you ever) have a mentor?

I've had various mentors throughout my education and professional careers. I believe finding someone who is experienced in your field is not just important, but imperative to success. They can teach you so many things and help you avoid making the same mistakes that they have made.

Where can we find out more about your company?

You can find out more about our company at www.instagating.com.

Where can we find your business on social media?


Thanks again for taking the time to talk to me today!

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 "proxy.example.com";
    • $TWiki::cfg{PROXY}{PORT} - proxy port, such as "8080";
    • $TWiki::cfg{PROXY}{SkipProxyForDomains} - domains excluded from proxy, such as "intra.example.com, bugs.example.com";

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/HeadlinesPlugin.pm plugin perl module
    lib/TWiki/HeadlinesPlugin/Core.pm plugin core
    Check if above examples show a news feed instead of variable.
  • Optionally, run HeadlinesPlugin_installer.pl 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 http://wikiring.de
License: GPL (GNU General Public License)
Plugin Version: v2.3 - 29 Aug 2009
Change History:  
29 Aug 2009: added touch parameter -- Peter Thoeny
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 - 29 Aug 2009

Topic revision: r2 - 2009-08-29 - 14:55:14 - 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 TWiki.org at TWiki:TWiki.HeadlinesPlugin