Merge pull request #1599 from ailin-nemui/docs

run syncdocs.sh
This commit is contained in:
ailin-nemui 2025-12-27 21:46:58 +00:00 committed by GitHub
commit 81887a6224
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 504 additions and 26 deletions

110
docs/New-users.html Normal file
View file

@ -0,0 +1,110 @@
<base href='https://irssi.org/New-users/'>
<h1>New users guide</h1>
<section id="new-to-irc">
<h2>New to IRC</h2>
<p>Internet Relay Chat was created in 1988 and has hardly changed. It can be used to exchange text messages (one message = single line) with other people, either privately (called query, PM, private message, MSG) or in a room (channel). Pictures are shared by uploading them to a temporary host like <a class="reference external" href="https://pomf.lain.la/">https://pomf.lain.la/</a> and then pasting the HTTP links. Code snippets or longer texts are shared by pasting them to a Pastebin like <a class="reference external" href="https://paste.opensuse.org/">https://paste.opensuse.org/</a> and then sharing the HTTP link.</p>
<p>IRC does not have message history. You can only receive replies while your computer is turned on and connected to the channel you want to follow. Some people run their IRC programs on remote servers for that reason.</p>
<p>IRC is organised into networks. Each network consists of many servers. It (mostly) does not matter which server you connect to as long as it belongs to the network you want to use. Irssi supports connections to many networks at the same time.</p>
<p>Each network contains many channels, rooms that are often dedicated to discussing a specific topic. You can find many channels on <a class="reference external" href="https://netsplit.de/">https://netsplit.de/</a> or using a search engine with the keyword “IRC”. Irssi supports joining many channels at the same time.</p>
<p>There is a rather large IRC network catering to free and open-source software and peer directed projects at <a class="reference external" href="https://libera.chat/">https://libera.chat/</a> and a smaller one at <a class="reference external" href="https://www.oftc.net/">https://www.oftc.net/</a> many free software projects still have support channels on these IRC networks (although some have moved to Matrix or proprietary platforms like Discord).</p>
</section>
<section id="first-start">
<h2>First start</h2>
<p>After (compiling and) installing Irssi, to start it, open a shell (Terminal) and type:</p>
<div class="highlight-default notranslate"><div><pre>irssi
</pre></div>
</div>
<p>You should be greeted by a blinking cursor behind <code class="docutils literal notranslate">[(status)]</code>. You are now in the status window of Irssi. Window is the Irssi name for what you might nowadays call a “Web browser tab”.</p>
<p>If youre confused about what you are seeing on the Irssi screen, you can find an annotated screenshot of it at <a class="reference internal" href="../User-interface/">User interface</a>.</p>
<p>If you want, you can pick a nick name (handle) that will be shown to others reading your messages now, by typing</p>
<div class="highlight-default notranslate"><div><pre>/set nick whatyouwant
</pre></div>
</div>
<p>Each command or message can be sent by pressing Enter. Commands in Irssi start with a <code class="docutils literal notranslate">/</code>. If there is no <code class="docutils literal notranslate">/</code>, then the line that you wrote will be sent as a message to the channel that you have open, for everyone to see.</p>
<section id="leaving">
<h3>Leaving</h3>
<p>Type <code class="docutils literal notranslate">/quit</code> to get out of Irssi.</p>
</section>
</section>
<section id="connecting-to-a-network">
<h2>Connecting to a network</h2>
<p>Irssi comes with some predefined networks. You can see the current list of networks by typing</p>
<div class="highlight-default notranslate"><div><pre>/network
</pre></div>
</div>
<p>(the list will be shown in your status window)</p>
<p>To connect to one of the networks in the list, type <code class="docutils literal notranslate">/connect networkname</code>, for example:</p>
<div class="highlight-default notranslate"><div><pre>/connect liberachat
</pre></div>
</div>
<p>You should see several messages scroll by. After a while, you should be connected to the Libera Chat network.</p>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>Irssi version 1.2 or older may be lacking the liberachat network entry. See <a class="reference external" href="https://github.com/shabble/irssi-docs/wiki/liberachat">https://github.com/shabble/irssi-docs/wiki/liberachat</a> for how to add it.</p>
</div>
<section id="nickname-registration">
<h3>Nickname registration</h3>
<p>Many IRC networks (but not all) offer a way to register a user account. Sometimes (but not on all networks) the account registration also includes reserving a nick for you. <em>How</em> to register also differs by network. Some <em>channels</em> only allow users with registered accounts to join them, so it may be very important for you to register a user account.</p>
<p>User accounts are always specific to a network.</p>
<p>For the Libera Chat network, you can find instructions how to register and set up your account with Irssi on <a class="reference external" href="https://github.com/shabble/irssi-docs/wiki/liberachat#configure-sasl-automated-log-in">https://github.com/shabble/irssi-docs/wiki/liberachat#configure-sasl-automated-log-in</a></p>
</section>
</section>
<section id="joining-a-channel">
<h2>Joining a channel</h2>
<p>Once you are connected to a network, you can join channels by typing <code class="docutils literal notranslate">/join #channelname</code>, for example:</p>
<div class="highlight-default notranslate"><div><pre>/join #irssi
</pre></div>
</div>
<p>Now, a new window will open and you can send messages to the channel.</p>
<section id="changing-windows">
<h3>Changing windows</h3>
<p>You can change between windows using the <code class="docutils literal notranslate">Ctrl</code>+<code class="docutils literal notranslate">n</code> or <code class="docutils literal notranslate">Ctrl</code>+<code class="docutils literal notranslate">p</code> keys, orif your terminal is configured properlyusing <code class="docutils literal notranslate">Alt</code>+<code class="docutils literal notranslate">1</code>, <code class="docutils literal notranslate">Alt</code>+<code class="docutils literal notranslate">2</code>, … See <a class="reference internal" href="../documentation/help/bind_-list/">bind -list</a> for a list of all default key bindings.</p>
</section>
<section id="removing-clutter">
<h3>Removing clutter</h3>
<p>By default, Irssi shows when someone joins or leaves a channel. These messages can waste a lot of lines and obscure the actual chat. To hide them, type</p>
<div class="highlight-default notranslate"><div><pre>/window hidelevel +joins +parts +quits
</pre></div>
</div>
<p>To get them back</p>
<div class="highlight-default notranslate"><div><pre>/window hidelevel -joins -parts -quits
</pre></div>
</div>
<p>If you want to hide them by default, <code class="docutils literal notranslate">/set window_default_hidelevel hidden joins parts quits</code></p>
</section>
</section>
<section id="adding-a-new-network">
<h2>Adding a new network</h2>
<p>If you want to join a network that is not there, you first need to find at least one server of that network. Lets say you have found the room <a class="reference external" href="https://netsplit.de/channels/details.php?room=%23hackint&amp;net=hackint">#hackint</a> on netsplit.de and want to join it. Then you can find that the <a class="reference external" href="https://netsplit.de/servers/?net=hackint">server</a> is irc.hackint.org, port 6697, SSL (TLS) on. To add it to Irssi, use the commands:</p>
<div class="highlight-default notranslate"><div><pre>/network add hackint
/server add -tls -network hackint irc.hackint.org 6697
</pre></div>
</div>
<p>Then, you can connect to the newly added network with</p>
<div class="highlight-default notranslate"><div><pre>/connect hackint
</pre></div>
</div>
<section id="multiple-networks">
<h3>Multiple networks</h3>
<p>If you are connected to multiple networks, you can change which one you are “talking” to (which one to send commands) by using the <code class="docutils literal notranslate">Ctrl</code>+<code class="docutils literal notranslate">x</code> key in the status window.</p>
</section>
</section>
<section id="on-line-help">
<h2>On-line help</h2>
<p>Most /commands have a help page, you can read it with</p>
<div class="highlight-default notranslate"><div><pre>/help commandname
</pre></div>
</div>
<p>or <a class="reference internal" href="../documentation/help/">on-line</a>.</p>
<p>The settings that can be changed with /SET are described on <a class="reference internal" href="../documentation/settings/">Settings Documentation</a> the settingshelp <a class="reference internal" href="#about-scripts">script</a> can be used to read it from within <code class="docutils literal notranslate">/help</code></p>
</section>
<section id="about-scripts">
<h2>About Scripts</h2>
<p>You can enhance your Irssi by installing scripts. Many Perl scripts written by other Irssi users can be found on <a class="reference external" href="https://scripts.irssi.org/">https://scripts.irssi.org/</a></p>
<p>Most of them should be compatible with Irssi 1.4 (but some may not, also see the Full Change log for some incompatible ones)</p>
</section>
<section id="about-themes">
<h2>About Themes</h2>
<p>Irssis look can be thoroughly changed with themes. Many themes created by other Irssi users can be found on <a class="reference external" href="https://themes.irssi.org/">https://themes.irssi.org/</a></p>
<p>If you want to modify the look of Irssi yourself, the <em>default</em> theme which can be found in your <code class="docutils literal notranslate">~/.irssi</code> folder is a good starting point. It also has a few comments explaining what some of the abstracts are used for</p>
</section>

