Twitter Username Management Script (TUMS)

February 23, 2009 | 6 Comments

The script is no longer for sale.

Purchase of the script entitles you to one license for commercial or personal use, but not resale. Upon your purchase, the script is available via secure download link as a zip with all the files needed and an easy installation readme file (see below to see this). I even include limited support if you’re having problems or questions. The script cost me $2,000 to have coded. Below is info on the script, installation info, and screenshots.

TUMS is a script I had coded to manage multiple Twitter usernames. The script will update details on each username and it will also automate tweets to each username from RSS feeds you supply for each username. I use it to manage 250+ sports teams Twitter accounts I have — I have multiple RSS feeds for each specific team, and it then sends out tweets of new headlines for each team from the specific RSS feeds for each team.

The script easily allows you to upload a CSV file with details on each of the accounts: username, password, background image location, avatar image location, profile details (location / name / more info URL / one line bio), profile design details (bgcolor / font color / link color / sidebar fill color / sidebar border color), and then 5 RSS feeds. You could increase the # of RSS feeds with a simple change to the script.

CRON’s run on your server, polling the RSS feeds that are individually specified for each username and pulls the latest headlines. The CRON then tweets out 1 new headline every 15 minutes on each username, using the latest headline in the queue. It then keeps going through the queue for each username until it empties — if the RSS feeds supply tons of headlines for a username, then it may never get to most of the items (they remain in the queue). You can alter the script to change this — we just didn’t want to spam users.

The CRON grabs the link to the headline, it then creates a new URL for the headline, which links to a domain you specify. When the page loads, a tiny FRAME loads at the top of the page that kind of looks like the Gmail infobar. In this infobar are arrows for the user to flip amongst more headlines tied to your Twitter username, along with a link back to the Twitter account. See an example of one of my accounts here: Sabres, and an example article page that a tweet links out to.

Libraries needed are included in the zip as well. There is a config file that makes installing this very easy. In the zip is an “install.txt” file to help you install it:

## TUMS Requirements

PHP 5.2

MySQL 5

Apache 2 with mod_rewrite enabled

## How to install TUMS

1. Move the contents of the html folder in to a folder on your server that is web accessible.

2. Importing the sql file in to your database. There are a few ways this can be done. Just import via software, website, or command line to your mysql server. If using the command line, you’ll want to use ‘mysql -u <username> -p tweetrss < tweetrss.sql’

3. Edit the file html/lib/config.php. Here you will want to change anywhere that says yourdomain.com to your own domain. The same goes for /your/public_html/ and the mysql settings.

4. Next you will want to add three scripts to cron at the suggested intervals. You will want to change the locations.

/your/public_html/lib/cron/follower_track.php – Nightly

/your/public_html/lib/cron/read_rss.php       – Every 30 Minutes

/your/public_html/lib/cron/twitter_post.php   – Every 30 Minutes

5. Open each of the files at the top, and change the include path /your/public_html/lib/config.php to the correct one.

6. The last step requires us to set a password for the admin section. First edit /admin/.htaccess Fix the path /your/public_html/admin/.htpasswd Then edit admin/.htpasswd Go to the following site http://home.flash.net/cgi-bin/pw.pl , pick a username and password, then paste the bold line. It should look like “test:sYBAcFwKi/y..” (no quotes) You can also use htpasswd from the command line if you know how.

## TUMS Screenshots

USER LIST SCREENSHOT – this is the script’s homepage and gives an overview of your accounts.

USERNAME DETAILS PAGE – this shows specific details for a username and allows you to have that username’s info on Twitter be updated using these details (which are inputted via the main CSV upload). You may use this manual update if you update the background image on your server, then have the script run so that the background image is then updated/uploaded to Twitter.

FEED STATS – this displays each RSS feed you’re pulling from for each username and the # of items in each of those feeds that you have stored in the DB.

IMPORT CSV FILE – this allows you to upload/import your CSV file that includes all the details of your Twitter usernames. Here’s an example CSV to give you a feel of what you’ll put in it (passwords are left blank in example).

