1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-16 06:25:24 +00:00

Merge pull request #1163 from ailin-nemui/docs

update docs and sync scriptassist
This commit is contained in:
ailin-nemui 2020-03-30 16:21:26 +02:00 committed by GitHub
commit b69074bb39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 45 deletions

View File

@ -1,7 +1,6 @@
<base href='https://irssi.org/documentation/design/'>
<h1>Design</h1>
<p>Irssis hierarchy is something like this:</p>
<p>Irssis hierarchy is something like this:</p>
<pre class="repl" id="fig1"><code class="language-ascidia">
sub1 sub2

View File

@ -1,7 +1,6 @@
<base href='https://irssi.org/documentation/faq/'>
<h1>Frequently Asked Questions</h1>
<h3 id="q-why-doesnt-irssi-display-colors-even-when-ircii-etc-displays-them">Q: Why doesnt irssi display colors even when ircii etc. displays them?</h3>
<h3 id="q-why-doesnt-irssi-display-colors-even-when-ircii-etc-displays-them">Q: Why doesnt irssi display colors even when ircii etc. displays them?</h3>
<p>A: They force ANSI colors even if terminal doesnt support them. By default, irssi uses colors only if terminfo/termcap so says. The correct way to fix this would be to change your TERM environment to a value where colors work, like xterm-color or color_xterm (eg. <code>TERM=xterm-color irssi</code>). If this doesnt help, then use the evil way of <code>/SET term_force_colors ON</code>.</p>
@ -55,7 +54,7 @@
<h3 id="q-will-there-be-detach-like-feature">Q: Will there be /DETACH-like feature?</h3>
<p>A: <a href="http://tmux.github.io/">tmux</a>, <a href="http://www.gnu.org/software/screen/screen.html">screen</a> and <a href="http://dtach.sf.net/">dtach</a> can be used to do it just fine.</p>
<p>A: <a href="https://tmux.github.io/">tmux</a>, <a href="https://www.gnu.org/software/screen/screen.html">screen</a> and <a href="http://dtach.sf.net/">dtach</a> can be used to do it just fine.</p>
<h3 id="q-how-do-i-run-scripts-automatically-at-startup">Q: How do I run scripts automatically at startup?</h3>
@ -71,7 +70,7 @@
<h3 id="q-how-can-i-have-whois-replies-to-active-window">Q: How can I have /WHOIS replies to active window?</h3>
<p>A: You can disable the status window, or do <code>/WINDOW LEVEL -CRAP</code> in it which would also make several other messages show up in active window. You can also use a <a href="http://dgl.cx/irssi/hack-whois-in-current-window.pl">script</a>.</p>
<p>A: You can disable the status window, or do <code>/WINDOW LEVEL -CRAP</code> in it which would also make several other messages show up in active window. You can also use a <a href="https://dgl.cx/irssi/hack-whois-in-current-window.pl">script</a>.</p>
<h3 id="q-how-do-i-add-the-active-network-to-the-statusbar">Q: How do I add the active network to the statusbar</h3>

View File

@ -117,8 +117,8 @@ A: Check [6]here
References:
[1] https://github.com/irssi-import/xirssi
[2] http://tmux.github.io/
[3] http://www.gnu.org/software/screen/screen.html
[2] https://tmux.github.io/
[3] https://www.gnu.org/software/screen/screen.html
[4] http://dtach.sf.net/
[5] http://dgl.cx/irssi/hack-whois-in-current-window.pl
[5] https://dgl.cx/irssi/hack-whois-in-current-window.pl
[6] https://irssi.org/assets/irssi.wav

View File

