2020-05-09 14:42:57 +00:00
|
|
|
|
<!doctype html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
<meta charset="utf-8">
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
2023-12-11 07:23:07 +00:00
|
|
|
|
|
2024-04-01 13:51:55 +00:00
|
|
|
|
<link rel="stylesheet" href="../style.css#" type="text/css" />
|
2023-01-28 01:52:52 +00:00
|
|
|
|
<title>一键执行预定义命令</title>
|
2022-06-30 03:43:09 +00:00
|
|
|
|
<script type="text/javascript">
|
2022-07-12 02:24:02 +00:00
|
|
|
|
function findLang(){
|
2022-06-30 03:43:09 +00:00
|
|
|
|
let href = location.href;
|
|
|
|
|
for(let i=href.length-1;i>0;i--){
|
|
|
|
|
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
|
2022-07-12 02:24:02 +00:00
|
|
|
|
return i;
|
2022-06-30 03:43:09 +00:00
|
|
|
|
}
|
2022-07-12 02:24:02 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
function nav2(page){
|
|
|
|
|
let i = findLang();
|
|
|
|
|
location.href = location.href.substring(0,i+1)+page;
|
|
|
|
|
}
|
|
|
|
|
function nav2Lang(lang){
|
|
|
|
|
let i = findLang();
|
|
|
|
|
let href = location.href;
|
|
|
|
|
location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
|
2022-06-30 03:43:09 +00:00
|
|
|
|
}
|
|
|
|
|
</script>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<header class='header'>
|
2024-04-02 05:42:43 +00:00
|
|
|
|
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html#')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html#')">Tags</a>
|
2022-07-12 02:24:02 +00:00
|
|
|
|
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<nav>
|
|
|
|
|
</nav>
|
|
|
|
|
</header>
|
2020-08-29 00:42:46 +00:00
|
|
|
|
<br />
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<div class="container">
|
2023-01-28 01:52:52 +00:00
|
|
|
|
<h1 class="title">一键执行预定义命令
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<br>
|
|
|
|
|
<span class="subtitle"></span>
|
|
|
|
|
</h1>
|
|
|
|
|
<ul class="tags">
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2024-04-01 13:51:55 +00:00
|
|
|
|
<li><a href="../tags/termux/index.html#">termux</a> </li>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2024-04-01 13:51:55 +00:00
|
|
|
|
<li><a href="../tags/ssh/index.html#">ssh</a> </li>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2024-04-01 13:51:55 +00:00
|
|
|
|
<li><a href="../tags/%e5%89%aa%e8%b4%b4%e6%9d%bf/index.html#">剪贴板</a> </li>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
<p>技巧等级:中级 PC剪贴板(高级)</p>
|
2024-04-02 11:38:45 +00:00
|
|
|
|
<p><a href="../index.html#">uweb浏览器</a>支持一键执行任意预定义命令,这些命令可以与剪贴板交互,可以将结果(文本、图像、音视频)输出到浏览器窗口。</p>
|
|
|
|
|
<p>手机推荐安装uweb定制<a href="../gnuplot/index.html#">Termux</a>,否则能够执行的命令极其有限。</p>
|
2022-07-09 00:45:17 +00:00
|
|
|
|
<p>预定义命令保存在文件"default.cmds"中。重启浏览器,长按历史按钮,超微将弹出菜单供用户点击执行。</p>
|
2024-04-02 11:38:45 +00:00
|
|
|
|
<p>资深用户可能注意到文件名与<a href="../gnuplot/index.html#">default.acmd</a>类似。default.acmd中的命令适合以不同的参数反复执行;而default.cmds一般以单次执行为多。default.acmd结果会显示在浏览器当前窗口;而default.cmds中命令执行结果会显示在新窗口之中。这两个文件格式也完全相同,每行格式如下:<br>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
[命令名称]:[mimetype]:[命令代码]</p>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
<p>命令代码可以是任意命令,其中可以包含%c(当前网址cookie)、%s (地址栏输入)、 %t (当前窗口标题)、 %u (当前窗口url或文件路径)。执行时这些特殊标识将会被相应内容自动替换。</p>
|
2020-05-09 14:42:57 +00:00
|
|
|
|
<p>mimetype用来表示命令的输出类型。除了标准的mimetype之外,超微对此还作了扩充,便利与剪贴板交互。下面是扩充版的mimetype:<br>
|
|
|
|
|
"clip/clip" : 以剪贴板作为命令输入,输出结果复制到剪贴板。<br>
|
|
|
|
|
"/clip" : 输出结果复制到剪贴板。<br>
|
|
|
|
|
"clip/text/html" : 以剪贴板作为命令输入,输出结果mimetype类型为“text/html”。<br>
|
2020-06-23 06:31:35 +00:00
|
|
|
|
"termux/*": 在termux中执行命令。<br>
|
2024-04-02 11:38:45 +00:00
|
|
|
|
"/uweb": 输出结果作为<a href="../links/index.html#">链接</a>来处理。</p>
|
|
|
|
|
<p>下面是笔者使用的default.cmds配置(<a href="../textprocess/index.html#">命令具体解释</a>):</p>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
<pre>复制手机剪贴板至PC剪贴板:clip:ssh [user:password]@192.168.2.102 "DISPLAY=:0 xsel -i"
|
|
|
|
|
PC剪贴板至手机剪贴板:/clip:ssh [user:password]@192.168.2.102 "DISPLAY=:0 xsel -o"
|
2022-07-04 08:12:06 +00:00
|
|
|
|
</pre>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
|
|
|
|
</div>
|
2024-04-02 05:42:43 +00:00
|
|
|
|
<p>Last Modified: 2 April 2024<br>
|
|
|
|
|
add js function in README<br>
|
2023-03-07 02:07:05 +00:00
|
|
|
|
<pre></pre>
|
|
|
|
|
</p>
|
2024-03-21 01:04:37 +00:00
|
|
|
|
|
2023-05-06 01:56:44 +00:00
|
|
|
|
<script id='jsgiscus'
|
|
|
|
|
src='https://giscus.app/client.js'
|
|
|
|
|
data-repo="torappinfo/uweb"
|
|
|
|
|
data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
|
|
|
|
|
data-category="Announcements"
|
|
|
|
|
data-category-id="DIC_kwDOEgNLGc4CQjsh"
|
2023-05-06 02:49:29 +00:00
|
|
|
|
data-mapping="title"
|
2023-05-06 01:56:44 +00:00
|
|
|
|
data-strict="0"
|
|
|
|
|
data-reactions-enabled="1"
|
|
|
|
|
data-emit-metadata="0"
|
|
|
|
|
data-input-position="top"
|
|
|
|
|
data-theme="light"
|
|
|
|
|
data-lang="en"
|
|
|
|
|
data-loading="lazy"
|
2023-05-06 02:49:29 +00:00
|
|
|
|
crossorigin="anonymous" async>
|
2023-05-06 01:40:28 +00:00
|
|
|
|
</script>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
|
2020-05-09 14:42:57 +00:00
|
|
|
|
</body>
|
2020-04-29 08:37:43 +00:00
|
|
|
|
</html>
|