r2 - 2009-08-29 - 21:55:14 - TWikiContributorYou are here: TWiki >  TWiki Web  > HeadlinesPlugin

Headlines Plugin

Description

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

%HEADLINES{"..."}%

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
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
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
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

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>.

Examples

Slashdot News

Write

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

Business Opportunities Weblog

Write

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

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

Wed, 26 Nov 2014 15:51:58 +0000
The original blog about business opportunities and business ideas for small business entrepreneurs
Wed, 26 Nov 2014 13:50:56 +0000 Dane Carlson

Over the past four years, the rock band Phish has generated over $120 million in ticket sales, handily surpassing more well known artists like Radiohead, The Black Keys, and One Direction. Since their start 30 years ago, Phish has consistently been one of the most popular and lucrative touring acts in America, generating well over a quarterbillion dollars in ticket sales.

Yet, by other measures, the band isn’t popular at all. Only one of their original albums has ever made the Billboard top 10 rankings. None of their 883 songs has ever become a popular hit on the radio. They’ve made only one music video to promote a song, and it was mocked mercilessly by Beavis and Butthead on MTV.

If the traditional band business model is to generate hype through the media and radio airplay, and then monetize that hype through album sales and tours, Phish doesn’t fit the model at all. For a band of their stature, their album sales are miniscule and radio airplay non-existent. And so when the “music business” cratered in the 1990s because of file-sharing and radio’s importance declined because of the internet, Phish remained unaffected and profitable as ever.

Phish doesn’t make money by selling music. They make money by selling live music, and that, it turns out, is a more durable business model.

Tue, 25 Nov 2014 22:06:52 +0000 Dane Carlson

Nothing says Thanksgiving quite like a pecan pie. Sure, the turkey, stuffing, mashed potatoes and cranberry sauce are important, and apple and pumpkin pies are more widely made and eat, but pecan pie, with its sweet nuttiness, is the perfect Thanksgiving dessert.

The pie is overly sweet, contains both a crunch, and gooey center, and contains nearly as many calories per slice as an entire plate mounded high with turkey and all the fixings. It’s an over-the-top end, to an over-the-top meal.

In other words, it’s heaven.


Consisting almost entirely of one ingredient (and I don’t mean the pecans), the pie seems like it was almost made to be marketed as candy with a crust. And the truth is, that’s not too far from the truth.

Because for whatever else it is, pecan pie is also a content marketing masterpiece.

And I’m going to prove it to you.

To really understand how pecan pie came about, we have to go back to the beginning. Not to to the first Thanksgiving, when the Pilgrims in their funny hats and buckled shoes shared in the bounty of the friendly American indians, but back to the early days of the sugar refining business.


Sugar!

Americans have always loved their sweets, but they weren’t always cheap.

Historically, the primary sweetener in North America was maple syrup, the sap of the sugar maple tree. Native Americans had long been collecting and consuming maple syrup. As much as 12% of the diet of some northeastern tribes was what they called “tree water.” The Native Americans caught the sap from the tree in hollowed or carved-out logs and cooked it by dropping hot rocks into the collected sap. Early European settlers learned from the natives how to collect the sap, and improved on the refining process. By 1800, Americans consumed 18 pounds of sugar per year, the bulk of which was maple syrup and its derivatives.

Refined cane sugar and molasses were also available domestically, but the fact that they were produced from sugar cane, which only grew in the subtropical latitudes of the Caribbean Sea, and had be processed on-site, made it more expensive to import during the age of the sailing ship.


By the late 1800s, though, the status of maple syrup and cane sugar had switched. By this time, lumber harvesting has decimated the trees, and less than 20% of the northeastern United States was still forested. The steam ship dramatically reduced transportation costs, and processed cane sugar because proportionately cheaper and more widely available. Effectively by the end of the century, cane sugar had become the commodity sweetener and maple syrup had become the luxury item, something only to be used once a week on a pile of steaming pancakes.

By 1900, the average American consumed, 90 pounds of sugar, primarily from cane sugar.

With this century-long rapid increase in demand for sweets, other innovations followed.

Just before the American Civil War, a process was created to extract corn starch from the corn kernel. These starches were primarily used in the starching of clothing in the laundry business, but immediately following the war, in 1866, it was discovered that dextrose sugar could be further extracted from the corn starch. Within about a decade, the process was more or less perfected, and corn sugar, also known as corn syrup, became available for purchase.

Although corn syrup was easy to make, and in some areas of the country very inexpensive, it was sold in large barrels to retailers who’d refill customers’ jugs with a ladle.