@ -1,9 +1,8 @@
<base href='https://irssi.org/documentation/startup/'>
<h1>Startup How-To</h1>
<h3 id="to-new-irssi-users-not-to-new-irc-users-">To new Irssi users (not to new IRC users ..)</h3>
<h3 id="to-new-irssi-users-not-to-new-irc-users-">To new Irssi users (not to new IRC users ..)</h3>
<p>Copyright (c) 2000-2002 by Timo Sirainen, release under <a href="http://www.gnu.org/licenses/fdl.html">GNU FDL</a> 1.1 license.</p>
<p>Copyright (c) 2000-2002 by Timo Sirainen, release under <a href="https://www.gnu.org/licenses/fdl.html">GNU FDL</a> 1.1 license.</p>
<p>Index with some FAQ questions that are answered in the chapter:</p>
@ -161,7 +160,7 @@ Ctrl-P, Ctrl-N - Jump to previous / next window
<h3 id="split-windows-and-window-items">Split windows and window items</h3>
<p><em>Note: <a href="http://quadpoint.org/articles/irssisplit/">this guide</a> might be a better introduction to window splits</em></p>
<p><em>Note: <a href="https://quadpoint.org/articles/irssisplit/">this guide</a> might be a better introduction to window splits</em></p>
<p>Irssi also supports split windows, theyve had some problems in past but I think they should work pretty well now :) Heres some commands related to them:</p>
@ -516,7 +515,7 @@ Ctrl-X - set the next server in list active
<p><strong>SOCKS</strong></p>
<p>Irssi can be compiled with socks support (<code>\--with-socks</code> option to configure), which requires “dante” and routes all connections through the proxy specified in the system-wide /etc/socks.conf. This method is known to have issues in Mac OS X.</p>
<p>Irssi can be compiled with socks support (<code>--with-socks</code> option to configure), which requires “dante” and routes all connections through the proxy specified in the system-wide /etc/socks.conf. This method is known to have issues in Mac OS X.</p>
<p>Note that <code>/SET proxy</code> settings dont have anything to do with socks.</p>

View File

@ -578,7 +578,7 @@ Irssi proxy works fine with other IRC clients as well.
SOCKS
Irssi can be compiled with socks support (\--with-socks option to configure),
Irssi can be compiled with socks support (--with-socks option to configure),
which requires “dante” and routes all connections through the proxy specified
in the system-wide /etc/socks.conf. This method is known to have issues in Mac
OS X.
@ -792,8 +792,8 @@ ADD -before act mail.
References:
[1] http://www.gnu.org/licenses/fdl.html
[1] https://www.gnu.org/licenses/fdl.html
[2] https://www.iterm2.com/
[3] http://quadpoint.org/articles/irssisplit/
[3] https://quadpoint.org/articles/irssisplit/
[4] https://github.com/rofl0r/proxychains-ng
[5] https://irssi.org/documentation/settings/

View File

