1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 14:56:39 +02:00

doc: add IRC color codes 16-99 in user's guide

This commit is contained in:
Sébastien Helleu
2014-11-11 11:16:10 +01:00
parent 6f5f6da0eb
commit 55712b91cb
13 changed files with 700 additions and 120 deletions
+105
View File
@@ -0,0 +1,105 @@
[width="30%",cols="^2m,3",options="header"]
|===
| IRC color | WeeChat color
| 00 | white
| 01 | black
| 02 | blue
| 03 | green
| 04 | lightred
| 05 | red
| 06 | magenta
| 07 | brown
| 08 | yellow
| 09 | lightgreen
| 10 | cyan
| 11 | lightcyan
| 12 | lightblue
| 13 | lightmagenta
| 14 | darkgray
| 15 | gray
| 16 | 52
| 17 | 94
| 18 | 100
| 19 | 58
| 20 | 22
| 21 | 29
| 22 | 23
| 23 | 24
| 24 | 17
| 25 | 54
| 26 | 53
| 27 | 89
| 28 | 88
| 29 | 130
| 30 | 142
| 31 | 64
| 32 | 28
| 33 | 35
| 34 | 30
| 35 | 25
| 36 | 18
| 37 | 91
| 38 | 90
| 39 | 125
| 40 | 124
| 41 | 166
| 42 | 184
| 43 | 106
| 44 | 34
| 45 | 49
| 46 | 37
| 47 | 33
| 48 | 19
| 49 | 129
| 50 | 127
| 51 | 161
| 52 | 196
| 53 | 208
| 54 | 226
| 55 | 154
| 56 | 46
| 57 | 86
| 58 | 51
| 59 | 75
| 60 | 21
| 61 | 171
| 62 | 201
| 63 | 198
| 64 | 203
| 65 | 215
| 66 | 227
| 67 | 191
| 68 | 83
| 69 | 122
| 70 | 87
| 71 | 111
| 72 | 63
| 73 | 177
| 74 | 207
| 75 | 205
| 76 | 217
| 77 | 223
| 78 | 229
| 79 | 193
| 80 | 157
| 81 | 158
| 82 | 159
| 83 | 153
| 84 | 147
| 85 | 183
| 86 | 219
| 87 | 212
| 88 | 16
| 89 | 233
| 90 | 235
| 91 | 237
| 92 | 239
| 93 | 241
| 94 | 244
| 95 | 247
| 96 | 250
| 97 | 254
| 98 | 231
| 99 | default
|===
+6 -20
View File
@@ -1413,26 +1413,12 @@ um die Farbkodierungen bzw. Attribute zu deaktivieren.
Farbtabelle für key[ctrl-c,c]:
[width="50%",cols="^1m,3,3",options="header"]
|===
| Code | IRC | WeeChat (curses)
| 00 | weiß | white
| 01 | schwarz | black
| 02 | dunkelblau | blue
| 03 | dunkelgrün | green
| 04 | hellrot | lightred
| 05 | dunkelrot | red
| 06 | magenta | magenta
| 07 | orange | brown
| 08 | gelb | yellow
| 09 | hellgrün | lightgreen
| 10 | türkis | cyan
| 11 | hell türkis | lightcyan
| 12 | hellblau | lightblue
| 13 | hell magenta | lightmagenta
| 14 | grau | darkgray
| 15 | hellgrau | gray
|===
include::autogen/user/irc_colors.asciidoc[]
// TRANSLATION MISSING
[NOTE]
To show all available colors in your terminal, you can do `/color` then
key[alt-c] in WeeChat or run this command in terminal: `weechat --colors`.
Beispiel: Im Buffer wird "Hallo an alle!" ausgegeben. Dabei wird "Hallo" in fett und hellblau
und "an alle" rot und unterstrichen dargestellt.
+35
View File
@@ -335,6 +335,23 @@ def get_url_options():
return url_options
def get_irc_colors():
"""
Get list of IRC colors in a dict with 2 indexes:
color_irc, color_weechat.
"""
irc_colors = []
infolist = weechat.infolist_get('irc_color_weechat', '', '')
while weechat.infolist_next(infolist):
irc_colors.append({
'color_irc': weechat.infolist_string(infolist, 'color_irc'),
'color_weechat': weechat.infolist_string(infolist,
'color_weechat'),
})
weechat.infolist_free(infolist)
return irc_colors
def update_file(oldfile, newfile, num_files, num_files_updated, obj):
"""Update a doc file."""
try:
@@ -377,6 +394,7 @@ def docgen_cmd_cb(data, buf, args):
hdata = get_hdata()
completions = get_completions()
url_options = get_url_options()
irc_colors = get_irc_colors()
# get path and replace ~ by home if needed
path = weechat.config_get_plugin('path')
@@ -641,6 +659,23 @@ def docgen_cmd_cb(data, buf, args):
update_file(filename, tmpfilename, num_files, num_files_updated,
'url_options')
# write IRC colors
filename = directory + '/user/irc_colors.asciidoc'
tmpfilename = filename + '.tmp'
_file = open(tmpfilename, 'w')
_file.write('[width="30%",cols="^2m,3",options="header"]\n')
_file.write('|===\n')
_file.write('| {0} | {1}\n\n'
''.format(_('IRC color'), _('WeeChat color')))
for color in irc_colors:
_file.write('| {0} | {1}\n'
''.format(escape(color['color_irc']),
escape(color['color_weechat'])))
_file.write('|===\n')
_file.close()
update_file(filename, tmpfilename, num_files, num_files_updated,
'irc_colors')
# write counters
weechat.prnt('',
'docgen: {0}: {1:3d} files '
+105
View File
@@ -0,0 +1,105 @@
[width="30%",cols="^2m,3",options="header"]
|===
| IRC color | WeeChat color
| 00 | white
| 01 | black
| 02 | blue
| 03 | green
| 04 | lightred
| 05 | red
| 06 | magenta
| 07 | brown
| 08 | yellow
| 09 | lightgreen
| 10 | cyan
| 11 | lightcyan
| 12 | lightblue
| 13 | lightmagenta
| 14 | darkgray
| 15 | gray
| 16 | 52
| 17 | 94
| 18 | 100
| 19 | 58
| 20 | 22
| 21 | 29
| 22 | 23
| 23 | 24
| 24 | 17
| 25 | 54
| 26 | 53
| 27 | 89
| 28 | 88
| 29 | 130
| 30 | 142
| 31 | 64
| 32 | 28
| 33 | 35
| 34 | 30
| 35 | 25
| 36 | 18
| 37 | 91
| 38 | 90
| 39 | 125
| 40 | 124
| 41 | 166
| 42 | 184
| 43 | 106
| 44 | 34
| 45 | 49
| 46 | 37
| 47 | 33
| 48 | 19
| 49 | 129
| 50 | 127
| 51 | 161
| 52 | 196
| 53 | 208
| 54 | 226
| 55 | 154
| 56 | 46
| 57 | 86
| 58 | 51
| 59 | 75
| 60 | 21
| 61 | 171
| 62 | 201
| 63 | 198
| 64 | 203
| 65 | 215
| 66 | 227
| 67 | 191
| 68 | 83
| 69 | 122
| 70 | 87
| 71 | 111
| 72 | 63
| 73 | 177
| 74 | 207
| 75 | 205
| 76 | 217
| 77 | 223
| 78 | 229
| 79 | 193
| 80 | 157
| 81 | 158
| 82 | 159
| 83 | 153
| 84 | 147
| 85 | 183
| 86 | 219
| 87 | 212
| 88 | 16
| 89 | 233
| 90 | 235
| 91 | 237
| 92 | 239
| 93 | 241
| 94 | 244
| 95 | 247
| 96 | 250
| 97 | 254
| 98 | 231
| 99 | default
|===
+5 -20
View File
@@ -1394,26 +1394,11 @@ attribute.
Color codes for key[ctrl-c,c] are:
[width="50%",cols="^1m,3,3",options="header"]
|===
| Code | IRC | WeeChat (curses)
| 00 | white | white
| 01 | black | black
| 02 | dark blue | blue
| 03 | dark green | green
| 04 | light red | lightred
| 05 | dark red | red
| 06 | magenta | magenta
| 07 | orange | brown
| 08 | yellow | yellow
| 09 | light green | lightgreen
| 10 | cyan | cyan
| 11 | light cyan | lightcyan
| 12 | light blue | lightblue
| 13 | light magenta | lightmagenta
| 14 | gray | darkgray
| 15 | light gray | gray
|===
include::autogen/user/irc_colors.asciidoc[]
[NOTE]
To show all available colors in your terminal, you can do `/color` then
key[alt-c] in WeeChat or run this command in terminal: `weechat --colors`.
Example: display of "hello everybody!" with "hello" in light blue bold and
"everybody" in light red underlined:
+105
View File
@@ -0,0 +1,105 @@
[width="30%",cols="^2m,3",options="header"]
|===
| Couleur IRC | Couleur WeeChat
| 00 | white
| 01 | black
| 02 | blue
| 03 | green
| 04 | lightred
| 05 | red
| 06 | magenta
| 07 | brown
| 08 | yellow
| 09 | lightgreen
| 10 | cyan
| 11 | lightcyan
| 12 | lightblue
| 13 | lightmagenta
| 14 | darkgray
| 15 | gray
| 16 | 52
| 17 | 94
| 18 | 100
| 19 | 58
| 20 | 22
| 21 | 29
| 22 | 23
| 23 | 24
| 24 | 17
| 25 | 54
| 26 | 53
| 27 | 89
| 28 | 88
| 29 | 130
| 30 | 142
| 31 | 64
| 32 | 28
| 33 | 35
| 34 | 30
| 35 | 25
| 36 | 18
| 37 | 91
| 38 | 90
| 39 | 125
| 40 | 124
| 41 | 166
| 42 | 184
| 43 | 106
| 44 | 34
| 45 | 49
| 46 | 37
| 47 | 33
| 48 | 19
| 49 | 129
| 50 | 127
| 51 | 161
| 52 | 196
| 53 | 208
| 54 | 226
| 55 | 154
| 56 | 46
| 57 | 86
| 58 | 51
| 59 | 75
| 60 | 21
| 61 | 171
| 62 | 201
| 63 | 198
| 64 | 203
| 65 | 215
| 66 | 227
| 67 | 191
| 68 | 83
| 69 | 122
| 70 | 87
| 71 | 111
| 72 | 63
| 73 | 177
| 74 | 207
| 75 | 205
| 76 | 217
| 77 | 223
| 78 | 229
| 79 | 193
| 80 | 157
| 81 | 158
| 82 | 159
| 83 | 153
| 84 | 147
| 85 | 183
| 86 | 219
| 87 | 212
| 88 | 16
| 89 | 233
| 90 | 235
| 91 | 237
| 92 | 239
| 93 | 241
| 94 | 244
| 95 | 247
| 96 | 250
| 97 | 254
| 98 | 231
| 99 | default
|===
+6 -20
View File
@@ -1434,26 +1434,12 @@ stopper l'attribut défini.
Les codes couleur pour key[ctrl-c,c] sont :
[width="50%",cols="^1m,3,3",options="header"]
|===
| Code | IRC | WeeChat (curses)
| 00 | blanc | white
| 01 | noir | black
| 02 | bleu foncé | blue
| 03 | vert foncé | green
| 04 | rouge clair | lightred
| 05 | rouge foncé | red
| 06 | violet | magenta
| 07 | orange | brown
| 08 | jaune | yellow
| 09 | vert clair | lightgreen
| 10 | cyan | cyan
| 11 | cyan clair | lightcyan
| 12 | bleu clair | lightblue
| 13 | violet clair | lightmagenta
| 14 | gris | darkgray
| 15 | gris clair | gray
|===
include::autogen/user/irc_colors.asciidoc[]
[NOTE]
Pour voir toutes les couleurs disponibles dans votre terminal, vous pouvez
taper `/color` puis key[alt-c] dans WeeChat ou lancez cette commande dans le
terminal : `weechat --colors`.
Exemple : affichage de "bonjour tout le monde !" avec "bonjour" en bleu clair
gras, et "tout le monde" en rouge clair souligné :
+105
View File
@@ -0,0 +1,105 @@
[width="30%",cols="^2m,3",options="header"]
|===
| IRC color | WeeChat color
| 00 | white
| 01 | black
| 02 | blue
| 03 | green
| 04 | lightred
| 05 | red
| 06 | magenta
| 07 | brown
| 08 | yellow
| 09 | lightgreen
| 10 | cyan
| 11 | lightcyan
| 12 | lightblue
| 13 | lightmagenta
| 14 | darkgray
| 15 | gray
| 16 | 52
| 17 | 94
| 18 | 100
| 19 | 58
| 20 | 22
| 21 | 29
| 22 | 23
| 23 | 24
| 24 | 17
| 25 | 54
| 26 | 53
| 27 | 89
| 28 | 88
| 29 | 130
| 30 | 142
| 31 | 64
| 32 | 28
| 33 | 35
| 34 | 30
| 35 | 25
| 36 | 18
| 37 | 91
| 38 | 90
| 39 | 125
| 40 | 124
| 41 | 166
| 42 | 184
| 43 | 106
| 44 | 34
| 45 | 49
| 46 | 37
| 47 | 33
| 48 | 19
| 49 | 129
| 50 | 127
| 51 | 161
| 52 | 196
| 53 | 208
| 54 | 226
| 55 | 154
| 56 | 46
| 57 | 86
| 58 | 51
| 59 | 75
| 60 | 21
| 61 | 171
| 62 | 201
| 63 | 198
| 64 | 203
| 65 | 215
| 66 | 227
| 67 | 191
| 68 | 83
| 69 | 122
| 70 | 87
| 71 | 111
| 72 | 63
| 73 | 177
| 74 | 207
| 75 | 205
| 76 | 217
| 77 | 223
| 78 | 229
| 79 | 193
| 80 | 157
| 81 | 158
| 82 | 159
| 83 | 153
| 84 | 147
| 85 | 183
| 86 | 219
| 87 | 212
| 88 | 16
| 89 | 233
| 90 | 235
| 91 | 237
| 92 | 239
| 93 | 241
| 94 | 244
| 95 | 247
| 96 | 250
| 97 | 254
| 98 | 231
| 99 | default
|===
+6 -20
View File
@@ -1456,26 +1456,12 @@ terminare l'attributo.
I codici colore per key[ctrl-c,c] sono:
[width="50%",cols="^1m,3,3",options="header"]
|===
| Codice | IRC | WeeChat (curses)
| 00 | bianco | white
| 01 | nero | black
| 02 | blu scuro | blue
| 03 | verde scuro | green
| 04 | rosso chiaro | lightred
| 05 | rosso scuro | red
| 06 | rosa scuro | magenta
| 07 | arancione | brown
| 08 | giallo | yellow
| 09 | verde chiaro | lightgreen
| 10 | azzurro scuro | cyan
| 11 | azzurro chiaro | lightcyan
| 12 | blu chiaro | lightblue
| 13 | rosa chiaro | lightmagenta
| 14 | grigio | darkgray
| 15 | grigio chiaro | gray
|===
include::autogen/user/irc_colors.asciidoc[]
// TRANSLATION MISSING
[NOTE]
To show all available colors in your terminal, you can do `/color` then
key[alt-c] in WeeChat or run this command in terminal: `weechat --colors`.
Esempio: visualizza "ciao a tutti!" con "ciao" scritto in blu chiaro grassetto
e "a tutti" in rosso chiaro sottolineato:
+105
View File
@@ -0,0 +1,105 @@
[width="30%",cols="^2m,3",options="header"]
|===
| IRC color | WeeChat color
| 00 | white
| 01 | black
| 02 | blue
| 03 | green
| 04 | lightred
| 05 | red
| 06 | magenta
| 07 | brown
| 08 | yellow
| 09 | lightgreen
| 10 | cyan
| 11 | lightcyan
| 12 | lightblue
| 13 | lightmagenta
| 14 | darkgray
| 15 | gray
| 16 | 52
| 17 | 94
| 18 | 100
| 19 | 58
| 20 | 22
| 21 | 29
| 22 | 23
| 23 | 24
| 24 | 17
| 25 | 54
| 26 | 53
| 27 | 89
| 28 | 88
| 29 | 130
| 30 | 142
| 31 | 64
| 32 | 28
| 33 | 35
| 34 | 30
| 35 | 25
| 36 | 18
| 37 | 91
| 38 | 90
| 39 | 125
| 40 | 124
| 41 | 166
| 42 | 184
| 43 | 106
| 44 | 34
| 45 | 49
| 46 | 37
| 47 | 33
| 48 | 19
| 49 | 129
| 50 | 127
| 51 | 161
| 52 | 196
| 53 | 208
| 54 | 226
| 55 | 154
| 56 | 46
| 57 | 86
| 58 | 51
| 59 | 75
| 60 | 21
| 61 | 171
| 62 | 201
| 63 | 198
| 64 | 203
| 65 | 215
| 66 | 227
| 67 | 191
| 68 | 83
| 69 | 122
| 70 | 87
| 71 | 111
| 72 | 63
| 73 | 177
| 74 | 207
| 75 | 205
| 76 | 217
| 77 | 223
| 78 | 229
| 79 | 193
| 80 | 157
| 81 | 158
| 82 | 159
| 83 | 153
| 84 | 147
| 85 | 183
| 86 | 219
| 87 | 212
| 88 | 16
| 89 | 233
| 90 | 235
| 91 | 237
| 92 | 239
| 93 | 241
| 94 | 244
| 95 | 247
| 96 | 250
| 97 | 254
| 98 | 231
| 99 | default
|===
+6 -20
View File
@@ -1393,26 +1393,12 @@ key[ctrl-c,_]::
key[ctrl-c,c] 用の色コード:
[width="50%",cols="^1m,3,3",options="header"]
|===
| コード | IRC | WeeChat (curses)
| 00 | 白 | white
| 01 | 黒 | black
| 02 | 暗い青 | blue
| 03 | 暗い緑 | green
| 04 | 明るい赤 | lightred
| 05 | 暗い赤 | red
| 06 | 赤紫 | magenta
| 07 | 橙色 | brown
| 08 | 黄色 | yellow
| 09 | 明るい緑色 | lightgreen
| 10 | 青緑 | cyan
| 11 | 明るい青緑色 | lightcyan
| 12 | 明るい青 | lightblue
| 13 | 明るい赤紫色 | lightmagenta
| 14 | 灰色 | darkgray
| 15 | 明るい灰色 | gray
|===
include::autogen/user/irc_colors.asciidoc[]
// TRANSLATION MISSING
[NOTE]
To show all available colors in your terminal, you can do `/color` then
key[alt-c] in WeeChat or run this command in terminal: `weechat --colors`.
例: "こんにちは皆さん!" の "こんにちは" を太字の明るい青、"皆さん"
を下線付きの明るい赤に表示したい場合:
+105
View File
@@ -0,0 +1,105 @@
[width="30%",cols="^2m,3",options="header"]
|===
| IRC color | WeeChat color
| 00 | white
| 01 | black
| 02 | blue
| 03 | green
| 04 | lightred
| 05 | red
| 06 | magenta
| 07 | brown
| 08 | yellow
| 09 | lightgreen
| 10 | cyan
| 11 | lightcyan
| 12 | lightblue
| 13 | lightmagenta
| 14 | darkgray
| 15 | gray
| 16 | 52
| 17 | 94
| 18 | 100
| 19 | 58
| 20 | 22
| 21 | 29
| 22 | 23
| 23 | 24
| 24 | 17
| 25 | 54
| 26 | 53
| 27 | 89
| 28 | 88
| 29 | 130
| 30 | 142
| 31 | 64
| 32 | 28
| 33 | 35
| 34 | 30
| 35 | 25
| 36 | 18
| 37 | 91
| 38 | 90
| 39 | 125
| 40 | 124
| 41 | 166
| 42 | 184
| 43 | 106
| 44 | 34
| 45 | 49
| 46 | 37
| 47 | 33
| 48 | 19
| 49 | 129
| 50 | 127
| 51 | 161
| 52 | 196
| 53 | 208
| 54 | 226
| 55 | 154
| 56 | 46
| 57 | 86
| 58 | 51
| 59 | 75
| 60 | 21
| 61 | 171
| 62 | 201
| 63 | 198
| 64 | 203
| 65 | 215
| 66 | 227
| 67 | 191
| 68 | 83
| 69 | 122
| 70 | 87
| 71 | 111
| 72 | 63
| 73 | 177
| 74 | 207
| 75 | 205
| 76 | 217
| 77 | 223
| 78 | 229
| 79 | 193
| 80 | 157
| 81 | 158
| 82 | 159
| 83 | 153
| 84 | 147
| 85 | 183
| 86 | 219
| 87 | 212
| 88 | 16
| 89 | 233
| 90 | 235
| 91 | 237
| 92 | 239
| 93 | 241
| 94 | 244
| 95 | 247
| 96 | 250
| 97 | 254
| 98 | 231
| 99 | default
|===
+6 -20
View File
@@ -1409,26 +1409,12 @@ atrybutu.
Kody kolorów dla key[ctrl-c,c]:
[width="50%",cols="^1m,3,3",options="header"]
|===
| Kod | IRC | WeeChat (curses)
| 00 | white | white
| 01 | black | black
| 02 | dark blue | blue
| 03 | dark green | green
| 04 | light red | lightred
| 05 | dark red | red
| 06 | magenta | magenta
| 07 | orange | brown
| 08 | yellow | yellow
| 09 | light green | lightgreen
| 10 | cyan | cyan
| 11 | light cyan | lightcyan
| 12 | light blue | lightblue
| 13 | light magenta | lightmagenta
| 14 | gray | darkgray
| 15 | light gray | gray
|===
include::autogen/user/irc_colors.asciidoc[]
// TRANSLATION MISSING
[NOTE]
To show all available colors in your terminal, you can do `/color` then
key[alt-c] in WeeChat or run this command in terminal: `weechat --colors`.
Przykład: wyświetlenie "hello everybody!" z pogrubionym jasno niebieskim "hello"
i podkreślonym jasno czerwonym "everybody":