diff --git a/lib/RssBraider.js b/lib/RssBraider.js
index e0b199a..971b380 100644
--- a/lib/RssBraider.js
+++ b/lib/RssBraider.js
@@ -69,7 +69,7 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback)
async.each(feed.sources, function(source, callback) {
var count = source.count || feed.default_count || 10,
- url = source.url || null,
+ url = source.feed_url || null,
file_path = source.file_path || null,
source_articles = [];
@@ -110,10 +110,10 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback)
item;
while ( item = stream.read() ) {
- if (source.url) {
- item.source_url = source.url;
+ if (source.feed_url) {
+ item.source_url = source.feed_url;
}
- var article = self.processItem(item);
+ var article = self.processItem(item, source);
if (article) {
source_articles.push(article);
}
@@ -141,10 +141,14 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback)
// Create new feed with these articles
var options = {
title : feed.meta.title,
- site_url : "http://www.kqed.org",
description : feed.meta.description,
generator : feed.meta.generator || 'rss-braider',
- feed_url : feed.meta.url,
+ site_url : feed.meta.site_url || null,
+ feed_url : feed.meta.feed_url || null,
+ image_url : feed.meta.image_url || null,
+ webMaster : feed.meta.webMaster || null,
+ copyright : feed.meta.copyright || null,
+ categories : feed.meta.categories || null,
custom_namespaces : feed.custom_namespaces || [],
no_cdata_fields : feed.no_cdata_fields
};
@@ -172,7 +176,7 @@ RssBraider.prototype.processFeed = function(feed_name, format, callback)
};
// Accepts a feed-parser item and builds a node-rss itemOptions object
-RssBraider.prototype.processItem = function (item) {
+RssBraider.prototype.processItem = function (item, source) {
var self = this;
if (!item) {
@@ -195,20 +199,22 @@ RssBraider.prototype.processItem = function (item) {
// Run the plugins specified by the "plugins" section of the
// feed config file to build out any custom elements or
// do transforms
- self.runPlugins(item, itemOptions);
+ self.runPlugins(item, itemOptions, source);
+ // logger.info("returning for item.guid:" + item.guid);
return itemOptions;
};
-RssBraider.prototype.runPlugins = function (item, itemOptions) {
+RssBraider.prototype.runPlugins = function (item, itemOptions, source) {
var self = this,
- feed_plugins = self.feed.plugins || [];
+ feed = self.feed,
+ feed_plugins = feed.plugins || [];
// Process the item through the desired feed plugins
feed_plugins.forEach(function(plugin_name){
if (self.plugins[plugin_name]) {
- // logger.info("DEBUG runPlugins running " + plugin_name);
- self.plugins[plugin_name](item, itemOptions);
+ // logger.info("DEBUG runPlugins running " + plugin_name + " for item " + item.guid + " in feed: " + feed.meta.title);
+ self.plugins[plugin_name](item, itemOptions, source);
} else {
logger.error("A plugin named '" + plugin_name + "' hasn't been registered");
}
diff --git a/lib/plugins/content_encoded.js b/lib/plugins/content_encoded.js
index 9e933c3..663450b 100644
--- a/lib/plugins/content_encoded.js
+++ b/lib/plugins/content_encoded.js
@@ -17,4 +17,5 @@ module.exports = function (item, itemOptions) {
}
);
}
+ return;
};
\ No newline at end of file
diff --git a/lib/plugins/kqed.js b/lib/plugins/kqed.js
index d25e6c8..39847ed 100644
--- a/lib/plugins/kqed.js
+++ b/lib/plugins/kqed.js
@@ -1,11 +1,39 @@
// define kqed source
-module.exports = function (item, itemOptions) {
- if (!item || !itemOptions) {
+module.exports = function (item, itemOptions, source) {
+ if (!item || !itemOptions || !source) {
return;
}
- if (item.source_url) {
+ // Look for kqed namespace elements in source and add as custom elements for item
+ // Ex:
+ //
The performance space and dance school …read more
Source:: Arts News
@@ -30,6 +32,8 @@The transportation isn’t entirely complete, especially when unavoidable elements of the library’s physical space interrupt the installation of vitrines, wall text and objects. But reading first-hand accounts by Miller’s colleagues of his various contributions to both the Exploratorium and scientific discovery, I wished I’d wandered the museum with him at any point in his twenty year tenure. Documentation and ephemera will never be as entertaining as the man himself, but Light Walk: Bob Miller and the Exploratorium presents one man’s creativity, playfulness and lasting impact on an institution, leaving the viewer itching for the simple tools of his trade: sunlight, paper and an irrepressible curiosity.
Light Walk is installed on the library’s fourth floor, rubbing elbows with the art, music and recreation collections. Four large cases present short anecdotes about Miller and related materials from the Exploratorium archives: photographs, magazine clippings, patent documents and museum publications. The bits and pieces coalesce into a picture of Miller — much like his Light Walk, an exploration of sunlight, shadow, refraction and perception builds on basic demonstrations to build a larger understanding of the natural world.
@@ -56,6 +60,8 @@If you’re interested in visiting the city’s illuminated installations, the SF Travel Association has compiled a map and a list of tours and other events. (KQED critic Christian Frock rates the 16 works listed on the map as ranging “from meh to spectacular” — read her commentary. ) A free light art bike tour this Saturday will give cyclists a chance to shine. Meanwhile, enjoy Peter Ruocco’s video exploration of these dazzling works.
]]>Songs that were performed include Snoop Dogg’s “Gin And Juice,” Digable Planets’ “Rebirth of Slick (Cool Like Dat),” and many others. Read a statement from the curator of the event, Marc Bamuthi Joseph, here. (Also, we asked Joseph to pick his Top 5 hip-hop songs from 1993, which you can read here.)
Enjoyed that? Watch this performance, by Ensemble Mik Nawooj, of the Wu-Tang Clan’s “C.R.E.A.M.” from that same night.
@@ -88,6 +96,8 @@Icons are sought after and are coming to be needed more and more. Perhaps it is easier to understand an image than it is to know the world, let alone how to change it.
Uploading an icon to a profile picture or posting a response or article bleeds into thousands who are doing the same and suddenly an entire social media feed is parroting the same visual calls. Today, protest icons are disseminated rapidly and with such reach that, while the news is mired in arguing over factual evidence of whether or not Mike Brown’s hands were actually raised or not, the image has already hit the streets. There thousands of protesters begin to raise their hands and take photos with their hoodies pulled tight or make videos of themselves dumping buckets of ice over their heads.
diff --git a/test/expected_output/dateDescOutput.xml b/test/expected_output/dateDescOutput.xml index 80e0e7f..22fb1bc 100644 --- a/test/expected_output/dateDescOutput.xml +++ b/test/expected_output/dateDescOutput.xml @@ -3,7 +3,7 @@It was no easy task summoning memorable moments from the year’s morass, yet here in chronological order are the sequences that, for me, best captured the vitality and intelligent power that movies are capable of expressing.
@@ -59,6 +61,8 @@
@@ -99,6 +103,8 @@
Ensemble Mik Nawooj (EMN) is the brainchild of composer/pianist JooWan Kim, who introduces western-European classical techniques into hip-hop, rock, and pop. The group’s lineup includes traditional Pierrot ensemble instrumentation (flute, clarinet, violin, cello and piano) with a lyric soprano, deep funk drums, a heavy contrabass and two featured MCs. Kim is a classically trained composer who holds degrees from Berklee College of Music and San Francisco Conservatory of Music.
“Nobody has ever attempted anything like this on such a large scale, or with such sophistication.” – NPR
@@ -117,6 +123,8 @@Oakland-based artist Kev Choice is a pianist, MC, producer, bandleader, sideman, music historian and urban griot dedicated to cultural expression. Through his band Kev Choice Ensemble, he produces and performs his own material, including original jazz and classical compositions as well as classical, jazz, and funk-inspired hip-hop.
@@ -136,6 +144,8 @@McHenry and his best friend Chris Dyer are the only two that stuck to it over the years. Now the project has a name, One Thousand Thousand, and a mission to produce one million paintings. Although the impetus was simply to make as much art as possible surrounded by his friends, it eventually took McHenry down an often solitary path. Today he is reaching out to other artists to participate in the project to assure the goal is reached in his lifetime.
“One Thousand Thousand is Christopher Dyer and Jason McHenry,” McHenry is quick to point out. “I honestly do more of the work, produce more pieces; he’s a senior executive at a company in Denver. We’re like partners in crime artistically. All the big projects that we’ve done, we’ve done together. So we push each other that way.”
diff --git a/test/expected_output/fileFeedOutput.xml b/test/expected_output/fileFeedOutput.xml index 72a2dea..316fe66 100644 --- a/test/expected_output/fileFeedOutput.xml +++ b/test/expected_output/fileFeedOutput.xml @@ -3,7 +3,7 @@It was no easy task summoning memorable moments from the year’s morass, yet here in chronological order are the sequences that, for me, best captured the vitality and intelligent power that movies are capable of expressing.
diff --git a/test/feeds/date_sort.js b/test/feeds/date_sort.js index 7e64a4a..ad64076 100644 --- a/test/feeds/date_sort.js +++ b/test/feeds/date_sort.js @@ -20,6 +20,7 @@ var feed = { "name" : "sample_feed", "count" : 5, "file_path" : __dirname + "/../input_files/sample_feed.xml", + "fullname" : "A Sample Feed" }, ] diff --git a/test/feeds/sample_feed_duplicates.js b/test/feeds/sample_feed_duplicates.js index fe98329..79124ed 100644 --- a/test/feeds/sample_feed_duplicates.js +++ b/test/feeds/sample_feed_duplicates.js @@ -20,6 +20,8 @@ var feed = { "name" : "sample_feed", "count" : 1, "file_path" : __dirname + "/../input_files/sample_feed_duplicates.xml", + "fullname" : "A Sample Feed" + }, ] diff --git a/test/feeds/sample_feed_plugins.js b/test/feeds/sample_feed_plugins.js index 018dbec..25f8a7f 100644 --- a/test/feeds/sample_feed_plugins.js +++ b/test/feeds/sample_feed_plugins.js @@ -20,6 +20,7 @@ var feed = { "name" : "sample_feed", "count" : 1, "file_path" : __dirname + "/../input_files/sample_feed.xml", + "fullname" : "A Sample Feed" }, ] }; diff --git a/test/index.js b/test/index.js index a5b9e9e..b9d967b 100644 --- a/test/index.js +++ b/test/index.js @@ -62,6 +62,7 @@ test('deduplicate feed from file', function(t) { if (err) { return t.fail(err); } + // console.log(data); t.equal(data, expectedOutput.fileFeedOutputPlugins); }); });