![]() |
![]()
| ![]() |
![]()
NAMEApp::Twirc::Manual - User guide and reference for Twirc DESCRIPTION"Twirc" is a twitter client. More precisely, it is an IRC/Twitter gateway that makes your favorite IRC client a twitter client. FEATURESINSTALLATIONYou can install "twirc" just as you would any other CPAN distribution: cpanm POE::Component::Server::Twirc Or, you can download and unpack "twirc", then run it from a directory of your choice without running "make install". That's the way the author runs it. If you choose this option, run "make" to install "twirc"'s dependencies. CONTRIBUTING AND BUILDINGIf you'd like to contribute to "twirc" or just want to build the distribution for some other reason, you must have the following Perl modules: CONFIGURATION"Twirc" uses Config::Any, so you can configure "twirc" using XML, YAML, JSON, Apache-style configuration, Windows INI file format, or even Perl code. A configuration file is not necessary, but is recommended. Here's an example configuration in YAML: state_file: twirc.state log_level: INFO CONFIGURATION OPTIONS
USINGTo use "twirc" you first need to start the server: bin/twirc -b --state_file=twirc.state The "-b" option runs "twirc" in the background. Drop the "-b" to see log messages to STDERR. (The author runs twirc and his irc client in screen, <http://www.gnu.org/software/screen/>, to monitor log messages to STDERR.) Next, connect to the server from your IRC client. I use "irssi" (<http://www.irssi.org>) and my examples will use "irssi" commands: /connect localhost On connection, "twirc" will automatically join you to the configured channel. The default &twitter will be assumed, here. Your friends will be automatically joined to the channel. Friends who are also followers are given voice as a visual clue. In "irssi" they appear with plus sign (+) in front of their names. To post a new status update, use the "post" command: post My first tweet from twirc! In general, you enter a command followed by its arguments, if any, as a public message in the channel. There's a handy exception to that rule for sending replies. An entry that begins with a nick name, followed by a colon is treated as a reply. E.g.: twirc: you make twitter usable! Is a shortcut for: post @twirc you make twitter usable! "twirc" uses the Twitter User Streams API to receive updates in real-time. Use IRC private messaging to send direct messages. In "irssi": /msg friend Watch out, I'm right behind you! The "twirc" server stops when you disconnect. This isn't normal IRC behavior, but "twirc" isn't a normal IRC server. Its only purpose is to interface with Twitter on your behalf and server no useful purpose when you're not connected. COMMAND REFERENCE
TIPS AND TRICKSIgnoringIf you're following a particularly noisy friend, you can of course "unfollow" her. Alternatively, you can use your IRC client's features to ignore the user. In "irssi": /ignore LoudMouth ALL /ignore -except -pattern @YourName LoudMouth ALL Now, you won't hear from LoudMouth unless she @replies you, and she won't know you're ignoring her (unless she reads this tip!). Multiple accountsAlthough "twirc" doesn't currently support multiple accounts, there's nothing stopping you from running multiple instances of "twirc", one for each account. Here's how I do it for accounts "semifor" (my personal account) and "twirc" ("twirc"'s feed for update notices, etc.). First, the pertinent sections of the configuration files (in YAML format). # File: semifor.yml irc_server_port: 6667 irc_password: secret irc_channel: '&twitter' # File: twirc.yml irc_server_port: 6668 irc_password: secret irc_channel: '&twirc' Next, start an instance for each account: bin/twirc -c semifor.yml -b bin/twirc -c twirc.yml -b In your IRC client, connect to both instances ("irssi" here): /connect localhost 6667 secret semifor /connect localhost 6668 secret twirc Now you've got 2 channels, one for each account---in my case, &twitter for "semifor" and &twirc for "twirc". PLUGINSPlugins are modules that are optionally included by specifying them in user configuration file in the "plugins" section. Some of the plugins included in the distribution are:
SUPPORT"Twirc" is free open source software with no warranty of any kind. That said, it's used by some competent perl coders who may be able to help if you have trouble. Try the "#net-twitter" channel at "irc.perl.org". The code repository with the development branch is located at <http://github.com/semifor/twirc>. New features, and bug fixes appear there before they hit CPAN, so check the commit log there to see if a problem you've found has been addressed. And feel free to use the development branch. CONTRIBUTORSPeter Roberts <me+dev@peter-r.co.uk> AUTHORMarc Mims <mmims@cpan.org> I'm "semifor" on twitter and IRC.
|