aboutsummaryrefslogtreecommitdiffstats
path: root/multi_requester.js
diff options
context:
space:
mode:
authorsuVene2008-12-08 14:53:50 +0000
committersuVene2008-12-08 14:53:50 +0000
commit4c838de4f764f905edad530bdc2d17068f73fff9 (patch)
treee266044a65d189016516138fea1fc941a7695272 /multi_requester.js
parent7d45465cc4ec56cc99bba7976cb4f428c333ba13 (diff)
downloadvimperator-plugins-4c838de4f764f905edad530bdc2d17068f73fff9.tar.bz2
*PLUGIN_INFO対応(@see http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/trunk/pluginManager.js)
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26143 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'multi_requester.js')
-rw-r--r--multi_requester.js141
1 files changed, 70 insertions, 71 deletions
diff --git a/multi_requester.js b/multi_requester.js
index 0f3833f..41e8610 100644
--- a/multi_requester.js
+++ b/multi_requester.js
@@ -1,75 +1,74 @@
-/**
- * ==VimperatorPlugin==
- * @name multi_requester.js
- * @description request, and the result is displayed to the buffer.
- * @description-ja リクエストの結果をバッファに出力する。
- * @author suVene suvene@zeromemory.info
- * @version 0.4.3
- * @minVersion 2.0pre
- * @maxVersion 2.0pre
- * Last Change: 08-Dec-2008.
- * ==/VimperatorPlugin==
- *
- * HEAD COMMENT {{{
- * Usage:
- * command[!] subcommand [ANY_TEXT]
- *
- * ! create new tab.
- * ANY_TEXT your input text
- *
- * :mr alc[,goo,any1,any2…] ANY_TEXT -> request by the input text, and display to the buffer.
- * :mr! goo[,any1,any2,…] {window.selection} -> request by the selected text, and display to the new tab.
- *
- * other siteinfo by wedata.
- * @see http://wedata.net/databases/Multi%20Requester/items
- *
- * CUSTOMIZE .vimperatorrc:
- *
- * [COMMAND](default [mr])
- * let g:multi_requester_command = "ANY1, ANY2, ……"
- * or
- * liberator.globalVariables.multi_requester_command = [ANY1, ANY2, ……];
- *
- * [SITEINFO]
- * ex.)
- * javascript <<EOM
- * liberator.globalVariables.multi_requester_siteinfo = [
- * {
- * map: ',me', // optional: keymap for this siteinfo call
- * bang: true, // optional:
- * args: 'any' // optional:
- * name: 'ex', // required: subcommand name
- * description: 'example', // required: commandline short help
- * url: 'http://example.com/?%s', // required: %s <-- replace string
- * xpath: '//*', // optional: default all
- * srcEncode: 'SHIFT_JIS', // optional: default UTF-8
- * urlEncode: 'SHIFT_JIS', // optional: default srcEncode
- * ignoreTags: 'img', // optional: default script, syntax 'tag1,tag2,……'
- * extractLink: '//xpath' // optional: extract permalink
- * },
- * ];
- * EOM
- *
- * [MAPPINGS]
- * ex.)
- * javascript <<EOM
- * liberator.globalVariables.multi_requester_mappings = [
- * [',ml', 'ex'], // == :mr ex
- * [',mg', 'goo', '!'], // == :mr! goo
- * [',ma', 'alc', , 'args'], // == :mr alc args
- * ];
- * EOM
- *
- * [OTHER OPTIONS]
- * let g:multi_requester_use_wedata = "false" // true by default
- *
- *
- * TODO:
- * - wedata local cache.
- * }}}
- */
+// PLUGIN_INFO//{{{
+var PLUGIN_INFO =
+<VimperatorPlugin>
+ <name>{NAME}</name>
+ <description>request, and the result is displayed to the buffer.</description>
+ <description lang="ja">リクエストの結果をバッファに出力する。</description>
+ <author mail="suvene@zeromemory.info" homepage="http://zeromemory.sblo.jp/">suVene</author>
+ <version>0.4.3</version>
+ <minVersion>2.0pre</minVersion>
+ <maxVersion>2.0pre</maxVersion>
+ <detail><![CDATA[
+== NEEDS LIBLARY ==
+_libly.js
+ @see http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/trunk/_libly.js
+== Usage ==
+command[!] subcommand [ANY_TEXT]
+- ! create new tab.
+- ANY_TEXT your input text
+
+ex.)
+:mr alc[,goo,any1,any2…] ANY_TEXT -> request by the input text, and display to the buffer.
+:mr! goo[,any1,any2,…] {window.selection} -> request by the selected text, and display to the new tab.
+
+== CUSTUMIZE .vimperatorrc ==
+== COMMAND(default [mr]) ==
+let g:multi_requester_command = "ANY1, ANY2, ……"
+or
+liberator.globalVariables.multi_requester_command = [ANY1, ANY2, ……];
+
+== SITEINFO ==
+ex.)
+javascript &lt;&lt;EOM
+liberator.globalVariables.multi_requester_siteinfo = [
+ {
+ map: ',me', // optional: keymap for this siteinfo call
+ bang: true, // optional:
+ args: 'any' // optional:
+ name: 'ex', // required: subcommand name
+ description: 'example', // required: commandline short help
+ url: 'http://example.com/?%s', // required: %s <-- replace string
+ xpath: '//*', // optional: default all
+ srcEncode: 'SHIFT_JIS', // optional: default UTF-8
+ urlEncode: 'SHIFT_JIS', // optional: default srcEncode
+ ignoreTags: 'img', // optional: default script, syntax 'tag1,tag2,……'
+ extractLink: '//xpath' // optional: extract permalink
+ },
+];
+EOM
+
+* other siteinfo by wedata.
+ @see http://wedata.net/databases/Multi%20Requester/items
+
+== MAPPINGS ==
+ex.)
+javascript <<EOM
+liberator.globalVariables.multi_requester_mappings = [
+ [',ml', 'ex'], // == :mr ex
+ [',mg', 'goo', '!'], // == :mr! goo
+ [',ma', 'alc', , 'args'], // == :mr alc args
+];
+EOM
+
+== OTHER OPTIONS ==
+let g:multi_requester_use_wedata = "false" // true by default
+
+== TODO ==
+* wedata local cache.
+ ]]></detail>
+</VimperatorPlugin>;
+//}}}
(function() {
-io.sourceFromRuntimePath(['libly.js']);
if (!liberator.plugins.libly) {
liberator.log('multi_requester: needs libly.js');
return;