193
docs/New-users.txt Normal file
View file

@ -0,0 +1,193 @@
# New users guide #
## New to IRC ##
Internet Relay Chat was created in 1988 and has hardly changed. It can be used
to exchange text messages (one message = single line) with other people, either
privately (called query, PM, private message, MSG) or in a room (channel).
Pictures are shared by uploading them to a temporary host like [1]https://
pomf.lain.la/ and then pasting the HTTP links. Code snippets or longer texts
are shared by pasting them to a Pastebin like [2]https://paste.opensuse.org/
and then sharing the HTTP link.
IRC does not have message history. You can only receive replies while your
computer is turned on and connected to the channel you want to follow. Some
people run their IRC programs on remote servers for that reason.
IRC is organised into networks. Each network consists of many servers. It
(mostly) does not matter which server you connect to as long as it belongs to
the network you want to use. Irssi supports connections to many networks at the
same time.
Each network contains many channels, rooms that are often dedicated to
discussing a specific topic. You can find many channels on [3]https://
netsplit.de/ or using a search engine with the keyword “IRC”. Irssi supports
joining many channels at the same time.
There is a rather large IRC network catering to free and open-source software
and peer directed projects at [4]https://libera.chat/ and a smaller one at [5]
https://www.oftc.net/ many free software projects still have support channels
on these IRC networks (although some have moved to Matrix or proprietary
platforms like Discord).
## First start ##
After (compiling and) installing Irssi, to start it, open a shell (Terminal)
and type:
irssi
You should be greeted by a blinking cursor behind [(status)]. You are now in
the status window of Irssi. Window is the Irssi name for what you might
nowadays call a “Web browser tab”.
If youre confused about what you are seeing on the Irssi screen, you can find
an annotated screenshot of it at [6]User interface.
If you want, you can pick a nick name (handle) that will be shown to others
reading your messages now, by typing
/set nick whatyouwant
Each command or message can be sent by pressing Enter. Commands in Irssi start
with a /. If there is no /, then the line that you wrote will be sent as a
message to the channel that you have open, for everyone to see.
### Leaving ###
Type /quit to get out of Irssi.
## Connecting to a network ##
Irssi comes with some predefined networks. You can see the current list of
networks by typing
/network
(the list will be shown in your status window)
To connect to one of the networks in the list, type /connect networkname, for
example:
/connect liberachat
You should see several messages scroll by. After a while, you should be
connected to the Libera Chat network.
Attention
Irssi version 1.2 or older may be lacking the liberachat network entry. See [7]
https://github.com/shabble/irssi-docs/wiki/liberachat for how to add it.
### Nickname registration ###
Many IRC networks (but not all) offer a way to register a user account.
Sometimes (but not on all networks) the account registration also includes
reserving a nick for you. How to register also differs by network. Some
channels only allow users with registered accounts to join them, so it may be
very important for you to register a user account.
User accounts are always specific to a network.
For the Libera Chat network, you can find instructions how to register and set
up your account with Irssi on [8]https://github.com/shabble/irssi-docs/wiki/
liberachat#configure-sasl-automated-log-in
## Joining a channel ##
Once you are connected to a network, you can join channels by typing /join #
channelname, for example:
/join #irssi
Now, a new window will open and you can send messages to the channel.
### Changing windows ###
You can change between windows using the Ctrl+n or Ctrl+p keys, orif your
terminal is configured properlyusing Alt+1, Alt+2, … See [9]bind -list for a
list of all default key bindings.
### Removing clutter ###
By default, Irssi shows when someone joins or leaves a channel. These messages
can waste a lot of lines and obscure the actual chat. To hide them, type
/window hidelevel +joins +parts +quits
To get them back
/window hidelevel -joins -parts -quits
If you want to hide them by default, /set window_default_hidelevel hidden joins
parts quits
## Adding a new network ##
If you want to join a network that is not there, you first need to find at
least one server of that network. Lets say you have found the room [10]#
hackint on netsplit.de and want to join it. Then you can find that the [11]
server is irc.hackint.org, port 6697, SSL (TLS) on. To add it to Irssi, use the
commands:
/network add hackint
/server add -tls -network hackint irc.hackint.org 6697
Then, you can connect to the newly added network with
/connect hackint
### Multiple networks ###
If you are connected to multiple networks, you can change which one you are
“talking” to (which one to send commands) by using the Ctrl+x key in the status
window.
## On-line help ##
Most /commands have a help page, you can read it with
/help commandname
or [12]on-line.
The settings that can be changed with /SET are described on [13]Settings
Documentation the settingshelp [14]script can be used to read it from within
/help
## About Scripts ##
You can enhance your Irssi by installing scripts. Many Perl scripts written by
other Irssi users can be found on [15]https://scripts.irssi.org/
Most of them should be compatible with Irssi 1.4 (but some may not, also see
the Full Change log for some incompatible ones)
## About Themes ##
Irssis look can be thoroughly changed with themes. Many themes created by
other Irssi users can be found on [16]https://themes.irssi.org/
If you want to modify the look of Irssi yourself, the default theme which can
be found in your ~/.irssi folder is a good starting point. It also has a few
comments explaining what some of the abstracts are used for
References:
[1] https://pomf.lain.la/
[2] https://paste.opensuse.org/
[3] https://netsplit.de/
[4] https://libera.chat/
[5] https://www.oftc.net/
[6] https://irssi.org/User-interface/
[7] https://github.com/shabble/irssi-docs/wiki/liberachat
[8] https://github.com/shabble/irssi-docs/wiki/liberachat#configure-sasl-automated-log-in
[9] https://irssi.org/documentation/help/bind_-list/
[10] https://netsplit.de/channels/details.php?room=%23hackint&net=hackint
[11] https://netsplit.de/servers/?net=hackint
[12] https://irssi.org/documentation/help/
[13] https://irssi.org/documentation/settings/
[14] https://irssi.org/New-users/#about-scripts
[15] https://scripts.irssi.org/
[16] https://themes.irssi.org/

