mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
doc/api: add priority in function config_new (issue #1872)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file is auto-generated by script docgen.py.
|
||||
// DO NOT EDIT BY HAND!
|
||||
//
|
||||
|
||||
// tag::config_priority[]
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | File | Priority
|
||||
| 1 | sec.conf | 120000
|
||||
| 2 | weechat.conf | 110000
|
||||
| 3 | plugins.conf | 100000
|
||||
| 4 | charset.conf | 16000
|
||||
| 5 | logger.conf | 15000
|
||||
| 6 | exec.conf | 14000
|
||||
| 7 | trigger.conf | 13000
|
||||
| 8 | spell.conf | 12000
|
||||
| 9 | alias.conf | 11000
|
||||
| 10 | buflist.conf | 10000
|
||||
| 11 | fifo.conf | 9000
|
||||
| 12 | typing.conf | 8000
|
||||
| 13 | xfer.conf | 7000
|
||||
| 14 | irc.conf | 6000
|
||||
| 15 | relay.conf | 5000
|
||||
| 16 | guile.conf | 4070
|
||||
| 17 | javascript.conf | 4060
|
||||
| 18 | lua.conf | 4050
|
||||
| 19 | perl.conf | 4040
|
||||
| 20 | php.conf | 4030
|
||||
| 21 | python.conf | 4020
|
||||
| 22 | ruby.conf | 4010
|
||||
| 23 | tcl.conf | 4000
|
||||
| 24 | script.conf | 3000
|
||||
| 25 | fset.conf | 2000
|
||||
|===
|
||||
// end::config_priority[]
|
||||
@@ -707,6 +707,7 @@ _count_ (integer) +
|
||||
_last_config_file_ +
|
||||
|
||||
| _plugin_ (pointer, hdata: "plugin") +
|
||||
_priority_ (integer) +
|
||||
_name_ (string) +
|
||||
_filename_ (string) +
|
||||
_file_ (pointer) +
|
||||
|
||||
@@ -4,26 +4,30 @@
|
||||
//
|
||||
|
||||
// tag::plugins_priority[]
|
||||
. charset (16000)
|
||||
. logger (15000)
|
||||
. exec (14000)
|
||||
. trigger (13000)
|
||||
. spell (12000)
|
||||
. alias (11000)
|
||||
. buflist (10000)
|
||||
. fifo (9000)
|
||||
. typing (8000)
|
||||
. xfer (7000)
|
||||
. irc (6000)
|
||||
. relay (5000)
|
||||
. guile (4070)
|
||||
. javascript (4060)
|
||||
. lua (4050)
|
||||
. perl (4040)
|
||||
. php (4030)
|
||||
. python (4020)
|
||||
. ruby (4010)
|
||||
. tcl (4000)
|
||||
. script (3000)
|
||||
. fset (2000)
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | Erweiterung | Priority
|
||||
| 1 | charset | 16000
|
||||
| 2 | logger | 15000
|
||||
| 3 | exec | 14000
|
||||
| 4 | trigger | 13000
|
||||
| 5 | spell | 12000
|
||||
| 6 | alias | 11000
|
||||
| 7 | buflist | 10000
|
||||
| 8 | fifo | 9000
|
||||
| 9 | typing | 8000
|
||||
| 10 | xfer | 7000
|
||||
| 11 | irc | 6000
|
||||
| 12 | relay | 5000
|
||||
| 13 | guile | 4070
|
||||
| 14 | javascript | 4060
|
||||
| 15 | lua | 4050
|
||||
| 16 | perl | 4040
|
||||
| 17 | php | 4030
|
||||
| 18 | python | 4020
|
||||
| 19 | ruby | 4010
|
||||
| 20 | tcl | 4000
|
||||
| 21 | script | 3000
|
||||
| 22 | fset | 2000
|
||||
|===
|
||||
// end::plugins_priority[]
|
||||
|
||||
+42
-3
@@ -29,7 +29,8 @@ Documentation generator for WeeChat: build include files with:
|
||||
- hdata
|
||||
- completions
|
||||
- URL options
|
||||
- plugins priority.
|
||||
- plugins priority
|
||||
- config files priority.
|
||||
|
||||
Instructions to build config files yourself in WeeChat directories
|
||||
(replace "path" with the path to the docgen.py script in WeeChat repository):
|
||||
@@ -452,6 +453,25 @@ class WeechatDoc(): # pylint: disable=too-few-public-methods
|
||||
weechat.infolist_free(infolist)
|
||||
return plugins_priority
|
||||
|
||||
@staticmethod
|
||||
def _read_api_config_priority():
|
||||
"""
|
||||
Get priority of default configuration files as a dictionary.
|
||||
"""
|
||||
config_priority = {}
|
||||
ptr_hdata = weechat.hdata_get('config_file')
|
||||
ptr_config = weechat.hdata_get_list(ptr_hdata, 'config_files')
|
||||
while ptr_config:
|
||||
name = weechat.hdata_string(ptr_hdata, ptr_config, 'name')
|
||||
config_name = f'{name}.conf'
|
||||
priority = weechat.hdata_integer(ptr_hdata, ptr_config, 'priority')
|
||||
if priority in config_priority:
|
||||
config_priority[priority].append(config_name)
|
||||
else:
|
||||
config_priority[priority] = [config_name]
|
||||
ptr_config = weechat.hdata_move(ptr_hdata, ptr_config, 1)
|
||||
return config_priority
|
||||
|
||||
|
||||
class AutogenDoc():
|
||||
"""A class to write auto-generated doc files."""
|
||||
@@ -805,11 +825,30 @@ class AutogenDoc():
|
||||
"""Write plugins priority."""
|
||||
self.write()
|
||||
self.write('// tag::plugins_priority[]')
|
||||
for priority in sorted(plugins_priority, reverse=True):
|
||||
self.write('[width="30%",cols="1,3,2",options="header"]')
|
||||
self.write('|===')
|
||||
self.write('| %s | %s | %s',
|
||||
_('Rank'), _('Plugin'), _('Priority'))
|
||||
for i, priority in enumerate(sorted(plugins_priority, reverse=True)):
|
||||
plugins = ', '.join(sorted(plugins_priority[priority]))
|
||||
self.write('. %s (%s)', escape(plugins), priority)
|
||||
self.write('| %d | %s | %d', i + 1, escape(plugins), priority)
|
||||
self.write('|===')
|
||||
self.write('// end::plugins_priority[]')
|
||||
|
||||
def _write_api_config_priority(self, config_priority):
|
||||
"""Write configuration files priority."""
|
||||
self.write()
|
||||
self.write('// tag::config_priority[]')
|
||||
self.write('[width="30%",cols="1,3,2",options="header"]')
|
||||
self.write('|===')
|
||||
self.write('| %s | %s | %s',
|
||||
_('Rank'), _('File'), _('Priority'))
|
||||
for i, priority in enumerate(sorted(config_priority, reverse=True)):
|
||||
configs = ', '.join(sorted(config_priority[priority]))
|
||||
self.write('| %d | %s | %d', i + 1, escape(configs), priority)
|
||||
self.write('|===')
|
||||
self.write('// end::config_priority[]')
|
||||
|
||||
|
||||
def docgen_cmd_cb(data, buf, args):
|
||||
"""Callback for /docgen command."""
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file is auto-generated by script docgen.py.
|
||||
// DO NOT EDIT BY HAND!
|
||||
//
|
||||
|
||||
// tag::config_priority[]
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | File | Priority
|
||||
| 1 | sec.conf | 120000
|
||||
| 2 | weechat.conf | 110000
|
||||
| 3 | plugins.conf | 100000
|
||||
| 4 | charset.conf | 16000
|
||||
| 5 | logger.conf | 15000
|
||||
| 6 | exec.conf | 14000
|
||||
| 7 | trigger.conf | 13000
|
||||
| 8 | spell.conf | 12000
|
||||
| 9 | alias.conf | 11000
|
||||
| 10 | buflist.conf | 10000
|
||||
| 11 | fifo.conf | 9000
|
||||
| 12 | typing.conf | 8000
|
||||
| 13 | xfer.conf | 7000
|
||||
| 14 | irc.conf | 6000
|
||||
| 15 | relay.conf | 5000
|
||||
| 16 | guile.conf | 4070
|
||||
| 17 | javascript.conf | 4060
|
||||
| 18 | lua.conf | 4050
|
||||
| 19 | perl.conf | 4040
|
||||
| 20 | php.conf | 4030
|
||||
| 21 | python.conf | 4020
|
||||
| 22 | ruby.conf | 4010
|
||||
| 23 | tcl.conf | 4000
|
||||
| 24 | script.conf | 3000
|
||||
| 25 | fset.conf | 2000
|
||||
|===
|
||||
// end::config_priority[]
|
||||
@@ -707,6 +707,7 @@ _count_ (integer) +
|
||||
_last_config_file_ +
|
||||
|
||||
| _plugin_ (pointer, hdata: "plugin") +
|
||||
_priority_ (integer) +
|
||||
_name_ (string) +
|
||||
_filename_ (string) +
|
||||
_file_ (pointer) +
|
||||
|
||||
@@ -4,26 +4,30 @@
|
||||
//
|
||||
|
||||
// tag::plugins_priority[]
|
||||
. charset (16000)
|
||||
. logger (15000)
|
||||
. exec (14000)
|
||||
. trigger (13000)
|
||||
. spell (12000)
|
||||
. alias (11000)
|
||||
. buflist (10000)
|
||||
. fifo (9000)
|
||||
. typing (8000)
|
||||
. xfer (7000)
|
||||
. irc (6000)
|
||||
. relay (5000)
|
||||
. guile (4070)
|
||||
. javascript (4060)
|
||||
. lua (4050)
|
||||
. perl (4040)
|
||||
. php (4030)
|
||||
. python (4020)
|
||||
. ruby (4010)
|
||||
. tcl (4000)
|
||||
. script (3000)
|
||||
. fset (2000)
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | Plugin | Priority
|
||||
| 1 | charset | 16000
|
||||
| 2 | logger | 15000
|
||||
| 3 | exec | 14000
|
||||
| 4 | trigger | 13000
|
||||
| 5 | spell | 12000
|
||||
| 6 | alias | 11000
|
||||
| 7 | buflist | 10000
|
||||
| 8 | fifo | 9000
|
||||
| 9 | typing | 8000
|
||||
| 10 | xfer | 7000
|
||||
| 11 | irc | 6000
|
||||
| 12 | relay | 5000
|
||||
| 13 | guile | 4070
|
||||
| 14 | javascript | 4060
|
||||
| 15 | lua | 4050
|
||||
| 16 | perl | 4040
|
||||
| 17 | php | 4030
|
||||
| 18 | python | 4020
|
||||
| 19 | ruby | 4010
|
||||
| 20 | tcl | 4000
|
||||
| 21 | script | 3000
|
||||
| 22 | fset | 2000
|
||||
|===
|
||||
// end::plugins_priority[]
|
||||
|
||||
@@ -6263,7 +6263,7 @@ Functions for configuration files.
|
||||
|
||||
==== config_new
|
||||
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 3.9._
|
||||
|
||||
Create a new configuration file.
|
||||
|
||||
@@ -6281,7 +6281,11 @@ struct t_config_file *weechat_config_new (const char *name,
|
||||
|
||||
Arguments:
|
||||
|
||||
* _name_: name of configuration file (without path or extension)
|
||||
* _name_: name of configuration file (without path or extension); a priority
|
||||
is allowed before the name, with format `nnn|name` where `nnn` is non-negative
|
||||
integer with priority; default priority is 1000; files are sorted by priority
|
||||
from higher to lower when running command `/reload`
|
||||
(see priority of configuration files below)
|
||||
* _callback_reload_: function called when configuration file is reloaded with
|
||||
`/reload` (optional, can be NULL, see below), arguments and return value:
|
||||
** _const void *pointer_: pointer
|
||||
@@ -6317,6 +6321,10 @@ You should call this function only after adding some sections (with
|
||||
<<_config_new_section,config_new_section>>) and options (with
|
||||
<<_config_new_option,config_new_option>>).
|
||||
|
||||
Priority of default configuration files:
|
||||
|
||||
include::includes/autogen_api_config_priority.en.adoc[tag=config_priority]
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file is auto-generated by script docgen.py.
|
||||
// DO NOT EDIT BY HAND!
|
||||
//
|
||||
|
||||
// tag::config_priority[]
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | File | Priority
|
||||
| 1 | sec.conf | 120000
|
||||
| 2 | weechat.conf | 110000
|
||||
| 3 | plugins.conf | 100000
|
||||
| 4 | charset.conf | 16000
|
||||
| 5 | logger.conf | 15000
|
||||
| 6 | exec.conf | 14000
|
||||
| 7 | trigger.conf | 13000
|
||||
| 8 | spell.conf | 12000
|
||||
| 9 | alias.conf | 11000
|
||||
| 10 | buflist.conf | 10000
|
||||
| 11 | fifo.conf | 9000
|
||||
| 12 | typing.conf | 8000
|
||||
| 13 | xfer.conf | 7000
|
||||
| 14 | irc.conf | 6000
|
||||
| 15 | relay.conf | 5000
|
||||
| 16 | guile.conf | 4070
|
||||
| 17 | javascript.conf | 4060
|
||||
| 18 | lua.conf | 4050
|
||||
| 19 | perl.conf | 4040
|
||||
| 20 | php.conf | 4030
|
||||
| 21 | python.conf | 4020
|
||||
| 22 | ruby.conf | 4010
|
||||
| 23 | tcl.conf | 4000
|
||||
| 24 | script.conf | 3000
|
||||
| 25 | fset.conf | 2000
|
||||
|===
|
||||
// end::config_priority[]
|
||||
@@ -707,6 +707,7 @@ _count_ (integer) +
|
||||
_last_config_file_ +
|
||||
|
||||
| _plugin_ (pointer, hdata: "plugin") +
|
||||
_priority_ (integer) +
|
||||
_name_ (string) +
|
||||
_filename_ (string) +
|
||||
_file_ (pointer) +
|
||||
|
||||
@@ -4,26 +4,30 @@
|
||||
//
|
||||
|
||||
// tag::plugins_priority[]
|
||||
. charset (16000)
|
||||
. logger (15000)
|
||||
. exec (14000)
|
||||
. trigger (13000)
|
||||
. spell (12000)
|
||||
. alias (11000)
|
||||
. buflist (10000)
|
||||
. fifo (9000)
|
||||
. typing (8000)
|
||||
. xfer (7000)
|
||||
. irc (6000)
|
||||
. relay (5000)
|
||||
. guile (4070)
|
||||
. javascript (4060)
|
||||
. lua (4050)
|
||||
. perl (4040)
|
||||
. php (4030)
|
||||
. python (4020)
|
||||
. ruby (4010)
|
||||
. tcl (4000)
|
||||
. script (3000)
|
||||
. fset (2000)
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | Extension | Priority
|
||||
| 1 | charset | 16000
|
||||
| 2 | logger | 15000
|
||||
| 3 | exec | 14000
|
||||
| 4 | trigger | 13000
|
||||
| 5 | spell | 12000
|
||||
| 6 | alias | 11000
|
||||
| 7 | buflist | 10000
|
||||
| 8 | fifo | 9000
|
||||
| 9 | typing | 8000
|
||||
| 10 | xfer | 7000
|
||||
| 11 | irc | 6000
|
||||
| 12 | relay | 5000
|
||||
| 13 | guile | 4070
|
||||
| 14 | javascript | 4060
|
||||
| 15 | lua | 4050
|
||||
| 16 | perl | 4040
|
||||
| 17 | php | 4030
|
||||
| 18 | python | 4020
|
||||
| 19 | ruby | 4010
|
||||
| 20 | tcl | 4000
|
||||
| 21 | script | 3000
|
||||
| 22 | fset | 2000
|
||||
|===
|
||||
// end::plugins_priority[]
|
||||
|
||||
@@ -6360,7 +6360,7 @@ Fonctions pour les fichiers de configuration.
|
||||
|
||||
==== config_new
|
||||
|
||||
_Mis à jour dans la 1.5._
|
||||
_Mis à jour dans la 1.5, 3.9._
|
||||
|
||||
Créer un nouveau fichier de configuration.
|
||||
|
||||
@@ -6378,7 +6378,12 @@ struct t_config_file *weechat_config_new (const char *name,
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _name_ : nom du nouveau fichier de configuration (sans chemin ou extension)
|
||||
* _name_ : nom du nouveau fichier de configuration (sans chemin ou extension) ;
|
||||
une priorité est autorisée avant le nom, avec le format `nnn|nom` où `nnn` est
|
||||
un entier positif avec la priorité ; la priorité par défaut est 1000 ; les
|
||||
fichiers de configuration sont triés par priorité de la plus haute à la plus
|
||||
basse lorsque la commande `/reload` est exécutée
|
||||
(voir la priorité des fichiers de configuration ci-dessous)
|
||||
* _callback_reload_ : fonction appelée quand le fichier de configuration est
|
||||
rechargé avec `/reload` (optionnel, peut être NULL, voir ci-dessous),
|
||||
paramètres et valeur de retour :
|
||||
@@ -6419,6 +6424,10 @@ Vous ne devriez appeler cette fonction qu'après avoir créé les sections (avec
|
||||
<<_config_new_section,config_new_section>>) et les options (avec
|
||||
<<_config_new_option,config_new_option>>).
|
||||
|
||||
Priorité des fichiers de configuration par défaut :
|
||||
|
||||
include::includes/autogen_api_config_priority.fr.adoc[tag=config_priority]
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file is auto-generated by script docgen.py.
|
||||
// DO NOT EDIT BY HAND!
|
||||
//
|
||||
|
||||
// tag::config_priority[]
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | File | Priority
|
||||
| 1 | sec.conf | 120000
|
||||
| 2 | weechat.conf | 110000
|
||||
| 3 | plugins.conf | 100000
|
||||
| 4 | charset.conf | 16000
|
||||
| 5 | logger.conf | 15000
|
||||
| 6 | exec.conf | 14000
|
||||
| 7 | trigger.conf | 13000
|
||||
| 8 | spell.conf | 12000
|
||||
| 9 | alias.conf | 11000
|
||||
| 10 | buflist.conf | 10000
|
||||
| 11 | fifo.conf | 9000
|
||||
| 12 | typing.conf | 8000
|
||||
| 13 | xfer.conf | 7000
|
||||
| 14 | irc.conf | 6000
|
||||
| 15 | relay.conf | 5000
|
||||
| 16 | guile.conf | 4070
|
||||
| 17 | javascript.conf | 4060
|
||||
| 18 | lua.conf | 4050
|
||||
| 19 | perl.conf | 4040
|
||||
| 20 | php.conf | 4030
|
||||
| 21 | python.conf | 4020
|
||||
| 22 | ruby.conf | 4010
|
||||
| 23 | tcl.conf | 4000
|
||||
| 24 | script.conf | 3000
|
||||
| 25 | fset.conf | 2000
|
||||
|===
|
||||
// end::config_priority[]
|
||||
@@ -707,6 +707,7 @@ _count_ (integer) +
|
||||
_last_config_file_ +
|
||||
|
||||
| _plugin_ (pointer, hdata: "plugin") +
|
||||
_priority_ (integer) +
|
||||
_name_ (string) +
|
||||
_filename_ (string) +
|
||||
_file_ (pointer) +
|
||||
|
||||
@@ -4,26 +4,30 @@
|
||||
//
|
||||
|
||||
// tag::plugins_priority[]
|
||||
. charset (16000)
|
||||
. logger (15000)
|
||||
. exec (14000)
|
||||
. trigger (13000)
|
||||
. spell (12000)
|
||||
. alias (11000)
|
||||
. buflist (10000)
|
||||
. fifo (9000)
|
||||
. typing (8000)
|
||||
. xfer (7000)
|
||||
. irc (6000)
|
||||
. relay (5000)
|
||||
. guile (4070)
|
||||
. javascript (4060)
|
||||
. lua (4050)
|
||||
. perl (4040)
|
||||
. php (4030)
|
||||
. python (4020)
|
||||
. ruby (4010)
|
||||
. tcl (4000)
|
||||
. script (3000)
|
||||
. fset (2000)
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | Plugin | Priority
|
||||
| 1 | charset | 16000
|
||||
| 2 | logger | 15000
|
||||
| 3 | exec | 14000
|
||||
| 4 | trigger | 13000
|
||||
| 5 | spell | 12000
|
||||
| 6 | alias | 11000
|
||||
| 7 | buflist | 10000
|
||||
| 8 | fifo | 9000
|
||||
| 9 | typing | 8000
|
||||
| 10 | xfer | 7000
|
||||
| 11 | irc | 6000
|
||||
| 12 | relay | 5000
|
||||
| 13 | guile | 4070
|
||||
| 14 | javascript | 4060
|
||||
| 15 | lua | 4050
|
||||
| 16 | perl | 4040
|
||||
| 17 | php | 4030
|
||||
| 18 | python | 4020
|
||||
| 19 | ruby | 4010
|
||||
| 20 | tcl | 4000
|
||||
| 21 | script | 3000
|
||||
| 22 | fset | 2000
|
||||
|===
|
||||
// end::plugins_priority[]
|
||||
|
||||
@@ -6531,7 +6531,7 @@ Funzioni per i file di configurazione.
|
||||
==== config_new
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 1.5._
|
||||
_Updated in 1.5, 3.9._
|
||||
|
||||
Crea un nuovo file di configurazione.
|
||||
|
||||
@@ -6549,7 +6549,12 @@ struct t_config_file *weechat_config_new (const char *name,
|
||||
|
||||
Argomenti:
|
||||
|
||||
* _name_: nome del file di configurazione (senza percorso o estensione)
|
||||
// TRANSLATION MISSING
|
||||
* _name_: nome del file di configurazione (senza percorso o estensione); a priority
|
||||
is allowed before the name, with format `nnn|name` where `nnn` is non-negative
|
||||
integer with priority; default priority is 1000; files are sorted by priority
|
||||
from higher to lower when running command `/reload`
|
||||
(see priority of configuration files below)
|
||||
// TRANSLATION MISSING
|
||||
* _callback_reload_: funzione chiamata quando il file di configurazione viene
|
||||
ricaricato con `/reload` (opzionale, può essere NULL, see below), argomenti e valore
|
||||
@@ -6590,6 +6595,11 @@ Si dovrebbe chiamare questa funzione solo dopo aver aggiunto alcune sezioni
|
||||
(con <<_config_new_section,config_new_section>>) e le
|
||||
opzioni (con <<_config_new_option,config_new_option>>).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Priority of default configuration files:
|
||||
|
||||
include::includes/autogen_api_config_priority.it.adoc[tag=config_priority]
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,c]
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file is auto-generated by script docgen.py.
|
||||
// DO NOT EDIT BY HAND!
|
||||
//
|
||||
|
||||
// tag::config_priority[]
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | File | Priority
|
||||
| 1 | sec.conf | 120000
|
||||
| 2 | weechat.conf | 110000
|
||||
| 3 | plugins.conf | 100000
|
||||
| 4 | charset.conf | 16000
|
||||
| 5 | logger.conf | 15000
|
||||
| 6 | exec.conf | 14000
|
||||
| 7 | trigger.conf | 13000
|
||||
| 8 | spell.conf | 12000
|
||||
| 9 | alias.conf | 11000
|
||||
| 10 | buflist.conf | 10000
|
||||
| 11 | fifo.conf | 9000
|
||||
| 12 | typing.conf | 8000
|
||||
| 13 | xfer.conf | 7000
|
||||
| 14 | irc.conf | 6000
|
||||
| 15 | relay.conf | 5000
|
||||
| 16 | guile.conf | 4070
|
||||
| 17 | javascript.conf | 4060
|
||||
| 18 | lua.conf | 4050
|
||||
| 19 | perl.conf | 4040
|
||||
| 20 | php.conf | 4030
|
||||
| 21 | python.conf | 4020
|
||||
| 22 | ruby.conf | 4010
|
||||
| 23 | tcl.conf | 4000
|
||||
| 24 | script.conf | 3000
|
||||
| 25 | fset.conf | 2000
|
||||
|===
|
||||
// end::config_priority[]
|
||||
@@ -707,6 +707,7 @@ _count_ (integer) +
|
||||
_last_config_file_ +
|
||||
|
||||
| _plugin_ (pointer, hdata: "plugin") +
|
||||
_priority_ (integer) +
|
||||
_name_ (string) +
|
||||
_filename_ (string) +
|
||||
_file_ (pointer) +
|
||||
|
||||
@@ -4,26 +4,30 @@
|
||||
//
|
||||
|
||||
// tag::plugins_priority[]
|
||||
. charset (16000)
|
||||
. logger (15000)
|
||||
. exec (14000)
|
||||
. trigger (13000)
|
||||
. spell (12000)
|
||||
. alias (11000)
|
||||
. buflist (10000)
|
||||
. fifo (9000)
|
||||
. typing (8000)
|
||||
. xfer (7000)
|
||||
. irc (6000)
|
||||
. relay (5000)
|
||||
. guile (4070)
|
||||
. javascript (4060)
|
||||
. lua (4050)
|
||||
. perl (4040)
|
||||
. php (4030)
|
||||
. python (4020)
|
||||
. ruby (4010)
|
||||
. tcl (4000)
|
||||
. script (3000)
|
||||
. fset (2000)
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | プラグイン | Priority
|
||||
| 1 | charset | 16000
|
||||
| 2 | logger | 15000
|
||||
| 3 | exec | 14000
|
||||
| 4 | trigger | 13000
|
||||
| 5 | spell | 12000
|
||||
| 6 | alias | 11000
|
||||
| 7 | buflist | 10000
|
||||
| 8 | fifo | 9000
|
||||
| 9 | typing | 8000
|
||||
| 10 | xfer | 7000
|
||||
| 11 | irc | 6000
|
||||
| 12 | relay | 5000
|
||||
| 13 | guile | 4070
|
||||
| 14 | javascript | 4060
|
||||
| 15 | lua | 4050
|
||||
| 16 | perl | 4040
|
||||
| 17 | php | 4030
|
||||
| 18 | python | 4020
|
||||
| 19 | ruby | 4010
|
||||
| 20 | tcl | 4000
|
||||
| 21 | script | 3000
|
||||
| 22 | fset | 2000
|
||||
|===
|
||||
// end::plugins_priority[]
|
||||
|
||||
@@ -6343,7 +6343,7 @@ weechat_hashtable_free (hashtable);
|
||||
|
||||
==== config_new
|
||||
|
||||
_WeeChat バージョン 1.5 で更新。_
|
||||
_WeeChat バージョン 1.5, 3.9 で更新。_
|
||||
|
||||
新しい設定ファイルを作成。
|
||||
|
||||
@@ -6361,7 +6361,12 @@ struct t_config_file *weechat_config_new (const char *name,
|
||||
|
||||
引数:
|
||||
|
||||
* _name_: 設定ファイルの名前 (パスと拡張子は不要)
|
||||
// TRANSLATION MISSING
|
||||
* _name_: 設定ファイルの名前 (パスと拡張子は不要); a priority
|
||||
is allowed before the name, with format `nnn|name` where `nnn` is non-negative
|
||||
integer with priority; default priority is 1000; files are sorted by priority
|
||||
from higher to lower when running command `/reload`
|
||||
(see priority of configuration files below)
|
||||
* _callback_reload_: `/reload` で設定ファイルをリロードする際に呼び出すコールバック関数
|
||||
(任意、NULL でも可、下の説明を参照)、引数と戻り値:
|
||||
** _const void *pointer_: ポインタ
|
||||
@@ -6397,6 +6402,11 @@ struct t_config_file *weechat_config_new (const char *name,
|
||||
(<<_config_new_section,config_new_section>> を使って) セクションもしくは
|
||||
(<<_config_new_option,config_new_option>> を使って) オプションを追加した後だけです。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Priority of default configuration files:
|
||||
|
||||
include::includes/autogen_api_config_priority.ja.adoc[tag=config_priority]
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,c]
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file is auto-generated by script docgen.py.
|
||||
// DO NOT EDIT BY HAND!
|
||||
//
|
||||
|
||||
// tag::config_priority[]
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | File | Priority
|
||||
| 1 | sec.conf | 120000
|
||||
| 2 | weechat.conf | 110000
|
||||
| 3 | plugins.conf | 100000
|
||||
| 4 | charset.conf | 16000
|
||||
| 5 | logger.conf | 15000
|
||||
| 6 | exec.conf | 14000
|
||||
| 7 | trigger.conf | 13000
|
||||
| 8 | spell.conf | 12000
|
||||
| 9 | alias.conf | 11000
|
||||
| 10 | buflist.conf | 10000
|
||||
| 11 | fifo.conf | 9000
|
||||
| 12 | typing.conf | 8000
|
||||
| 13 | xfer.conf | 7000
|
||||
| 14 | irc.conf | 6000
|
||||
| 15 | relay.conf | 5000
|
||||
| 16 | guile.conf | 4070
|
||||
| 17 | javascript.conf | 4060
|
||||
| 18 | lua.conf | 4050
|
||||
| 19 | perl.conf | 4040
|
||||
| 20 | php.conf | 4030
|
||||
| 21 | python.conf | 4020
|
||||
| 22 | ruby.conf | 4010
|
||||
| 23 | tcl.conf | 4000
|
||||
| 24 | script.conf | 3000
|
||||
| 25 | fset.conf | 2000
|
||||
|===
|
||||
// end::config_priority[]
|
||||
@@ -707,6 +707,7 @@ _count_ (integer) +
|
||||
_last_config_file_ +
|
||||
|
||||
| _plugin_ (pointer, hdata: "plugin") +
|
||||
_priority_ (integer) +
|
||||
_name_ (string) +
|
||||
_filename_ (string) +
|
||||
_file_ (pointer) +
|
||||
|
||||
@@ -4,26 +4,30 @@
|
||||
//
|
||||
|
||||
// tag::plugins_priority[]
|
||||
. charset (16000)
|
||||
. logger (15000)
|
||||
. exec (14000)
|
||||
. trigger (13000)
|
||||
. spell (12000)
|
||||
. alias (11000)
|
||||
. buflist (10000)
|
||||
. fifo (9000)
|
||||
. typing (8000)
|
||||
. xfer (7000)
|
||||
. irc (6000)
|
||||
. relay (5000)
|
||||
. guile (4070)
|
||||
. javascript (4060)
|
||||
. lua (4050)
|
||||
. perl (4040)
|
||||
. php (4030)
|
||||
. python (4020)
|
||||
. ruby (4010)
|
||||
. tcl (4000)
|
||||
. script (3000)
|
||||
. fset (2000)
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | Wtyczka | Priority
|
||||
| 1 | charset | 16000
|
||||
| 2 | logger | 15000
|
||||
| 3 | exec | 14000
|
||||
| 4 | trigger | 13000
|
||||
| 5 | spell | 12000
|
||||
| 6 | alias | 11000
|
||||
| 7 | buflist | 10000
|
||||
| 8 | fifo | 9000
|
||||
| 9 | typing | 8000
|
||||
| 10 | xfer | 7000
|
||||
| 11 | irc | 6000
|
||||
| 12 | relay | 5000
|
||||
| 13 | guile | 4070
|
||||
| 14 | javascript | 4060
|
||||
| 15 | lua | 4050
|
||||
| 16 | perl | 4040
|
||||
| 17 | php | 4030
|
||||
| 18 | python | 4020
|
||||
| 19 | ruby | 4010
|
||||
| 20 | tcl | 4000
|
||||
| 21 | script | 3000
|
||||
| 22 | fset | 2000
|
||||
|===
|
||||
// end::plugins_priority[]
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// This file is auto-generated by script docgen.py.
|
||||
// DO NOT EDIT BY HAND!
|
||||
//
|
||||
|
||||
// tag::config_priority[]
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | File | Priority
|
||||
| 1 | sec.conf | 120000
|
||||
| 2 | weechat.conf | 110000
|
||||
| 3 | plugins.conf | 100000
|
||||
| 4 | charset.conf | 16000
|
||||
| 5 | logger.conf | 15000
|
||||
| 6 | exec.conf | 14000
|
||||
| 7 | trigger.conf | 13000
|
||||
| 8 | spell.conf | 12000
|
||||
| 9 | alias.conf | 11000
|
||||
| 10 | buflist.conf | 10000
|
||||
| 11 | fifo.conf | 9000
|
||||
| 12 | typing.conf | 8000
|
||||
| 13 | xfer.conf | 7000
|
||||
| 14 | irc.conf | 6000
|
||||
| 15 | relay.conf | 5000
|
||||
| 16 | guile.conf | 4070
|
||||
| 17 | javascript.conf | 4060
|
||||
| 18 | lua.conf | 4050
|
||||
| 19 | perl.conf | 4040
|
||||
| 20 | php.conf | 4030
|
||||
| 21 | python.conf | 4020
|
||||
| 22 | ruby.conf | 4010
|
||||
| 23 | tcl.conf | 4000
|
||||
| 24 | script.conf | 3000
|
||||
| 25 | fset.conf | 2000
|
||||
|===
|
||||
// end::config_priority[]
|
||||
@@ -707,6 +707,7 @@ _count_ (integer) +
|
||||
_last_config_file_ +
|
||||
|
||||
| _plugin_ (pointer, hdata: "plugin") +
|
||||
_priority_ (integer) +
|
||||
_name_ (string) +
|
||||
_filename_ (string) +
|
||||
_file_ (pointer) +
|
||||
|
||||
@@ -4,26 +4,30 @@
|
||||
//
|
||||
|
||||
// tag::plugins_priority[]
|
||||
. charset (16000)
|
||||
. logger (15000)
|
||||
. exec (14000)
|
||||
. trigger (13000)
|
||||
. spell (12000)
|
||||
. alias (11000)
|
||||
. buflist (10000)
|
||||
. fifo (9000)
|
||||
. typing (8000)
|
||||
. xfer (7000)
|
||||
. irc (6000)
|
||||
. relay (5000)
|
||||
. guile (4070)
|
||||
. javascript (4060)
|
||||
. lua (4050)
|
||||
. perl (4040)
|
||||
. php (4030)
|
||||
. python (4020)
|
||||
. ruby (4010)
|
||||
. tcl (4000)
|
||||
. script (3000)
|
||||
. fset (2000)
|
||||
[width="30%",cols="1,3,2",options="header"]
|
||||
|===
|
||||
| Rank | Додатак | Priority
|
||||
| 1 | charset | 16000
|
||||
| 2 | logger | 15000
|
||||
| 3 | exec | 14000
|
||||
| 4 | trigger | 13000
|
||||
| 5 | spell | 12000
|
||||
| 6 | alias | 11000
|
||||
| 7 | buflist | 10000
|
||||
| 8 | fifo | 9000
|
||||
| 9 | typing | 8000
|
||||
| 10 | xfer | 7000
|
||||
| 11 | irc | 6000
|
||||
| 12 | relay | 5000
|
||||
| 13 | guile | 4070
|
||||
| 14 | javascript | 4060
|
||||
| 15 | lua | 4050
|
||||
| 16 | perl | 4040
|
||||
| 17 | php | 4030
|
||||
| 18 | python | 4020
|
||||
| 19 | ruby | 4010
|
||||
| 20 | tcl | 4000
|
||||
| 21 | script | 3000
|
||||
| 22 | fset | 2000
|
||||
|===
|
||||
// end::plugins_priority[]
|
||||
|
||||
@@ -6153,7 +6153,7 @@ weechat_hashtable_free (hashtable);
|
||||
|
||||
==== config_new
|
||||
|
||||
_Ажурирано у верзији 1.5._
|
||||
_Ажурирано у верзији 1.5, 3.9._
|
||||
|
||||
Креира нови конфигурациони фајл.
|
||||
|
||||
@@ -6171,7 +6171,12 @@ struct t_config_file *weechat_config_new (const char *name,
|
||||
|
||||
Аргументи:
|
||||
|
||||
* _name_: име конфигурационог фајла (без путање или екстензије)
|
||||
// TRANSLATION MISSING
|
||||
* _name_: име конфигурационог фајла (без путање или екстензије); a priority
|
||||
is allowed before the name, with format `nnn|name` where `nnn` is non-negative
|
||||
integer with priority; default priority is 1000; files are sorted by priority
|
||||
from higher to lower when running command `/reload`
|
||||
(see priority of configuration files below)
|
||||
* _callback_reload_: функција која се позива када се командом `/reload` поново учита конфигурациони фајл (није обавезна, може да буде NULL, погледајте испод), аргументи и повратна вредност су:
|
||||
** _const void *pointer_: показивач
|
||||
** _void *data_: показивач
|
||||
@@ -6196,6 +6201,11 @@ struct t_config_file *weechat_config_new (const char *name,
|
||||
[NOTE]
|
||||
Ова функција НЕ креира фајл на диску. Фајл ће се креирати позивом функције <<_config_write,config_write>>. Ово функцију би требало да позовете само након додавања неких одељака (са <<_config_new_section,config_new_section>>) и опција (са <<_config_new_option,config_new_option>>).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Priority of default configuration files:
|
||||
|
||||
include::includes/autogen_api_config_priority.sr.adoc[tag=config_priority]
|
||||
|
||||
C пример:
|
||||
|
||||
[source,c]
|
||||
|
||||
Reference in New Issue
Block a user