rla / fast-feed Goto Github PK
View Code? Open in Web Editor NEWVery fast RapidXML-based Node.JS module for parsing newsfeeds (RSS 2 and Atom).
License: Other
Very fast RapidXML-based Node.JS module for parsing newsfeeds (RSS 2 and Atom).
License: Other
I tried installing the module on my Mac, but got lots of errors like these:
CXX(target) Release/obj.target/parser/src/parser.o
In file included from ../src/parser.cc:5:
../src/rapidxml.hpp:1408:21: error: cannot use 'throw' with exceptions disabled
RAPIDXML_PARSE_ERROR("expected <", text);
^
../src/rapidxml.hpp:55:43: note: expanded from macro 'RAPIDXML_PARSE_ERROR'
#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where)
^
../src/rapidxml.hpp:1551:21: error: cannot use 'throw' with exceptions disabled
RAPIDXML_PARSE_ERROR("invalid numeric character entity", text);
^
../src/rapidxml.hpp:55:43: note: expanded from macro 'RAPIDXML_PARSE_ERROR'
#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where)
^
../src/rapidxml.hpp:1682:33: error: cannot use 'throw' with exceptions disabled
RAPIDXML_PARSE_ERROR("expected ;", src);
^
../src/rapidxml.hpp:55:43: note: expanded from macro 'RAPIDXML_PARSE_ERROR'
#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where)
^
../src/rapidxml.hpp:1747:25: error: cannot use 'throw' with exceptions disabled
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
Etcetera etcetera.
The gist of it is that on a Mac the RapidXML binary doesn't compile with exceptions enabled due to the way XCode works.
After some research on github (nodejs/node-gyp#17 (comment)) I made the following changes to the binding.gyp file:
{
"targets": [
{
"target_name": "parser",
"sources": [ "src/parser.cc" ],
"cflags!": [ '-fno-exceptions' ],
"cflags_cc!": [ '-fno-exceptions' ],
"conditions": [
['OS=="mac"', {
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES"
}
}]
]
}
]
}
This works for me, now I can at least install and use it.
Media extension is generalization of enclosure
tag.
Specification: http://www.rssboard.org/media-rss#media-content
Currently the general extension mechanism should handle it.
Related issue: #30.
Rss2.0 support namespace and content module
Like
<description>
Americans are fat. Smokers are stupid. People who don’t speak Perl are irrelevant.
</description>
<dc:subject>Quotes</dc:subject>
<dc:date>2002-09-04T13:54:20-05:00</dc:date>
<content:encoded><![CDATA[<cite>Ian Hickson</cite>: <q><a href=”http://ln.hixie.ch/?start=1030823786&count=1?>
Americans are fat. Smokers are stupid. People who don’t speak Perl are irrelevant.
</a></q>
]]>
</content:encoded>
I found some articles about this
https://developer.mozilla.org/en-US/docs/Web/RSS/Article/Why_RSS_Content_Module_is_Popular_-_Including_HTML_Contents
http://www.disobey.com/detergent/2002/extendingrss2/
http://www.feedforall.com/dublin-core.htm
https://pythonhosted.org/feedparser/annotated-rss20-dc.html
Can you add this to be supportted, Thank you very much!
npm http 200 https://registry.npmjs.org/fast-feed/-/fast-feed-0.0.4.tgz
> [email protected] install /home/m/node_modules/fast-feed
> node-gyp rebuild
make: Entering directory `/home/m/node_modules/fast-feed/build'
CXX(target) Release/obj.target/parser/src/parser.o
../src/parser.cc: In function ‘void parseAtomFeed(rapidxml::xml_node<char>*, const v8::Local<v8::Object>&, bool)’:
../src/parser.cc:119: error: ‘strcmp’ was not declared in this scope
make: *** [Release/obj.target/parser/src/parser.o] Error 1
make: Leaving directory `/home/m/node_modules/fast-feed/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 2.6.32-358.14.1.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/m/node_modules/fast-feed
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the fast-feed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls fast-feed
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-358.14.1.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "fast-feed"
npm ERR! cwd /home/m
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.2.17
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/m/npm-debug.log
npm ERR! not ok code 0
Related to #13
It would be great to have the node bindings for rapidXML available as package.
There are lots of other use cases, like SVG parsing.
More info: http://www.mnot.net/rss/tutorial/
This would be useful for using in projects built with TypeScript.
Original issue: #13
This will require lots of changes. Example diff from another project:
danielkhan/node-gc-profiler@25a2bbb#diff-7b4f9baafdc929904b65af017eaa2da6
Required for Node/io 4.x support.
Is there enclosure option or way to get mp3, mp4 images enclosures ?
also: get type and lenght
I tryed :
let extension = this._extractExtension(item, 'enclosure:');
if (extension.attributes) {
return extension.attributes.url;
}
}
Related to #13.
Hi, i come again.
I parse http://githubengineering.com/atom.xml. But got the result of author concatenated.
The author's uri, name, email was concatenated
So i read the RFC4278 and RFC5023.
A Person construct is an element that describes a person,
corporation, or similar entity (hereafter, 'person').
atomPersonConstruct =
atomCommonAttributes,
(element atom:name { text }
& element atom:uri { atomUri }?
& element atom:email { atomEmailAddress }?
& extensionElement*)
The goal is to have Travis build fast-feed on OS X and have tests pass.
The corresponding PR is #27 and it's failing all of the OS X tests now because I haven't sorted out the Mac environment yet for Travis for node, so it's not at all ready for merge.
It looks like node-sqlite has got the environment set sorted out, here:
https://github.com/mapbox/node-sqlite3/blob/master/.travis.yml
so I know it's doable:
https://travis-ci.org/mapbox/node-sqlite3
thanks!
Most targets are trivial and could be implemented as npm commands/scripts.
hi, i'm have a problem
now fast-feed not support multi cdata content
like
http://www.ruanyifeng.com/blog/atom.xml
Related to #13. Dictates that extensions
property must be an array. Reference: http://dublincore.org/documents/dc-xml-guidelines/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.