TTYtter group support library

2009.06.26

As referenced in my previous post I’m a pretty big fan of TTYtter.  I won’t go into it’s advantages here you can find that information in my previous post.  I follow quite a few people so one of the first things I did when I started using TTYtter was to write a group add on library for it.  The previous post and the TTYtter site have good information on how to enable these libraries and also how to write them.  This library is pretty good size and performs quite a few operations that I thought would be a good example for someone else looking to extend TTYtter for their own use.

Operations:

  1. Custom commands for handling groups
  2. Bookmark of tweet id for place tracking what already was evaluated
  3. Filtering based on dynamic lists of users
  4. Add users to groups from inside TTYtter
  5. Remove users from groups inside TTYtter
  6. Add users to multiple groups

The easiest way to get started is to install this and get it going.  Download the library from svn and modify the one configuration item at the top of the library to set the group file storage path.  Reference the library from your .ttytterc file or use the library command line switch.

Once loaded you might want to have a look at the command set supported out of the library, there is built in help accessible from within TTYtter

/grouphelp
Group commands are as follows.

/group [groupname]
display stored tweets from group

/groups
list the current groups on the filesystem

/grouplist [groupname]
list the members of group [groupname]

/groupadd [groupname] [username]
add [username] to group [groupname]

/groupdel [groupname] [username]
delete [username] from group [groupname]

At this point you can add some users to a group via something like the following command which adds myself to a group called coders.

TTYtter> /groupadd coders vkoser
User vkoser added to group coders
TTYtter>

Once you have some groups built up it’s really easy to view them in TTYtter by using the /group coders command to list the last 20 tweets from that group.  That’s reasonable if your activly using TTYtter but it’s much more useful to use something like GNU Screen to view multiple groups and assign one screen section per group.  I typically set mine up with split windows and a large scrollback buffer configuration which lets me scroll back through pages of information.

I hope someone can get some value out of this as a learning tool and possibly expand it for your own use.  It’s not overly error proof as an add on for my own use but it works pretty well.  If anyone would like to submit changes or enhancements to the library just send them over to me or contact me on twitter and I’ll see about getting them migrated into the library.

The current release can be gotten here [TTYtterGroups.pl] from the svn repository.

Categories : tips  tools
Tags :     

3 comments

  1. So, this is very cool. Thanks! But, how to make it work with your iChat time stamps?

    Don Harper, June 27, 2009
  2. Hey Don, I don’t think you can load multiple libraries in TTYtter so I’ll have to combine the code from the two modules into one which will be pretty straightforward. I’ll go ahead this weekend and put together a combined module and put it up for download soon.

    vkoser, June 27, 2009
  3. So, any movement on this? :)

    don

    Don Harper, August 19, 2009

Leave a comment