This is an app for creating photo galleries based on pictures from Twitter hashtags. You can see a working implementaiton at mosaic.occupy.net
The app consists of 2 parts: the Twitter crawler and the web display.
A group of hashtags is a “campaign”. You can create multiple campaigns, and either share them on the homepage or keep them private.
There is no user authentication for administration. Campaigns are created and administered by sharing a private URL. This was inspired by the open collaboration model used in etherpad.
Creating and Editing a Campaign
To create a campaign go to yoursiteurl.org/campaigns/create
This will bring up a form that will allow you to enter a name, description, and front-page image for a campaign. You can chose a theme for displaying images (currently there are 3)
Search terms are the terms on Twitter (hashtags or other terms) that you want to collect images for. The “#” symbol is optional. If your terms are specific enough, you may want to leave it off. You can also search @replies.
The date range is the range of time that you want the crawler to collect images. Any date in the future is good. You can select days in the past, but Twitter search only goes back about 10 days. Remember to use the year-first format YYYY-MM-DD like “2011-09-17”.
When you create a campaign you will be taken to the edit page. Copy the url for this page, and keep it safe. You can share this URL with other members of your organization. This url is the only way to access your campaign page - there's currently no login functionality. The lack of user authentication is a design decision intended to keep the application lightweight, and to keep groups using the app autonomous and not dependent on a class of superusers with privileged access.
Updating and Rate-limiting
When you create a campaign, it's placed in a queue with all of the other active campaigns on your site. Due to Twitter's rate-limiting of searches, the mosaic app can only make about 300 searches per hour. This is per page of search results, so one refresh of a campaign can use up to 10 individual search requests. Because of this rate-limiting, your campaign images may only update a few times per hour. For extremely popular hashtags, not all search results will be returned - the app is meant to provide a quick overview of a situation, not a comprehensive archive.
Ruby ~ 1.9 Sinatra