Skip to content

A Django application that combines multiple RSS feeds of tweets into a single Twitter account based on filters

License

Notifications You must be signed in to change notification settings

clintecker/twittersmash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Smash

What is Twitter Smash?

Twitter Smash is a basic Django application which allows the piping of multiple Twitter accounts (using their RSS feeds) into a single Twitter account. There are multiple ways to determine which tweets from the source accounts get piped into the single account; in addition there are a number of formatting options to massage the incoming tweets for uniformity.

Why would I want to use Twitter Smash?

The original user case scenario is for "group" twitter accounts. Imagine if you would like for a number of individuals to cover an event, and create an event-related Twitter account for that purpose. Those individuals generally have their own personal Twitter accounts and would prefer not to have to flip back and forth between multiple accounts.

Twittersmash will monitor those user's Twitter streams and pluck out the relevant tweets and pipe them into a new account base on each destination account's preferences and filtering rules.

How to Setup Twitter Smash?

Requirements

Installation

  1. Clone this git repository to somewhere on your local machine or server: git clone git://github.com/clintecker/twittersmash.git
  2. Enter the new directory with cd twittersmash
  3. Install the Django application: sudo python setup.py install
  4. Edit your Django project's settings.py and add twittersmash to your INSTALLED_APPS
  5. In your project folder, update your database: python manage.py syncdb

Configuration

This application allows you to merge n-twitter streams into a single output feed based on a number of parameters, to that end you configure the credentials for the output feed, specify your filtering parameters, and the supply a number of input feeds:

  • Go to your project's admin interface and find the "Twittersmash" section. Click on the green plus icon next to "Twitter Accounts
  • The first two fields are the Username and Password of the output twitter feed
  • Filter contains a string or list of strings which, if present in an input tweet, determine whether it is passed to the output account. Currently only or-based filtering is possible. Specify multiple parameters by separating them with a comma. Examples: "#macworld, #mwsf", "djangocon", "django, google".
  • Filter replies determines whether or not @-formatted replies to this account from the source accounts will be passed through. This is essentially a special filter that is equal to "@<>".
  • Minimum Date & Time determines an event horizon beyond which filter will begin to take place. Setting this date/time will prevent tweets made before it, regardless of their content, to be passed into the output account.
  • Strip tags will remove any hash tags before passing the messages into the output feed. You may want to use hash tags for this applications filtering purposes, but not wish to pass those on to the output account.
  • Prepend Names, if enabled, will prepend each output tweet with the username of the input account the original message came from. For example, if a tweet comes in from an account named 'joe12345', and passes all the filtering tests, the string 'joe12345: ' will be prepended to that message before being sent to the output account.
  • Append Tags removes all hash tags from the body of a message and aligns them at the end of the post, in the same order they appeared in the original message. This option can be destructive to a post if the original tweet used a hash tag in the middle of their message to provide context. Really only makes sense to move tags that appear at the beginning of a tweet to the end.
  • Active determines whether this account and its input accounts should be polled.
  • Finally, the Feeds box allows you to specify one or more different input feeds (generally only Twitter style RSS feeds are officially supported). You can pick as many as you like here, or add a new one.
    • Adding a new feed requires at minimum two peices of information. One is a descriptive name for the feed, "Clint Ecker's Twitter", for example. The second bit of required information is the URL of this Twitter account's RSS feed (it can be found on the account's Twitter page, in the right sidebar).
    • There is an optional polling rate that allows the amount of time between RSS pulls to be specified. This defaults to 15 minutes, but can be set as low as 0. Please note that 0 only means that this feed will be checked on each run of the management command. Since this is generally done using a crontab, the minimum time between polls is about one minute.

License

Copyright © 2009 Clint Ecker.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A Django application that combines multiple RSS feeds of tweets into a single Twitter account based on filters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published