script: add option "search" for command /script (completion with script tags)

This commit is contained in:
Sebastien Helleu 2012-08-18 09:01:26 +02:00
parent 5ae6f133d6
commit 13b1d64aa1
25 changed files with 323 additions and 143 deletions

View File

@ -62,6 +62,8 @@
| script | script_scripts_installed | list of scripts installed (from repository)
| script | script_tags | tags of scripts in repository
| tcl | tcl_script | Liste der Skripten
| weechat | bars_names | Namen der Infobars

View File

@ -2,6 +2,7 @@
[command]*`script`* WeeChat scripts manager::
........................................
/script list
search <text>
show <script>
load|unload|reload <script> [<script>...]
install|remove|hold <script> [<script>...]
@ -9,6 +10,7 @@
update
list: list loaded scripts (all languages)
search: search scripts by tags or text and display result on scripts buffer
show: show detailed info about a script
load: load script(s)
unload: unload script(s)
@ -47,6 +49,7 @@ Input allowed on script buffer:
* remove filter
Examples:
/script search url
/script install iset.pl buffers.pl
/script remove iset.pl
/script hold urlserver.py

View File

@ -62,6 +62,8 @@
| script | script_scripts_installed | list of scripts installed (from repository)
| script | script_tags | tags of scripts in repository
| tcl | tcl_script | list of scripts
| weechat | bars_names | names of bars

View File

@ -2,6 +2,7 @@
[command]*`script`* WeeChat scripts manager::
........................................
/script list
search <text>
show <script>
load|unload|reload <script> [<script>...]
install|remove|hold <script> [<script>...]
@ -9,6 +10,7 @@
update
list: list loaded scripts (all languages)
search: search scripts by tags or text and display result on scripts buffer
show: show detailed info about a script
load: load script(s)
unload: unload script(s)
@ -47,6 +49,7 @@ Input allowed on script buffer:
* remove filter
Examples:
/script search url
/script install iset.pl buffers.pl
/script remove iset.pl
/script hold urlserver.py

View File

@ -62,6 +62,8 @@
| script | script_scripts_installed | liste des scripts installés (du repository)
| script | script_tags | étiquettes des scripts dans le repository
| tcl | tcl_script | liste des scripts
| weechat | bars_names | noms des barres

View File

@ -2,6 +2,7 @@
[command]*`script`* Gestionnaire de scripts WeeChat::
........................................
/script list
search <texte>
show <script>
load|unload|reload <script> [<script>...]
install|remove|hold <script> [<script>...]
@ -9,6 +10,7 @@
update
list: lister les scripts chargés (tous les langages)
search: chercher des scripts par étiquettes ou texte et afficher le résultat sur le tampon des scripts
show: afficher des infos détaillées sur le script
load: charger un ou plusieurs scripts
unload: décharger un ou plusieurs scripts
@ -47,6 +49,7 @@ Entrée autorisée sur le tampon des scripts :
* supprimer le filtre
Exemples:
/script search url
/script install iset.pl buffers.pl
/script remove iset.pl
/script hold urlserver.py

View File

@ -62,6 +62,8 @@
| script | script_scripts_installed | list of scripts installed (from repository)
| script | script_tags | tags of scripts in repository
| tcl | tcl_script | elenco degli script
| weechat | bars_names | nomi delle barre

View File

@ -2,6 +2,7 @@
[command]*`script`* WeeChat scripts manager::
........................................
/script list
search <text>
show <script>
load|unload|reload <script> [<script>...]
install|remove|hold <script> [<script>...]
@ -9,6 +10,7 @@
update
list: list loaded scripts (all languages)
search: search scripts by tags or text and display result on scripts buffer
show: show detailed info about a script
load: load script(s)
unload: unload script(s)
@ -47,6 +49,7 @@ Input allowed on script buffer:
* remove filter
Examples:
/script search url
/script install iset.pl buffers.pl
/script remove iset.pl
/script hold urlserver.py

View File

@ -62,6 +62,8 @@
| script | script_scripts_installed | list of scripts installed (from repository)
| script | script_tags | tags of scripts in repository
| tcl | tcl_script | スクリプトのリスト
| weechat | bars_names | バーの名前

View File