UPDATE USER INFO – after you import your CSV script, you then need to update your Twitter accounts by running this script. The ‘New Accounts’ are new accounts you added, and will just update those on Twitter. The ‘All Accounts’ will update every attribute of every account you have with Twitter.

Note: Most won’t ever have this problem, but: At the moment, if you no longer use an account, or Twitter revokes one of yours, you will need to manually remove it from the DB — but you could just leave it in there, it just won’t validate, but it won’t break anything.

UPDATE USER INFO *UPDATED* - this is what the screen looks like after you run the update script.

TWEETS SENT – this shows the latest tweets being sent from your system to your Twitter usernames, so you can ensure operations are working smoothly.

REPORTS - this shows the # of clicks per day on your articles, as well as the # of clicks to each article for the day that are posted via your usernames.

How to Estimate a Programming Gig

February 10, 2009 | Leave a Comment

This is a must-read post by @esnagel (programmer extrordinaire) if you’re a programmer that is doing consulting, or looking to do consulting.

Must-Hear Music

February 4, 2009 | 2 Comments

If you know me, you know I’m obsessed with music. Here’s some new stuff my friends and I have discovered. It’s all top-notch: [click to instantly listen on Hype Machine]

Plants and Animals – Parc Avenue [buy on eBay]
The Von Bondies – Love, Hate and Then There’s You [buy CD on amazon.com] [MP3 album on amazon.com] [buy on ebay]
The 1900s – Cold & Kind [buy CD on amazon.com] [buy on eBay]
Nico Vega [self-titled] [buy MP3 album on amazon.com]
Some other stuff that is on my OMFG list: Bon Iver, The Rural Alberta Advantage, City and Colour, The Bird and The Bee, We Barbarians, Thao, Friendly Fires, Anathallo, The Gaslight Anthem, Margot & the Nuclear So and So’s, Noah & The Whale, and Air France.
All of this, of course is available on eBay or Amazon.com.

Misc other links: Posters on PrintPlace, PrintPlace, Metrofax, Metrofax for personal biz, Event Tickets on PsPrint, PsPrint, SheetMusicPlus, Twilight the Score on SheetMusicPlus.

Misc deep links: Cat Dancer ToyBirkenstock Madrid, Sweet rug!, NCAA March Madness on DirecTV.

Sweet Bloom (no rel), Minky Dimple Dot (declined), Drum set (adv expired)

IDEA #99 – Group Learning of Anything in Weeks!

February 3, 2009 | 1 Comment

Honestly, I don’t know much about the online learning sector — maybe this is already done. But the post ‘Learn Ruby in 3 Weeks‘ by Al Abut inspired this post [despite his post being 3 years old].

He says in his post that he’s planning to learn Ruby on Rails in 3 weeks. He planned to use the book ‘Sams Teach Yourself Ruby in 21 Days‘, which is available on Amazon.com. He said he was going to start 2 weeks from the day he made this original post, which provided enough time for others to buy the book and get ready for the learning. He was then going to make a blog post each day regarding the learnings, which then others could obviously comment on and discuss.

What a great idea. I could see this idea evolving in various ways — there’d be a central site for all these group learning subjects to take place. Just like how you’d signup for a class on the Internet, or for an in-person classroom class to learn something, you’d do that on this site. Maybe someone(s) posts a subject with a curriculum — which uses a course book they designate, and/or uses various online reading (video, photos, etc) materials that are available for free.

Maybe these curriculums are in a wiki, so that others can edit them and add to them — eventually creating the best curriculum to learning any subject.

Why isn’t there a free online university? People could volunteer as “teachers” — maybe “students” pay a $5 or $20 course fee, which goes to the volunteer (much like how referrees in intramural and bar leagues get paid; or like how Meetup.com charges for their group meetup pages).

Anyhow, if you wanted to learn Ruby on Rails — wouldn’t you rather do it with a group of others? I’m one that is motivated easier by knowing others are doing something with me and relying on me.

Thoughts? Don’t forget, TechStars is accepting applications for the summer, this could be your idea to use!