summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-01-30 11:41:06 +0100
committerSébastien Helleu <flashcode@flashtux.org>2022-01-30 11:41:06 +0100
commit9259442dbfbb51695a7f9c427da589fc1f92420d (patch)
treea66f959ccf1bce41481dca238b24406fba52d4da /doc
parentbf3241208b553babdeb851d684060b81d30edc72 (diff)
downloadweechat-9259442dbfbb51695a7f9c427da589fc1f92420d.zip
core: add support of date and tags in messages displayed in buffers with free content, add function printf_y_date_tags (closes #1746)
Diffstat (limited to 'doc')
-rw-r--r--doc/de/weechat_scripting.de.adoc1
-rw-r--r--doc/en/weechat_plugin_api.en.adoc46
-rw-r--r--doc/en/weechat_scripting.en.adoc1
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc49
-rw-r--r--doc/fr/weechat_scripting.fr.adoc1
-rw-r--r--doc/it/weechat_plugin_api.it.adoc50
-rw-r--r--doc/it/weechat_scripting.it.adoc2
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc47
-rw-r--r--doc/ja/weechat_scripting.ja.adoc1
-rw-r--r--doc/pl/weechat_scripting.pl.adoc1
-rw-r--r--doc/sr/weechat_plugin_api.sr.adoc45
-rw-r--r--doc/sr/weechat_scripting.sr.adoc1
12 files changed, 245 insertions, 0 deletions
diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc
index b4f1bf245..6202b0af7 100644
--- a/doc/de/weechat_scripting.de.adoc
+++ b/doc/de/weechat_scripting.de.adoc
@@ -660,6 +660,7 @@ Liste der Skript API Funktionen:
print (für Python: prnt) +
print_date_tags (für Python: prnt_date_tags) +
print_y (für Python: prnt_y) +
+ print_y_date_tags (für Python: prnt_y_date_tags) +
log_print
| Hooks |
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index b6ed02676..a42ce5503 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -8637,6 +8637,52 @@ weechat.prnt_y("", 2, "My message on third line")
[NOTE]
Function is called "print_y" in scripts ("prnt_y" in Python).
+==== printf_y_date_tags
+
+_WeeChat ≥ 3.5._
+
+Display a message on a line of a buffer with free content, using a custom
+date and tags.
+
+Prototype:
+
+[source,c]
+----
+void weechat_printf_y_date_tags (struct t_gui_buffer *buffer, int y, time_t date,
+ const char *tags, const char *message, ...);
+----
+
+Arguments:
+
+* _buffer_: buffer pointer
+* _y_: line number (first line is 0); a negative value adds a line after last
+ line displayed: absolute value of _y_ is the number of lines after last line
+ (for example -1 is immediately after last line, -2 is 2 lines after last line)
+* _date_: date for message (0 means current date/time)
+* _tags_: comma separated list of tags (NULL means no tags)
+* _message_: message to display
+
+C example:
+
+[source,c]
+----
+weechat_printf_y_date_tags (buffer, 2, 0, "my_tag", "My message on third line with a tag");
+----
+
+Script (Python):
+
+[source,python]
+----
+# prototype
+def prnt_y_date_tags(buffer: str, y: int, date: int, tags: str, message: str) -> int: ...
+
+# example
+weechat.prnt_y_date_tags("", 2, 0, "my_tag", "My message on third line with a tag")
+----
+
+[NOTE]
+Function is called "print_y_date_tags" in scripts ("prnt_y_date_tags" in Python).
+
==== log_printf
Write a message in WeeChat log file (weechat.log).
diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc
index 8cea11500..78e1b5d46 100644
--- a/doc/en/weechat_scripting.en.adoc
+++ b/doc/en/weechat_scripting.en.adoc
@@ -644,6 +644,7 @@ List of functions in script API:
print (for python: prnt) +
print_date_tags (for python: prnt_date_tags) +
print_y (for python: prnt_y) +
+ print_y_date_tags (for python: prnt_y_date_tags) +
log_print
| hooks |
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index 9ecce83e6..81d6b9ad6 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -8773,6 +8773,55 @@ weechat.prnt_y("", 2, "Mon message sur la 3ème ligne")
[NOTE]
La fonction s'appelle "print_y" dans les scripts ("prnt_y" en Python).
+==== printf_y_date_tags
+
+_WeeChat ≥ 3.5._
+
+Afficher un message sur une ligne d'un tampon avec contenu libre, en utilisant
+une date et des étiquettes personnalisées.
+
+Prototype :
+
+[source,c]
+----
+void weechat_printf_y_date_tags (struct t_gui_buffer *buffer, int y, time_t date,
+ const char *tags, const char *message, ...);
+----
+
+Paramètres :
+
+* _buffer_ : pointeur vers le tampon
+* _y_ : numéro de ligne (la première ligne est 0); une valeur négative affiche
+ une ligne après la dernière ligne affichée : la valeur absolue de _y_ est le
+ nombre de lignes après la dernière ligne (par exemple -1 est immédiatement
+ après la dernière ligne, -2 est 2 lignes après la dernière ligne)
+* _date_ : date pour le message (0 signifie la date/heure courante)
+* _tags_ : liste d'étiquettes séparées par des virgules (NULL signifie aucune
+ étiquette)
+* _message_ : message à afficher
+
+Exemple en C :
+
+[source,c]
+----
+weechat_printf_y_date_tags (buffer, 2, 0, "mon_etiquette", "Mon message sur la 3ème ligne avec une étiquette");
+----
+
+Script (Python) :
+
+[source,python]
+----
+# prototype
+def prnt_y_date_tags(buffer: str, y: int, date: int, tags: str, message: str) -> int: ...
+
+# exemple
+weechat.prnt_y_date_tags("", 2, 0, "mon_etiquette", "Mon message sur la 3ème ligne avec une étiquette")
+----
+
+[NOTE]
+La fonction s'appelle "print_y_date_tags" dans les scripts ("prnt_y_date_tags"
+en Python).
+
==== log_printf
Écrire un message dans le fichier de log WeeChat (weechat.log).
diff --git a/doc/fr/weechat_scripting.fr.adoc b/doc/fr/weechat_scripting.fr.adoc
index 14f6f1833..c6e436c56 100644
--- a/doc/fr/weechat_scripting.fr.adoc
+++ b/doc/fr/weechat_scripting.fr.adoc
@@ -663,6 +663,7 @@ Liste des fonctions de l'API script :
print (pour python : prnt) +
print_date_tags (pour python : prnt_date_tags) +
print_y (pour python : prnt_y) +
+ print_y_date_tags (pour python : prnt_y_date_tags) +
log_print
| hooks |
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 1568bf06c..688d408bc 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -8910,6 +8910,56 @@ weechat.prnt_y("", 2, "Mio messaggio sulla terza riga")
[NOTE]
La funzione è chiamata "print_y" negli script ("prnt_y in Python).
+==== printf_y_date_tags
+
+_WeeChat ≥ 3.5._
+
+// TRANSLATION MISSING
+Display a message on a line of a buffer with free content, using a custom
+date and tags.
+
+Prototipo:
+
+[source,c]
+----
+void weechat_printf_y_date_tags (struct t_gui_buffer *buffer, int y, time_t date,
+ const char *tags, const char *message, ...);
+----
+
+Argomenti:
+
+* _buffer_: puntatore al buffer
+// TRANSLATION MISSING
+* _y_: numero di riga (la prima riga è 0); a negative value adds a line after
+ last line displayed: absolute value of _y_ is the number of lines after last
+ line (for example -1 is immediately after last line, -2 is 2 lines after last
+ line)
+* _date_: data per il messaggio (0 indica data/ora corrente)
+// TRANSLATION MISSING
+* _tags_: lista di tag separati da virgole (NULL means no tags)
+* _message_: messaggio da visualizzare
+
+Esempio in C:
+
+[source,c]
+----
+weechat_printf_y_date_tags (buffer, 2, 0, "my_tag", "My message on third line with a tag");
+----
+
+Script (Python):
+
+[source,python]
+----
+# prototipo
+def prnt_y_date_tags(buffer: str, y: int, date: int, tags: str, message: str) -> int: ...
+
+# esempio
+weechat.prnt_y_date_tags("", 2, 0, "my_tag", "My message on third line with a tag")
+----
+
+[NOTE]
+La funzione è chiamata "print_y_date_tags" negli script ("prnt_y_date_tags in Python).
+
==== log_printf
Scrive un messaggio nel file di log di WeeChat (weechat.log).
diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc
index 68c9976c0..f54dcdaef 100644
--- a/doc/it/weechat_scripting.it.adoc
+++ b/doc/it/weechat_scripting.it.adoc
@@ -676,6 +676,8 @@ Elenco di funzioni nelle API per gli script:
print_date_tags (for python: prnt_date_tags) +
// TRANSLATION MISSING
print_y (for python: prnt_y) +
+// TRANSLATION MISSING
+ print_y_date_tags (for python: prnt_y_date_tags) +
log_print
| hook |
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 5c455d9d9..b18f938d1 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -8659,6 +8659,53 @@ weechat.prnt_y("", 2, "My message on third line")
[NOTE]
この関数をスクリプトの中で実行するには "print_y" (Python の場合は "prnt_y") と書きます。
+==== printf_y_date_tags
+
+_WeeChat ≥ 3.5._
+
+// TRANSLATION MISSING
+Display a message on a line of a buffer with free content, using a custom
+date and tags.
+
+プロトタイプ:
+
+[source,c]
+----
+void weechat_printf_y_date_tags (struct t_gui_buffer *buffer, int y, time_t date,
+ const char *tags, const char *message, ...);
+----
+
+引数:
+
+* _buffer_: バッファへのポインタ
+* _y_: 行番号 (1 行目は 0); 負数の場合は表示された最後の行の後に行を追加する:
+ _y_ の絶対値で最後の行の後に追加する行数を指定 (例えば
+ -1 は最後の行のすぐ後、-2 は 最後の行の 2 行後)
+* _date_: メッセージの日付 (0 は現在の日付/時間を意味する)
+* _tags_: タグのコンマ区切りリスト (タグを指定しない場合は NULL)
+* _message_: 表示するメッセージ
+
+C 言語での使用例:
+
+[source,c]
+----
+weechat_printf_y_date_tags (buffer, 2, 0, "my_tag", "My message on third line with a tag");
+----
+
+スクリプト (Python) での使用例:
+
+[source,python]
+----
+# プロトタイプ
+def prnt_y_date_tags(buffer: str, y: int, date: int, tags: str, message: str) -> int: ...
+
+# 例
+weechat.prnt_y_date_tags("", 2, 0, "my_tag", "My message on third line with a tag")
+----
+
+[NOTE]
+この関数をスクリプトの中で実行するには "print_y_date_tags" (Python の場合は "prnt_y_date_tags") と書きます。
+
==== log_printf
WeeChat ログファイル (weechat.log) にメッセージを書き込む。
diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc
index bc3987b45..7a0ffcf0c 100644
--- a/doc/ja/weechat_scripting.ja.adoc
+++ b/doc/ja/weechat_scripting.ja.adoc
@@ -665,6 +665,7 @@ link:weechat_plugin_api.ja.html[WeeChat プラグイン API リファレンス]
print (python では prnt) +
print_date_tags (python では prnt_date_tags) +
print_y (python では prnt_y) +
+ print_y_date_tags (python では prnt_y_date_tags) +
log_print
| フック |
diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc
index ec7668082..98b33d4db 100644
--- a/doc/pl/weechat_scripting.pl.adoc
+++ b/doc/pl/weechat_scripting.pl.adoc
@@ -649,6 +649,7 @@ Lista funkcji w API skryptów:
print (dla pythona: prnt) +
print_date_tags (dla pythona: prnt_date_tags) +
print_y (dla pythona: prnt_y) +
+ print_y_date_tags (dla pythona: prnt_y_date_tags) +
log_print
| hooks |
diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc
index 04e144c1b..471eccfe6 100644
--- a/doc/sr/weechat_plugin_api.sr.adoc
+++ b/doc/sr/weechat_plugin_api.sr.adoc
@@ -8377,6 +8377,51 @@ weechat.prnt_y("", 2, "My message on third line")
[NOTE]
У скриптама се функција зове „print_y” („prnt_y” у језику Python).
+==== printf_y_date_tags
+
+_WeeChat ≥ 3.5._
+
+// TRANSLATION MISSING
+Display a message on a line of a buffer with free content, using a custom
+date and tags.
+
+Прототип:
+
+[source,c]
+----
+void weechat_printf_y_date_tags (struct t_gui_buffer *buffer, int y, time_t date,
+ const char *tags, const char *message, ...);
+----
+
+Аргументи:
+
+* _buffer_: показивач на бафер
+* _y_: број линије (прва линија је 0); негативна вредност додаје линију иза последње приказане линије: апсолутна вредност _y_ је број линија након последње линије (на пример -1 је непосредно након последње линије, -2 је 2 линије након последње линије)
+* _date_: датум за поруку (0 значи текући датум/време)
+* _tags_: листа ознака раздвојених запетама (NULL значи да нема ознака)
+* _message_: порука која треба да се прикаже
+
+C пример:
+
+[source,c]
+----
+weechat_printf_y_date_tags (buffer, 2, 0, "my_tag", "My message on third line with a tag");
+----
+
+Скрипта (Python):
+
+[source,python]
+----
+# прототип
+def prnt_y_date_tags(buffer: str, y: int, date: int, tags: str, message: str) -> int: ...
+
+# пример
+weechat.prnt_y_date_tags("", 2, 0, "my_tag", "My message on third line with a tag")
+----
+
+[NOTE]
+У скриптама се функција зове „print_y_date_tags” („prnt_y_date_tags” у језику Python).
+
==== log_printf
Уписује поруку у WeeChat лог фајл (weechat.log).
diff --git a/doc/sr/weechat_scripting.sr.adoc b/doc/sr/weechat_scripting.sr.adoc
index a0a97f744..3f8f4ade0 100644
--- a/doc/sr/weechat_scripting.sr.adoc
+++ b/doc/sr/weechat_scripting.sr.adoc
@@ -602,6 +602,7 @@ weechat_hook_timer(1000, 0, 1, $timer_cb, 'test');
print (за python: prnt) +
print_date_tags (за python: prnt_date_tags) +
print_y (за python: prnt_y) +
+ print_y_date_tags (за python: prnt_y_date_tags) +
log_print
| куке |