@ -2,6 +2,7 @@
[command]*`script`* WeeChat scripts manager::
........................................
/script list
search <text>
show <script>
load|unload|reload <script> [<script>...]
install|remove|hold <script> [<script>...]
@ -9,6 +10,7 @@
update
list: list loaded scripts (all languages)
search: search scripts by tags or text and display result on scripts buffer
show: show detailed info about a script
load: load script(s)
unload: unload script(s)
@ -47,6 +49,7 @@ Input allowed on script buffer:
* remove filter
Examples:
/script search url
/script install iset.pl buffers.pl
/script remove iset.pl
/script hold urlserver.py

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:01+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -8322,12 +8322,15 @@ msgid "WeeChat scripts manager"
msgstr "stránka WeeChat"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8369,6 +8372,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8386,6 +8390,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "seznam skriptů"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:01+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@ -8896,12 +8896,15 @@ msgid "WeeChat scripts manager"
msgstr "WeeChat Seite"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8943,6 +8946,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8960,6 +8964,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "Liste der Skripten"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:01+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -8595,12 +8595,15 @@ msgid "WeeChat scripts manager"
msgstr "sitio web de WeeChat"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8642,6 +8645,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8659,6 +8663,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "lista de scripts"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"PO-Revision-Date: 2012-08-17 08:07+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-18 08:57+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -8670,14 +8670,18 @@ msgid "WeeChat scripts manager"
msgstr "Gestionnaire de scripts WeeChat"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <texte> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8719,6 +8723,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8726,6 +8731,8 @@ msgid ""
" /script upgrade"
msgstr ""
" list: lister les scripts chargés (tous les langages)\n"
" search: chercher des scripts par étiquettes ou texte et afficher le "
"résultat sur le tampon des scripts\n"
" show: afficher des infos détaillées sur le script\n"
" load: charger un ou plusieurs scripts\n"
" unload: décharger un ou plusieurs scripts\n"
@ -8768,6 +8775,7 @@ msgstr ""
" * supprimer le filtre\n"
"\n"
"Exemples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8783,6 +8791,9 @@ msgstr "liste des scripts installés (du repository)"
msgid "files in script directories"
msgstr "fichiers dans les répertoires de script"
msgid "tags of scripts in repository"
msgstr "étiquettes des scripts dans le repository"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:01+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -7803,12 +7803,15 @@ msgid "WeeChat scripts manager"
msgstr "WeeChat szlogen"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -7850,6 +7853,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -7867,6 +7871,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "Aliaszok listája:\n"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:01+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -8585,12 +8585,15 @@ msgid "WeeChat scripts manager"
msgstr "sito di WeeChat"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8632,6 +8635,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8649,6 +8653,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "elenco degli script"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:01+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@ -8384,12 +8384,15 @@ msgid "WeeChat scripts manager"
msgstr "WeeChat サイト"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8431,6 +8434,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8448,6 +8452,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "スクリプトのリスト"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:01+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -8518,12 +8518,15 @@ msgid "WeeChat scripts manager"
msgstr "Strona WeeChat"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8565,6 +8568,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8582,6 +8586,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "lista skryptów"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:02+0200\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -7953,12 +7953,15 @@ msgid "WeeChat scripts manager"
msgstr "site do WeeChat"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -8000,6 +8003,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -8017,6 +8021,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "list de scripts"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.9-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: 2012-08-16 12:02+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -7826,12 +7826,15 @@ msgid "WeeChat scripts manager"
msgstr "слоган WeeChat"
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -7873,6 +7876,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -7890,6 +7894,10 @@ msgstr ""
msgid "files in script directories"
msgstr ""
#, fuzzy
msgid "tags of scripts in repository"
msgstr "Список сокращений:\n"
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2012-08-17 08:43+0200\n"
"POT-Creation-Date: 2012-08-18 08:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -6879,12 +6879,15 @@ msgid "WeeChat scripts manager"
msgstr ""
msgid ""
"list || show <script> || load|unload|reload <script> [<script>...] || "
"install|remove|hold <script> [<script>...] || upgrade || update"
"list || search <text> || show <script> || load|unload|reload <script> "
"[<script>...] || install|remove|hold <script> [<script>...] || upgrade || "
"update"
msgstr ""
msgid ""
" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and display result on scripts "
"buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -6926,6 +6929,7 @@ msgid ""
" * remove filter\n"
"\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
@ -6942,6 +6946,9 @@ msgstr ""
msgid "files in script directories"
msgstr ""
msgid "tags of scripts in repository"
msgstr ""
msgid ""
"format of columns displayed in script buffer: following column identifiers "
"are replaced by their value: %a=author, %d=description, %D=date added, "

View File