@ -5,22 +5,22 @@
use strict;
our $VERSION = '2003020806';
our $VERSION = '2003020807';
our %IRSSI = (
authors => 'Stefan \'tommie\' Tomanek',
contact => 'stefan@pico.ruhr.de',
name => 'scriptassist',
description => 'keeps your scripts on the cutting edge',
license => 'GPLv2',
url => 'http://irssi.org/scripts/',
modules => 'Data::Dumper LWP::UserAgent (GnuPG)',
url => 'https://scripts.irssi.org/',
modules => 'CPAN::Meta::YAML LWP::Protocol::https (GnuPG)',
commands => "scriptassist"
);
our ($forked, %remote_db, $have_gpg, @complist);
use Irssi 20020324;
use Data::Dumper;
use CPAN::Meta::YAML;
use LWP::UserAgent;
use POSIX;
@ -170,14 +170,13 @@ sub bg_do {
my $cmd = $items[1];
$result{data}{unknown}{$cmd} = get_unknown($cmd, $xml);
}
my $dumper = Data::Dumper->new([\%result]);
$dumper->Purity(1)->Deepcopy(1)->Indent(0);
my $data = $dumper->Dump;
my $yaml = CPAN::Meta::YAML->new(\%result);
my $data = $yaml->write_string();
print($wh $data);
};
if ($@) {
print($wh Data::Dumper->new([+{data=>+{error=>$@}}])
->Purity(1)->Deepcopy(1)->Indent(0)->Dump);
print($wh CPAN::Meta::YAML->new(+{data=>+{error=>$@}})
->write_string());
}
close($wh);
POSIX::_exit(1);
@ -313,7 +312,7 @@ sub get_new {
my ($num) = @_;
my $result;
my $xml = get_scripts();
foreach (sort {$xml->{$b}{last_modified} cmp $xml->{$a}{last_modified}} keys %$xml) {
foreach (sort {$xml->{$b}{modified} cmp $xml->{$a}{modified}} keys %$xml) {
my %entry = %{ $xml->{$_} };
next if $entry{HIDDEN};
$result->{$_} = \%entry;
@ -427,8 +426,8 @@ sub pipe_input {
print CLIENTCRAP "%R<<%n Something weird happend (no text)";
return();
}
local our $VAR1;
my $incoming = eval($text);
utf8::decode($text);
my $incoming = CPAN::Meta::YAML->read_string($text)->[0];
if ($incoming->{db} && $incoming->{timestamp}) {
$remote_db{db} = $incoming->{db};
$remote_db{timestamp} = $incoming->{timestamp};
@ -628,7 +627,7 @@ sub print_ratings {
sub print_new {
my ($list) = @_;
my @table;
foreach (sort {$list->{$b}{last_modified} cmp $list->{$a}{last_modified}} keys %$list) {
foreach (sort {$list->{$b}{modified} cmp $list->{$a}{modified}} keys %$list) {
my @line;
my ($name) = get_names($_);
if (get_local_version($name)) {
@ -637,7 +636,7 @@ sub print_new {
push @line, "%yo%n";
}
push @line, "%9".$name."%9";
push @line, $list->{$_}{last_modified};
push @line, $list->{$_}{modified};
push @table, \@line;
}
print CLIENTCRAP draw_box('ScriptAssist', array2table(@table), 'new scripts', 1) ;
@ -822,7 +821,7 @@ sub contact_author {
sub get_scripts {
my $ua = LWP::UserAgent->new(env_proxy=>1, keep_alive=>1, timeout=>30);
$ua->agent('ScriptAssist/'.2003020803);
$ua->agent('ScriptAssist/'.$VERSION);
$ua->env_proxy();
my @mirrors = split(/ /, Irssi::settings_get_str('scriptassist_script_sources'));
my %sites_db;
@ -852,22 +851,25 @@ sub get_scripts {
$type = $2;
}
push @sources, $src;
#my @header = ('name', 'contact', 'authors', 'description', 'version', 'modules', 'last_modified');
#my @header = ('name', 'contact', 'authors', 'description', 'version', 'modules', 'modified');
if ($type eq 'dmp') {
no strict 'vars';
my $new_db = eval "$data";
foreach (keys %$new_db) {
if (defined $sites_db{script}{$_}) {
my $old = $sites_db{$_}{version};
my $new = $new_db->{$_}{version};
die("Support for $type script database has been removed. Please /set scriptassist_script_sources and change $type -> yml.\n");
} elsif ($type eq 'yml') {
utf8::decode($data);
my $new_db = CPAN::Meta::YAML->read_string($data);
foreach (@{$new_db->[0]}) {
my $K = $_->{filename};
if (defined $sites_db{script}{$K}) {
my $old = $sites_db{$K}{version};
my $new = $_->{version};
next if (compare_versions($old, $new) eq 'newer');
}
#foreach my $key (@header) {
foreach my $key (keys %{ $new_db->{$_} }) {
next unless defined $new_db->{$_}{$key};
$sites_db{$_}{$key} = $new_db->{$_}{$key};
foreach my $key (keys %$_) {
next unless defined $_->{$key};
$sites_db{$K}{$key} = $_->{$key};
}
$sites_db{$_}{source} = $src;
$sites_db{$K}{source} = $src;
}
} else {
die("Unknown script database type ($type).\n");
@ -1093,6 +1095,7 @@ sub missing_module {
sub cmd_scripassist {
my ($arg, $server, $witem) = @_;
utf8::decode($arg);
my @args = split(/ /, $arg);
if ($args[0] eq 'help' || $args[0] eq '-h') {
show_help();
@ -1176,7 +1179,7 @@ sub sig_complete {
}
Irssi::settings_add_str($IRSSI{name}, 'scriptassist_script_sources', 'https://scripts.irssi.org/scripts.dmp');
Irssi::settings_add_str($IRSSI{name}, 'scriptassist_script_sources', 'https://scripts.irssi.org/scripts.yml');
Irssi::settings_add_bool($IRSSI{name}, 'scriptassist_cache_sources', 1);
Irssi::settings_add_bool($IRSSI{name}, 'scriptassist_update_verbose', 1);
Irssi::settings_add_bool($IRSSI{name}, 'scriptassist_check_verbose', 1);

View File

@ -13,7 +13,7 @@ design=$site/documentation/design/
# FOOTER. May need to be adjusted as the source pages change
pageclean_regex='s{.*(?=<h1)}{}s;
s{(\s*<script\s.*?</script>)?\s*(</div>\s*){0,3}<footer.*}{}s;
s{(<.*?)\sclass="(?:highlighter-rouge|highlight)"(.*?>)}{\1\2}g;'
s{(<.*?)\sclass="(?:[^"]*\s+)*(?:highlighter-rouge|highlight)"(.*?>)}{\1\2}g;'
srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.