
irssi aspell Deian Gentoo Ubuntu oh boy!
Being a bad speller but wanting to use irssi was a conundrum I had to deal with.
or
Making Miss White your third grade teacher proud
I'm running gentoo on an old ibook.
Where to start, Goggle maybe? This is what I found check it out.
http://www.eckrall.co.uk/?page_id=55
If your running Debian Etch your golden, just change to a language of you liking.
You also need to make a small edit in the aspell_complete.pl script.
nano aspell_comlete.pl
and change the fourth line from the end to your language.
This is the line you need to change
Irssi::settings_add_str($IRSSI{'name'}, 'spell_dict', "en_UK");
Being the proud American I am, I wouldn't want to type like a Brit so I changed the line to.
Irssi::settings_add_str($IRSSI{'name'}, 'spell_dict', "en");
I'm not running Debian I'm running gentoo
so emerg this!
emerge irssi
Now at this point you should start irssi if you didn't already have it installed.
Starting irssi will create a directory named .irssi in your user_name directory. You'll need
this .irssi directory shortly. Now you can stop irssi by entering /quit or /exit or /by ...
emerge aspell
emerge app-dicts/aspell-en “Note: this will get ya American English”
emerge dev-perl/Text-Aspell
Now cd to your user in the home directory
cd /home/your_user_name_here/
If you do a
ls -a
you should see the .irssi directory.
Now cd into the .irssi directory
cd .irssi
Now create a new directory in the .irssi directory called scripts
mkdir scripts
Now cd into your new scripts directory
cd scripts
Now now make a directory in scripts called autorun
mkdir autorun
Move into autorun
cd autorun
Now you need to download the script aspell_complete.pl
wget http://www.mimir.ch/mimir/irssi/files/aspell_complete.pl
If your not going to use UK English you'll need to edit the scrip in the way
that was stated above.
Fire up irssi in a terminal
If it works you should see something like this.
20:17 -!- Irssi: aspell_complete: dictionary language: en
20:17 -!- Irssi: aspell_complete: dictionary mode: fast
Now misspel a word, then press the tab key and see what happens
Pretty cool!
OK now for you smart guys and gals runnin ubuntu
I also run ubuntu on a macbook. So I must be smart to.
This is what ya do, from the command line? After all irssi as a command
line program.
sudo apt-get update
sudo apt-get install irssi
sudo apt-get install aspell-en "Note: the -en is for US English"
sudo apt-get install libaspell-dev
sudo apt-get install aspell libtext-aspell-perl
Now you need to run irssi for the first time if you have just installed it.
This will create a directory called .irssi in your home directory. Now quit irssi
by typing
/quit
now enter in the command line
cd ~/
This will take you to your home directory
Now to see whats in there enter
ls -a
you should see a directory named .irssi
You need to go there
cd .irssi
Now lets see whats in the .irssi directory
ls -a
The only thing in my .irssi directory is a file named config
OK here I get a little side tracked. Being the curious sort I just gotta look in this
file call config. You could skip this, Na.
nano config
OK before I mess up this file called config I'm going to save a copy of it renamed config.backup
Then if I make any changes that bugger things up I can just revert back to my backup copy.
This would be a good practice anytime you modify a file.
Notice all the aliases in there you could really go crazy. OK enough exploring lets move on.
You need to make a directory called scripts in this .irssi directory
mkdir scripts
ls
Now you should see it
Lets move into the scripts directory and create a directory called autorun
cd scripts
mkdir autorun
ls
There's the directory be been looking for
Move into autorun
cd autorun
ls
Now we're in so deep there's nothing in here. We'll fix that.
Enter in the command line
wget http://www.mimir.ch/mimir/irssi/files/aspell_complete.pl
Now enter
ls
and you will see aspell_comlete.pl
We're about done. You just need to make one minor tweak to aspell_comlete.pl
Skip this step if you install UK English. If you did you know how you are.
You would have had to do this back at the start.
In other words instead of
apt-get install aspell-en
you would have done
apt-get install aspell-uk
OK for the rest of us yanks you need to
nano aspell_comlete.py
go to the fourth line from the end. The line that looks like this.
Irssi::settings_add_str($IRSSI{'name'}, 'spell_dict', "en_UK");
Make it look like this.
Irssi::settings_add_str($IRSSI{'name'}, 'spell_dict', "en");
now your irc'n in American English.
Save it
close it
Your done!
Now let's give er a go.
Enter in the command line
irssi
Holy crap! it's automatic, this even surprised me.
you should see this
23:12 -!- Irssi: aspell_complete: dictionary language: en
23:12 -!- Irssi: aspell_complete: dictionary mode: fast
now type
tesst
press tab
do ya get it?
That's why I use ubuntu to have fun and gentoo to learn.
Yesterday was the first time I ever tried irc. It took me some time
to figure it out. It's not hard once you get it but some times it's hard to
get.
IRC for dummies "like me"
This is how you get into Linux Basement
at the bottom of the irssi client you type
/connect chat.freenode.net
press enter and a bunch of stuff will scroll by
Now enter
/join #linuxbasement
Hey dude your in.
Your user name will defaults to, well your user name.
I haven't figured out how to change that yet.
This might help, you can also type /help
Give me a break, like I said I just started doing this irc yesterday, really.
Good luck and have fun.
Red Hat?
you gotta do some rpm thing
sorry I don't have a clue.
########################################################################
The following is a copy if the aspell_complete.pl script just incase thie link goes belly up.
http://www.mimir.ch/mimir/irssi/files/aspell_complete.pl
I would like to thank those who wrote it an hope it's OK to post it here.
########################################################################
<code>
####
# needs:
# - Text::Aspell
# - GNU Aspell - http://aspell.net/
#
# settings:
# spell_dict - A comma or whitespace seperated list of dictionaries to use.
# First in the list is the default.
# Bind rotate_dict to easily cycle through the list of dictionaries.
# spell_suggestion_mode - The aspell suggestion mode.
# For infos on suggestion modes see the aspell manual.
#
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
use Text::Aspell;
$VERSION = '1.00';
%IRSSI = (
authors => 'Philipp Haegi',
contact => 'phaegi\@mimir.ch',
name => 'aspell_complete',
description => 'Adds Text::Aspell suggestions to the list of completions',
license => 'Public Domain',
url => 'http://www.mimir.ch/ph/',
changed => '2004-02-05',
commands => 'rotate_dict',
note => '',
);
my ($setting_spell_dict, $setting_suggestion_mode);
my @langs;
my $speller = Text::Aspell->new;
die unless $speller;
sub cmd_load() {
$setting_spell_dict = Irssi::settings_get_str("spell_dict");
@langs = split /[,\s]/, $setting_spell_dict;
$speller->set_option('lang', $langs[0]);
Irssi::print($IRSSI{'name'} . ": dictionary language: " . $langs[0]);
$setting_suggestion_mode = Irssi::settings_get_str("spell_suggestion_mode");
$speller->set_option('sug-mode', $setting_suggestion_mode);
Irssi::print($IRSSI{'name'} . ": dictionary mode: " . $setting_suggestion_mode);
}
sub rotate_dict() {
push(@langs, shift(@langs));
$speller->set_option('lang', $langs[0]);
Irssi::print($IRSSI{'name'} . ": dictionary language: " . $langs[0]);
}
Irssi::signal_add_last 'complete word' => sub {
my ($complist, $window, $word, $linestart, $want_space) = @_;
push(@$complist, $speller->suggest( $word ));
};
Irssi::signal_add_last 'setup changed' => sub {
if ($setting_spell_dict ne Irssi::settings_get_str("spell_dict") ||
$setting_suggestion_mode ne Irssi::settings_get_str("spell_suggestion_mode"))
{
cmd_load();
}
};
####
# Register commands
Irssi::command_bind('rotate_dict', 'rotate_dict');
###
# Settings
Irssi::settings_add_str($IRSSI{'name'}, 'spell_dict', "en_UK");
Irssi::settings_add_str($IRSSI{'name'}, 'spell_suggestion_mode', "fast");
# Engage!
cmd_load();
####End script
<code>

Awesome man! I've been
Awesome man! I've been avoiding irssi for so long. You are making me try it out. Thanks for the great article!