@ -102,6 +102,16 @@ script_command_script (void *data, struct t_gui_buffer *buffer, int argc,
return WEECHAT_RC_OK;
}
if (weechat_strcasecmp (argv[1], "search") == 0)
{
if (repo_scripts)
script_repo_filter_scripts ((argc > 2) ? argv_eol[2] : NULL);
else
script_repo_set_filter ((argc > 2) ? argv_eol[2] : NULL);
script_action_schedule ("buffer", 1, 0);
return WEECHAT_RC_OK;
}
if (weechat_strcasecmp (argv[1], "list") == 0)
{
script_action_schedule ("list", 1, 0);
@ -214,11 +224,13 @@ script_command_init ()
{
weechat_hook_command ("script",
N_("WeeChat scripts manager"),
N_("list || show <script>"
N_("list || search <text> || show <script>"
" || load|unload|reload <script> [<script>...]"
" || install|remove|hold <script> [<script>...]"
" || upgrade || update"),
N_(" list: list loaded scripts (all languages)\n"
" search: search scripts by tags or text and "
"display result on scripts buffer\n"
" show: show detailed info about a script\n"
" load: load script(s)\n"
" unload: unload script(s)\n"
@ -259,12 +271,14 @@ script_command_init ()
"scripts (description, tags, ...)\n"
" * remove filter\n\n"
"Examples:\n"
" /script search url\n"
" /script install iset.pl buffers.pl\n"
" /script remove iset.pl\n"
" /script hold urlserver.py\n"
" /script reload urlserver\n"
" /script upgrade"),
"list"
" || search %(script_tags)"
" || show %(script_scripts)"
" || load %(script_files)|%*"
" || unload %(python_script)|%(perl_script)|"

View File

@ -173,6 +173,48 @@ script_completion_scripts_files_cb (void *data, const char *completion_item,
return WEECHAT_RC_OK;
}
/*
* script_completion_tags_cb: callback for completion with tags from scripts in
* repository
*/
int
script_completion_tags_cb (void *data, const char *completion_item,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
struct t_repo_script *ptr_script;
char **list_tags;
int num_tags, i;
/* make C compiler happy */
(void) data;
(void) completion_item;
(void) buffer;
for (ptr_script = repo_scripts; ptr_script;
ptr_script = ptr_script->next_script)
{
if (ptr_script->tags)
{
list_tags = weechat_string_split (ptr_script->tags, ",", 0, 0,
&num_tags);
if (list_tags)
{
for (i = 0; i < num_tags; i++)
{
weechat_hook_completion_list_add (completion,
list_tags[i],
0, WEECHAT_LIST_POS_SORT);
}
weechat_string_free_split (list_tags);
}
}
}
return WEECHAT_RC_OK;
}
/*
* script_completion_init: init completion for script plugin
*/
@ -189,4 +231,7 @@ script_completion_init ()
weechat_hook_completion ("script_files",
N_("files in script directories"),
&script_completion_scripts_files_cb, NULL);
weechat_hook_completion ("script_tags",
N_("tags of scripts in repository"),
&script_completion_tags_cb, NULL);
}

View File

@ -727,6 +727,115 @@ script_repo_update_status_all ()
}
}
/*
* script_repo_set_filter: set filter for scripts
*/
void
script_repo_set_filter (const char *filter)
{
if (script_repo_filter)
free (script_repo_filter);
script_repo_filter = (filter) ? strdup (filter) : NULL;
}
/*
* script_repo_match_filter: return 1 if script is matching filter string,
* otherwise 0
*/
int
script_repo_match_filter (struct t_repo_script *script)
{
char **words, **tags;
int num_words, num_tags, has_tag, match, i, j;
if (!script_repo_filter || strcmp (script_repo_filter, "*") == 0)
return 1;
words = weechat_string_split (script_repo_filter, " ", 0, 0, &num_words);
tags = weechat_string_split ((script->tags) ? script->tags : "", ",", 0, 0,
&num_tags);
if (words)
{
for (i = 0; i < num_words; i++)
{
has_tag = 0;
if (tags)
{
for (j = 0; j < num_tags; j++)
{
if (weechat_strcasecmp (tags[j], words[i]) == 0)
{
has_tag = 1;
break;
}
}
}
if (!has_tag)
{
match = 0;
if (script->name_with_extension
&& weechat_strcasestr (script->name_with_extension, words[i]))
match = 1;
if (!match && script->description
&& weechat_strcasestr (script->description, words[i]))
match = 1;
if (!match && script->license
&& weechat_strcasestr (script->license, words[i]))
match = 1;
if (!match && script->author
&& weechat_strcasestr (script->author, words[i]))
match = 1;
if (!match)
{
weechat_string_free_split (words);
weechat_string_free_split (tags);
return 0;
}
}
}
}
if (words)
weechat_string_free_split (words);
if (tags)
weechat_string_free_split (tags);
return 1;
}
/*
* script_repo_filter_scripts: filter scripts (search string in
* name/description/tags) and mark scripts found as
* "displayed" (0 in displayed for non-matching
* scripts)
*/
void
script_repo_filter_scripts (const char *search)
{
struct t_repo_script *ptr_script;
script_repo_set_filter (search);
script_repo_count_displayed = 0;
for (ptr_script = repo_scripts; ptr_script;
ptr_script = ptr_script->next_script)
{
ptr_script->displayed = (script_repo_match_filter (ptr_script));
if (ptr_script->displayed)
script_repo_count_displayed++;
}
script_buffer_refresh (1);
}
/*
* script_repo_file_exists: return 1 if repository file (plugins.xml.gz) exists
* otherwise 0
@ -839,12 +948,6 @@ script_repo_file_read (int quiet)
else
weechat_hashtable_remove_all (script_repo_max_length_field);
if (script_repo_filter)
{
free (script_repo_filter);
script_repo_filter = NULL;
}
version = weechat_info_get ("version", NULL);
version_number = weechat_util_version_number (version);
@ -965,6 +1068,7 @@ script_repo_file_read (int quiet)
script_extension[script->language]);
}
script_repo_update_status (script);
script->displayed = (script_repo_match_filter (script));
script_repo_add (script);
script_ok = 1;
}
@ -1202,105 +1306,6 @@ script_repo_file_update (int quiet)
free (filename);
}
/*
* script_repo_match_search: return 1 if script is matching search string,
* otherwise 0
*/
int
script_repo_match_search (struct t_repo_script *script, const char *search)
{
char **words, **tags;
int num_words, num_tags, has_tag, match, i, j;
if (strcmp (search, "*") == 0)
return 1;
words = weechat_string_split (search, " ", 0, 0, &num_words);
tags = weechat_string_split ((script->tags) ? script->tags : "", ",", 0, 0,
&num_tags);
if (words)
{
for (i = 0; i < num_words; i++)
{
has_tag = 0;
if (tags)
{
for (j = 0; j < num_tags; j++)
{
if (weechat_strcasecmp (tags[j], words[i]) == 0)
{
has_tag = 1;
break;
}
}
}
if (!has_tag)
{
match = 0;
if (script->name_with_extension
&& weechat_strcasestr (script->name_with_extension, words[i]))
match = 1;
if (!match && script->description
&& weechat_strcasestr (script->description, words[i]))
match = 1;
if (!match && script->license
&& weechat_strcasestr (script->license, words[i]))
match = 1;
if (!match && script->author
&& weechat_strcasestr (script->author, words[i]))
match = 1;
if (!match)
{
weechat_string_free_split (words);
weechat_string_free_split (tags);
return 0;
}
}
}
}
if (words)
weechat_string_free_split (words);
if (tags)
weechat_string_free_split (tags);
return 1;
}
/*
* script_repo_filter_scripts: filter scripts (search string in
* name/description/tags) and mark scripts found as
* "displayed" (0 in displayed for non-matching
* scripts)
*/
void
script_repo_filter_scripts (const char *search)
{
struct t_repo_script *ptr_script;
if (script_repo_filter)
free (script_repo_filter);
script_repo_filter = strdup (search);
script_repo_count_displayed = 0;
for (ptr_script = repo_scripts; ptr_script;
ptr_script = ptr_script->next_script)
{
ptr_script->displayed = (script_repo_match_search (ptr_script, search));
if (ptr_script->displayed)
script_repo_count_displayed++;
}
script_buffer_refresh (1);
}
/*
* script_repo_hdata_script_cb: return hdata for script
*/

View File

@ -70,11 +70,12 @@ extern const char *script_repo_get_status_for_display (struct t_repo_script *scr
extern void script_repo_remove_all ();
extern void script_repo_update_status (struct t_repo_script *script);
extern void script_repo_update_status_all ();
extern void script_repo_set_filter (const char *filter);
extern void script_repo_filter_scripts (const char *search);
extern int script_repo_file_exists ();
extern int script_repo_file_is_uptodate ();
extern int script_repo_file_read (int quiet);
extern void script_repo_file_update (int quiet);
extern void script_repo_filter_scripts (const char *search);
extern struct t_hdata *script_repo_hdata_script_cb (void *data,
const char *hdata_name);
extern int script_repo_add_to_infolist (struct t_infolist *infolist,