[csw-devel] SF.net SVN: opencsw:[580] twitter/sweets
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Thu Oct 27 21:06:01 CEST 2011
Revision: 580
http://opencsw.svn.sourceforge.net/opencsw/?rev=580&view=rev
Author: skayser
Date: 2011-10-27 19:06:00 +0000 (Thu, 27 Oct 2011)
Log Message:
-----------
twitter/sweets: update README, tweak template
Modified Paths:
--------------
twitter/sweets/README
twitter/sweets/template.feed
Modified: twitter/sweets/README
===================================================================
--- twitter/sweets/README 2011-10-27 19:02:12 UTC (rev 579)
+++ twitter/sweets/README 2011-10-27 19:06:00 UTC (rev 580)
@@ -1,7 +1,27 @@
-sweets - tools to search tweets and re-publish them through a feed
+sweets - search tweets and re-publish them through a feed
-Twitter has search feeds which have gone from official to unofficial but still
-present. These have caused us troubles in the past, as they contained
-duplicates and ceeswi on #opencsw happily broadcasted redundant items. This is
-a "hacking for fun" attempt to get a sanitized feed version. Early stage, not
-yet usable.
+Description
+===========
+
+Twitter has search feeds which have gone from official to unofficial (but
+still present). These have caused us troubles in the past, as they contained
+duplicate entries and ceeswi on #opencsw happily broadcasted redundant items.
+
+This is a "hacking for fun" attempt to build a sanitized search result feed
+using the Twitter Search API. Could possibly also be done by consuming and
+dedupping the inofficial Twitter feeds (as long as they are still around).
+
+
+Usage
+=====
+
+Two stepped process. First, retrieve and store search results with sweets.py.
+Then, generate a feed from the stored data via sweets2feed.py.
+
+ sweets.py -s opencsw -o /var/www/sweets-opencsw.json -n 100
+ sweets2feed.py -i /var/www/sweets-opencsw.json \
+ -o /var/www/sweets-opencsw.atom
+
+The data stored by sweets.py is JSON and will accumulate a de-dupped history
+of search results on subsequent invocations. It will store up to -n tweets,
+then starts to act as a FIFO, dropping older results.
Modified: twitter/sweets/template.feed
===================================================================
--- twitter/sweets/template.feed 2011-10-27 19:02:12 UTC (rev 579)
+++ twitter/sweets/template.feed 2011-10-27 19:06:00 UTC (rev 580)
@@ -7,7 +7,7 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <title>Tweets matching "${query}"</title>
+ <title>Twitter search results for "${query}"</title>
<id>tag:opencsw.org,2011-10-27:sweets:${query}</id>
<author>${myuser}@${mynode}</author>
<updated>${updated}</updated>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list