52
docs/qna.html Normal file
View file

@ -0,0 +1,52 @@
<base href='https://irssi.org/documentation/qna/multi/'>
<h1>Right-aligned nicks</h1>
<p>To create a “tabular” effect of the chat view, or to align nick names in a column, you can use Irssis theme/format system. The basic commands are the following:</p>
<div class="highlight-default notranslate"><div><pre>/format own_msg {ownmsgnick $2 {ownnick $[-9]0}}$1
/format own_msg_channel {ownmsgnick $3 {ownnick $[-9]0}{msgchannel $1}}$2
/format pubmsg_me {pubmsgmenick $2 {menick $[-9]0}}$1
/format pubmsg_me_channel {pubmsgmenick $3 {menick $[-9]0}{msgchannel $1}}$2
/format pubmsg_hilight {pubmsghinick $0 $3 $[-9]1}$2
/format pubmsg_hilight_channel {pubmsghinick $0 $4 $[-9]1{msgchannel $2}}$3
/format pubmsg {pubmsgnick $2 {pubnick $[-9]0}}$1
/format pubmsg_channel {pubmsgnick $3 {pubnick $[-9]0}{msgchannel $1}}$2
</pre></div>
</div>
<p>These are copied from the default themes default values, which are responsible for displaying your own messages sent to a channel (<code class="docutils literal notranslate">own_msg</code>) as well as received messages (<code class="docutils literal notranslate">pubmsg</code>) and the two basic highlightings (<code class="docutils literal notranslate">me</code> and <code class="docutils literal notranslate">hilight</code>).</p>
<p>Then, in front of the argument that contains the nick name (<code class="docutils literal notranslate">$0</code> in most cases, but <code class="docutils literal notranslate">$1</code> in <code class="docutils literal notranslate">pubmsg_hilight</code>), an alignment modifier (see <a class="reference internal" href="../../settings/#a-b">Appendix B: Special Variables and Expandos</a>) has been added: <code class="docutils literal notranslate">[-9]</code>. This means that the nicks will be right-aligned and truncated to 9 characters.</p>
<p><strong>Note</strong>: Modifiers <em>only</em> work in the <code class="docutils literal notranslate">/format</code> section of a theme (this may change in the future)</p>
<p>There are also some scripts that try to do the alignment for you, like: <code class="docutils literal notranslate">nm</code>, <code class="docutils literal notranslate">nm2</code>.</p>
<p>There are also some nice themes that extend the alignment to further formats, like: <a class="reference external" href="https://github.com/ronilaukkarinen/weed">weed</a>.</p>
<h1>Automatic log-in to NickServ</h1>
<p>Please check here =&gt; <a class="reference internal" href="../../manual/automation/#automatic-log-in-to-nickserv">Automatic log-in to NickServ</a></p>
<h1>CertFP Log-in</h1>
<p>CertFP, short for Certificate Finger Print, is another method to log you in to NickServ. Instead of a password, it uses a <a class="reference external" href="https://en.wikipedia.org/wiki/Client_certificate">Client Certificate</a>.</p>
<p>In order to use it, you</p>
<ul class="simple">
<li><p>first need a certificate,</p></li>
<li><p>then configure Irssi to use this certificate,</p></li>
<li><p>and finally register the certificate with NickServ.</p></li>
</ul>
<p>Irssi does not have built-in certificate management commands, so you need to use an external tool like <code class="docutils literal notranslate">openssl</code> to create the certificate.</p>
<p>A step-by-step guide for the Libera Chat network can be found here =&gt; <a class="reference external" href="https://github.com/shabble/irssi-docs/wiki/liberachat_certfp">https://github.com/shabble/irssi-docs/wiki/liberachat_certfp</a></p>
<p>It is necessary that the certificate be available as a file; PKCS#11 is not supported.</p>
<h1>Tor (The Onion Router)</h1>
<p><a class="reference external" href="https://www.torproject.org/">Tor</a> is an overlay network for anonymous communication. It operates a local <a class="reference external" href="https://en.wikipedia.org/wiki/SOCKS">SOCKS</a> proxy for applications to use.</p>
<p>Unfortunately, Irssi currently does not support SOCKS proxies natively. As a workaround, you can install the <a class="reference external" href="https://github.com/rofl0r/proxychains-ng">ProxyChains-NG</a> program (note, it must be the NG version).</p>
<p>Afterwards, you can launch Irssi like this:</p>
<div class="highlight-default notranslate"><div><pre>proxychains4 irssi
</pre></div>
</div>
<p>Now your connections will go through the Proxy configured in ProxyChains-NG (Tor by default).</p>
<p>IRC networks may have different requirements to be able to connect via Tor. For the Libera Chat network, you will first need to set up <a class="reference internal" href="../certfp/">CertFP Log-in</a> using a clearnet connection, and then connect to their <a class="reference external" href="https://libera.chat/guides/connect#accessing-liberachat-via-tor">Onion Service</a> <code class="docutils literal notranslate">palladium.libera.chat</code>. More detailed instructions can be found here =&gt; <a class="reference external" href="https://github.com/shabble/irssi-docs/wiki/liberator">https://github.com/shabble/irssi-docs/wiki/liberator</a></p>
<h1>The following signatures were invalid: EXPKEYSIG</h1>
<p>If you see such a message</p>
<div class="highlight-default notranslate"><div><pre>Err:4 home:/ailin_nemui:/irssi-an InRelease
The following signatures were invalid: EXPKEYSIG EDB7AED941EEDB57 home:ailin_nemui OBS Project &lt;home:ailin_nemui@build.opensuse.org&gt;
</pre></div>
</div>
<p>this means that the automatic signing key used by the Open Build Service expired. OBS renews the key periodically, but Debian does not support this.</p>
<section id="fix">
<h2>Fix</h2>
<p>Download the key again, following the regular OBS instructions. If it still does not work, verify if there is a second expired copy of the key in <code class="docutils literal notranslate">/etc/apt/trusted.gpg.d</code> or in <code class="docutils literal notranslate">apt-key list</code> and remove it as well.</p>
</section>

