TTYtter group support library
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:
- Custom commands for handling groups
- Bookmark of tweet id for place tracking what already was evaluated
- Filtering based on dynamic lists of users
- Add users to groups from inside TTYtter
- Remove users from groups inside TTYtter
- 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.


I work for