The messy process wasn’t ideal, and in 1902, the Corn Products Refining Co. of New York and Chicago, created and began selling Karo Syrup, the first corn syrup packaged in a small container specifically for use at home.

KaroBottles


So what’s all this have to do with the pecan pie? Although most people assume that the pie has it’s origins in the colonial period, because, after all, how difficult could it have been to collect the pecans that fall off the trees and ripen in the fall, and then mix them into a molasses or maple syrup sauce and bake it, it turns out that no written recipes can be found for the pecan pie that date to before 1930. And to understand why, we have to look at how corn syrup, and especially Karo Syrup was marketed in the early 20th century.


karo-1903

Karo Syrup and Their Content Marketing

At first, Karo Syrup was sold as a wonder food. A 1903 advertisement in The Pittsburgh Press reads:

“As a food product, corn heads the list of grains in nutritive elements necessary to human sustenance. The process of extracting and retaining these valuable food properties have made KARO CORN SYRUP “The Great Spread for Daily Bread.” A golden syrup so good, pure and wholesome that infant, invalid or dyspeptic can eat it with safety. It’s a table delight for morning, noon or night. Coaxes the appetite and makes you eat. Sold at grocers, 10c, 25c and 50c tins.”

A dyspeptic person is one who is suffering from indigestion, and consequent irritability and depression. So, in other words, Karo Syrup was originally advertised as a cure for depression.

In the early 20th century, there were no federal laws that regulated the contents and sale of food and pharmaceuticals. Instead, a patchwork of various state laws provided varying degrees of protection against unethical sales practices. But, in 1906, under President Theodore Roosevelt, the Food and Drug Act was signed into law.

The Act prohibited, under penalty of seizure of goods, the interstate transport of food which had been “adulterated or misbranded.” According to the Act, adulterated referred to the addition of fillers of reduced “quality or strength,” coloring to conceal “damage or inferiority,” formulation with additives “injurious to health,” or the use of “filthy, decomposed, or putrid” substances. Another law in 1912 added “false and fraudulent” claims of “curative or therapeutic effect” to the Act’s definition of “misbranded.”


Overnight, the makers of Karo Syrup could not longer market and sell their syrup as a wonder elixir designed to cure hunger and end depression. A new strategy had to be developed.

In 1910, the Corn Products Refining Company launched an enormous, $250,000 ($6.5 million today), advertising campaign to create national awareness and demand for Karo brand corn syrups.

As part of this campaign, the first Karo Cook Book was published. Compiled and written by Emma Churchman Hewitt, former associate editor of the Ladies Home Journal, this 50 page booklet contained more than 150 recipes, most of which contained Karo Syrup, including asparagus soup. The book even cautioned that “to prevent Karo Syrup from burning, drop in three of four stone marbles. The heat will keep these constantly on the move and will not only prevent the burning but will do most of the stirring.”

Surprisingly, pecan pie was not one of the recipes compiled in the first Karo Cook Book. For that, we have to wait until 1930, when according to ACH Food Companies, Inc., the current owner of Karo Syrup, “the wife of a corporate sales executive discovered a new use for corn syrup. A mixture of corn syrup, sugar, eggs, vanilla and pecans baked in a pie shell produced the now classic Pecan Pie. Down South, today, that same recipe continues to be called Karo Pie.”

At the time, most newspapers published weekly “favorite recipe” columns, where female readers would send in their favorite recipes for publication, and other readers would clip them and add them to their recipe books. In a sense, these newspaper columns were the blogs and Facebook of the early 20th century.

Almost overnight, the pecan pie began to dominate these newspaper columns, especially in the weeks leading up to Thanksgiving and Christmas.

A 1931 recipe for “Karo Pecan Pie” from the Sallisaw, Oklahoma Democrat-America, called for “3 eggs, 1 cup Karo (blue label), 4 tablespoons corn meal, 1/2 cup sugar, 1/2 cup chopped pecans or less if desired, 2 tablespoons melted butter, pastry.”

Another, from 1938, called the “White House Pecan Pie” also specifically called for 1 cup of dark Karo Syrup.

This “grassroots advertising campaign” must have worked, because Karo began incorporating the recipe advice columns directly into their market budget in the 1940s.

A sponsored content column in the Big Spring Daily Herald, published in 1941, called “Surprise the Folks with Karo Pecan Pie Tonight…it’s wonderful!” described how to bake this “Texas favorite” with “1 cup of Karo (Blue Label).”

Another paid placement in 1942 described the pecan pie this way: “I have nibbled at the Utterly Deadly Southern Pecan Pie, and have served it to those in whose welfare I took no interest, but being included to plumpness, and having as well a desire to see out my days on earth, I have never eaten a full portion.”