111
docs/qna.txt Normal file
View file

@ -0,0 +1,111 @@
# Right-aligned nicks #
To create a “tabular” effect of the chat view, or to align nick names in a
column, you can use Irssis theme/format system. The basic commands are the
following:
/format own_msg {ownmsgnick $2 {ownnick $[-9]0}}$1
/format own_msg_channel {ownmsgnick $3 {ownnick $[-9]0}{msgchannel $1}}$2
/format pubmsg_me {pubmsgmenick $2 {menick $[-9]0}}$1
/format pubmsg_me_channel {pubmsgmenick $3 {menick $[-9]0}{msgchannel $1}}$2
/format pubmsg_hilight {pubmsghinick $0 $3 $[-9]1}$2
/format pubmsg_hilight_channel {pubmsghinick $0 $4 $[-9]1{msgchannel $2}}$3
/format pubmsg {pubmsgnick $2 {pubnick $[-9]0}}$1
/format pubmsg_channel {pubmsgnick $3 {pubnick $[-9]0}{msgchannel $1}}$2
These are copied from the default themes default values, which are responsible
for displaying your own messages sent to a channel (own_msg) as well as
received messages (pubmsg) and the two basic highlightings (me and hilight).
Then, in front of the argument that contains the nick name ($0 in most cases,
but $1 in pubmsg_hilight), an alignment modifier (see [1]Appendix B: Special
Variables and Expandos) has been added: [-9]. This means that the nicks will be
right-aligned and truncated to 9 characters.
Note: Modifiers only work in the /format section of a theme (this may change in
the future)
There are also some scripts that try to do the alignment for you, like: nm,
nm2.
There are also some nice themes that extend the alignment to further formats,
like: [2]weed.
# Automatic log-in to NickServ #
Please check here => [3]Automatic log-in to NickServ
# CertFP Log-in #
CertFP, short for Certificate Finger Print, is another method to log you in to
NickServ. Instead of a password, it uses a [4]Client Certificate.
In order to use it, you
• first need a certificate,
• then configure Irssi to use this certificate,
• and finally register the certificate with NickServ.
Irssi does not have built-in certificate management commands, so you need to
use an external tool like openssl to create the certificate.
A step-by-step guide for the Libera Chat network can be found here => [5]https:
//github.com/shabble/irssi-docs/wiki/liberachat_certfp
It is necessary that the certificate be available as a file; PKCS#11 is not
supported.
# Tor (The Onion Router) #
[6]Tor is an overlay network for anonymous communication. It operates a local
[7]SOCKS proxy for applications to use.
Unfortunately, Irssi currently does not support SOCKS proxies natively. As a
workaround, you can install the [8]ProxyChains-NG program (note, it must be the
NG version).
Afterwards, you can launch Irssi like this:
proxychains4 irssi
Now your connections will go through the Proxy configured in ProxyChains-NG
(Tor by default).
IRC networks may have different requirements to be able to connect via Tor. For
the Libera Chat network, you will first need to set up [9]CertFP Log-in using a
clearnet connection, and then connect to their [10]Onion Service
palladium.libera.chat. More detailed instructions can be found here => [11]
https://github.com/shabble/irssi-docs/wiki/liberator
# The following signatures were invalid: EXPKEYSIG #
If you see such a message
Err:4 home:/ailin_nemui:/irssi-an InRelease
The following signatures were invalid: EXPKEYSIG EDB7AED941EEDB57 home:ailin_nemui OBS Project <home:ailin_nemui@build.opensuse.org>
this means that the automatic signing key used by the Open Build Service
expired. OBS renews the key periodically, but Debian does not support this.
## Fix ##
Download the key again, following the regular OBS instructions. If it still
does not work, verify if there is a second expired copy of the key in /etc/apt/
trusted.gpg.d or in apt-key list and remove it as well.
References:
[1] https://irssi.org/documentation/settings/#a-b
[2] https://github.com/ronilaukkarinen/weed
[3] https://irssi.org/documentation/manual/automation/#automatic-log-in-to-nickserv
[4] https://en.wikipedia.org/wiki/Client_certificate
[5] https://github.com/shabble/irssi-docs/wiki/liberachat_certfp
[6] https://www.torproject.org/
[7] https://en.wikipedia.org/wiki/SOCKS
[8] https://github.com/rofl0r/proxychains-ng
[9] https://irssi.org/documentation/qna/certfp/
[10] https://libera.chat/guides/connect#accessing-liberachat-via-tor
[11] https://github.com/shabble/irssi-docs/wiki/liberator