By the late 1940s, when the many of the people who’d remember the 19th had died off, Karo was no longer a sold as a therapeutic syrup, but instead the inexpensive and nutrition-less corn syrup was marketed as the basis for a decadent desert reminiscent of the antebellum pre-Civil War South.

Following World War Two, in 1949, Karo Syrup published a new cookbook, called Karo Kookery, which prominently featured the pecan pie as delicacy of the American diet. Karo also began printing the recipe for the pie directly on the bottle of syrup.


The Abraham Lincoln Connection

Spurred in large part by Walt Disney and television in the 1950s, America began to look back, romantically, at their past. And there was no historical figure that Walt Disney, and America, loved more than Abraham Lincoln.

Abraham Lincoln was America’s first President to be assassinated in office, having been tragically shot in Ford’s Theater in Washington D.C. in April 1865, while watching a play from his private box. Over the years, his story left an impression on countless people including Walt Disney. Walt Disney admired Lincoln greatly, so much so that when Walt was asked to develop attractions for the New York World’s Fair in 1964, he created the first animatronic Lincoln to deliver inspiring words to the throngs of people who came to see it. When the fair ended it’s run, Lincoln was taken to Disneyland and set up in the Opera House to continue his speech for ever.

In the buildup to the hundredth anniversary of his death in 1965, America could be said to have Lincoln-mania. It wasn’t just television and Disneyland that cashed in on this: dozens of new biographies were written, as were more than a few cookbooks of the former President’s favorite dishes.

More than one cookbook relayed that Lincoln’s favorite dessert was a pecan pie that he supposedly ordered, by wagon-load, from The Excelsior Pie and Cake Bakery in Washington, D.C. The included recipes almost always consisted of the standard Karo Syrup recipe, with or without a little include molasses for a some added historical character.

Let me remind you, again, that Abraham Lincoln was assassinated in 1865, and that the process for extracting dextrose from corn starch wasn’t invented until in 1866 — one year after his death, and that there are no written recipes for pecan pie dating to before 1930.


Today, pecan pie is a traditional pie enjoyed by at least 25% of the population of the United States on Thanksgiving. It is, truth be told, my favorite pie. But there’s nothing traditional about it, unless your definition of traditional only goes back two, or maybe three, generations and is based on the content marketing of one specific company.


Content Marketing Lessons from Pecan Pie

So, what can we learn from Karo Syrup’s content marketing? I see six lessons that you can use.

  1. Don’t Just Sell a Product, Tell a Story. Karo’s brilliant “discovery” of the pecan pie recipe in 1930 undoubtedly saved the company from financial ruin. Without the pie, there’d be nothing to talk about. This article about Karo wouldn’t exist. And most importantly, there’d be no bottle of Karo Syrup on my counter.

  2. Get your customers to spread the word for you. Karo Syrup’s success, in large part, was based on the recipes it’s customers sent into their local newspapers. Sharing information in newspaper columns, and clipping out other columns was one of the primary methods of sharing content in the early 20th century. Whatever method is popular today, get your customers to frame your story such that your customers will spread it themselves.

  3. Add Perceived Value Ounce for ounce, the cost of making Karo Syrup can’t be very high. Consequently, it should probably be priced at, or below, the cost of sugar. But, by connecting it with something decadent and delicious it suddenly gains status, and by extension, a perceived higher value. This equates directly to being able to charge higher prices.

  4. Challenge Conventions to Expand Your Market I’m sort of a health-food nut, and I’d almost be embarrassed to buy a bottle of Karo Syrup. What if someone saw me, and saw it my shopping cart? But include a carton of eggs, a bag of sugar, a bottle of vanilla, and a stick of butter, and I don’t have anything to be ashamed of. I have the makings of a pecan pie!

  5. Package Your Product in Some Excellent Content I would eat almost anything else, before I’d gulp down a bottle of Karo Syrup. But, place a pecan pie and fork in front of me, and I’ll eat the whole bottle!

  6. Nobody Cares About You, They Care About What They Love Nobody loves Karo Syrup. I’d bet that in spite of their 1903 advertising, no one spreads Karo Syrup on their toast in the morning. No one gives Karo Syrup to their babies and grandmothers when they won’t eat. Nobody cares about Karo Syrup and what the company said. They care about pecan pie. Nevermind, that Karo Syrup and pecan pie are one in the same.

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
    • Set USELWPUSERAGENT = yes

  • Timeout fetching a feed using the LWP::UserAgent. Default: 20
    • Set USERAGENTTIMEOUT = 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.
    NameVersionDescription
    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

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
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