View file

@ -1,19 +1,22 @@
#!/bin/sh -e
# Run this to download FAQ and startup-HOWTO from irssi.org
# Run this to download QNA and New-users from irssi.org
PKG_NAME="Irssi"
export LC_ALL=en_IE.utf8
site=https://irssi.org
faq=$site/documentation/faq/
howto=$site/documentation/startup/
design=$site/documentation/design/
qna=$site/documentation/qna/
howto=$site/New-users/
#design=$site/documentation/design/
# remove everything until H1 and optionally 2 DIVs before the
# 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="(?:[^"]*\s+)*(?:highlighter-rouge|highlight)"(.*?>)}{\1\2}g;'
s{(\s*<script\s.*?</script>)?\s*(</section>(\r?\n)*\s*</article>\s*)?(</div>\s*){0,3}<footer.*}{}s;
s{(<.*?)\sclass="(?:[^"]*\s+)*(?:highlighter-rouge|highlight)"(.*?>)}{\1\2}g;
s{<a class="headerlink" href=".*?" title="Permalink to this heading"></a>}{}g;
s{<span.*?>(.*?)</span>}{\1}g;'
srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
@ -45,6 +48,7 @@ else
any=false
fi
addheadermark="perl -p -e s{<h(\\d).*?>\\K}{(q:#:x\$1).q:&#32;:}ge;s{(?=</h(\\d)>)}{q:&#32;:.(q:#:x\$1)}ge"
if type w3m >/dev/null 2>&1 ; then
converter="w3m -o display_link_number=1 -dump -T text/html"
any=true
@ -83,25 +87,33 @@ download_it() {
mv "$3".tmp "$3"
}
download_it "FAQ" "$faq" "$srcdir"/docs/faq.html
download_it "Startup How-To" "$howto" "$srcdir"/docs/startup-HOWTO.html
download_it "Design" "$design" "$srcdir"/docs/design.html
download_it_nested() {
name=$1; shift
src=$1; shift
dest=$1; shift
download_it "$name" "$src" "$dest".nest
echo > "$dest"
eval $(perl -n -0777 -e 'print qq{download_it "\$name ($2)" "\${src}$1/" "\${dest}.$1";
cat "\${dest}.$1" >> "\${dest}.tmp";
rm "\${dest}.$1";\n}
while(m{<a class="reference internal" href="(.*?)/">(.*?)</a>}g)' "$dest".nest)
rm "$dest".nest
perl -i -0777 -p -e 's{<base href=.*?>}{}g;s{\A}{<base href='"'${src}multi/'"'>\n}' "$dest".tmp
mv "$dest".tmp "$dest"
}
download_it_nested "QNA" "$qna" "$srcdir"/docs/qna.html
download_it "New users guide" "$howto" "$srcdir"/docs/New-users.html
#download_it "Design" "$design" "$srcdir"/docs/design.html
# .html -> .txt with lynx or elinks
echo "Documentation: html -> txt..."
echo "Documentation: html -> txt... [converter: $converter]"
cat "$srcdir"/docs/faq.html \
| LC_ALL=en_IE.utf8 $converter \
| perl -pe '
s/^ *//;
if ($_ eq "\n" && $state eq "Q") { $_ = ""; }
elsif (/^([QA]):/) { $state = $1 }
elsif ($_ ne "\n") { $_ = " $_"; };
' > "$srcdir"/docs/faq.txt
cat "$srcdir"/docs/qna.html \
| $addheadermark | $converter > "$srcdir"/docs/qna.txt
cat "$srcdir"/docs/startup-HOWTO.html \
| perl -pe "s/\\bhref=([\"\'])#.*?\\1//" \
| LC_ALL=en_IE.utf8 $converter > "$srcdir"/docs/startup-HOWTO.txt
cat "$srcdir"/docs/New-users.html \
| $addheadermark | $converter > "$srcdir"/docs/New-users.txt
cat "$srcdir"/docs/design.html \
| LC_ALL=en_IE.utf8 $converter > "$srcdir"/docs/design.txt
#cat "$srcdir"/docs/design.html \
# | $addheadermark | $converter > "$srcdir"/docs/design.txt