|
|
|
@ -6,14 +6,38 @@
|
|
|
|
|
<description>Recent content in ssh on </description>
|
|
|
|
|
<generator>Hugo -- gohugo.io</generator>
|
|
|
|
|
<language>en-us</language>
|
|
|
|
|
<lastBuildDate>Tue, 10 Nov 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://jamesfengcao.gitee.io/uwebzh/tags/ssh/index.xml" rel="self" type="application/rss+xml" />
|
|
|
|
|
<lastBuildDate>Sat, 20 Jan 2018 00:00:00 +0000</lastBuildDate><atom:link href="https://jamesfengcao.gitee.io/uwebzh/tags/ssh/index.xml" rel="self" type="application/rss+xml" />
|
|
|
|
|
<item>
|
|
|
|
|
<title>一键执行任意预定义命令(附手机PC剪贴板互通)</title>
|
|
|
|
|
<link>https://jamesfengcao.gitee.io/uwebzh/cmd/</link>
|
|
|
|
|
<pubDate>Sat, 20 Jan 2018 00:00:00 +0000</pubDate>
|
|
|
|
|
|
|
|
|
|
<guid>https://jamesfengcao.gitee.io/uwebzh/cmd/</guid>
|
|
|
|
|
<description>技巧等级:中级 PC剪贴板(高级)
|
|
|
|
|
uweb浏览器支持一键执行任意预定义命令,这些命令可以与剪贴板交互,可以将结果(文本、图像、音视频)输出到浏览器窗口。
|
|
|
|
|
手机推荐安装uweb定制Termux,否则能够执行的命令极其有限。
|
|
|
|
|
预定义命令保存在文件&quot;/sdcard/uweb/default.cmds&quot;中。重启浏览器,长按历史按钮,超微将弹出菜单供用户点击执行。
|
|
|
|
|
资深用户可能注意到文件名与default.acmd类似。default.acmd中的命令适合以不同的参数反复执行;而default.cmds一般以单次执行为多。default.acmd结果会显示在浏览器当前窗口;而default.cmds中命令执行结果会显示在新窗口之中。这两个文件格式也完全相同,每行格式如下:
|
|
|
|
|
[命令名称]:[mimetype]:[命令代码]
|
|
|
|
|
命令代码可以是任意命令,其中可以包含%c(当前网址cookie)、%s (地址栏输入)、 %t (当前窗口标题)、 %u (当前窗口url或文件路径)。执行时这些特殊标识将会被相应内容自动替换。
|
|
|
|
|
mimetype用来表示命令的输出类型。除了标准的mimetype之外,超微对此还作了扩充,便利与剪贴板交互。下面是扩充版的mimetype:
|
|
|
|
|
&quot;clip/clip&quot; : 以剪贴板作为命令输入,输出结果复制到剪贴板。
|
|
|
|
|
&quot;/clip&quot; : 输出结果复制到剪贴板。
|
|
|
|
|
&quot;clip/text/html&quot; : 以剪贴板作为命令输入,输出结果mimetype类型为“text/html”。
|
|
|
|
|
&quot;termux/*&quot;: 在termux中执行命令。
|
|
|
|
|
&quot;uweb&quot;: 输出结果作为链接来处理。
|
|
|
|
|
下面是笔者使用的default.cmds配置(命令具体解释):
|
|
|
|
|
复制手机剪贴板至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" </description>
|
|
|
|
|
</item>
|
|
|
|
|
|
|
|
|
|
<item>
|
|
|
|
|
<title>操作选中(富)文本/元素</title>
|
|
|
|
|
<link>https://jamesfengcao.gitee.io/uwebzh/pccopy/</link>
|
|
|
|
|
<pubDate>Tue, 10 Nov 2020 00:00:00 +0000</pubDate>
|
|
|
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
|
|
|
|
|
|
<guid>https://jamesfengcao.gitee.io/uwebzh/pccopy/</guid>
|
|
|
|
|
<description>技巧等级:笔记(中级) PC剪贴板(高级)
|
|
|
|
|
<description>点击安装&quot;保存文本&quot;等
|
|
|
|
|
重启浏览器,长按“链接”按钮,将弹出菜单。若用户当前窗口并无选中文本,则选取整个页面作相应操作,否则以选中文本为准。
|
|
|
|
|
配置文件&quot;/sdcard/uweb/default.select&quot;定义了超微浏览器对选中(富)文本/元素进行的操作。没有任何选中元素则以整个网页为操作对象。每行格式如下:
|
|
|
|
|
[菜单名]:[mimetype]:[命令行]
|
|
|
|
|
选中(富)文本作为命令行的标准输入,而标准输出根据mimetype进行相应处理。
|
|
|
|
@ -22,7 +46,6 @@ html/text/html: 选中富文本为html格式, 输出mimetype为text/html。
|
|
|
|
|
/uweb: 选中文本为txt格式, 输出mimetype为特殊扩充uweb,超微将把输出作为链接来处理。
|
|
|
|
|
/termux: 命令运行结果将作为termux下命令运行。
|
|
|
|
|
checked.js: 运行配置目录下checked.js,其返回值作为命令行标准输入。对任何目录型(以“/”结尾)文件url,后面可附&quot;?&lt;文件后缀&gt;&quot;。譬如&quot;file:///sdcard/?.png&quot;会列举出&quot;/sdcard&quot;目录下所有.png文件。此时选择选定文件,则可利用checked.js复制文件至PC。(参看下面具体配置)
|
|
|
|
|
点击安装&quot;保存文本&quot;等
|
|
|
|
|
配置/sdcard/uweb/default.select如下:
|
|
|
|
|
复制文本到地址栏:uweb:echo i:15`cat`
|
|
|
|
|
笔记::(cat;echo;echo;)&gt;&gt;notes.txt
|
|
|
|
@ -33,7 +56,6 @@ checked.js: 运行配置目录下checked.js,其返回值作为命令行标准
|
|
|
|
|
复制文件至PC:checked.js:while read fname;do scp $fname [user:password]@192.168.2.102:Downloads/.; done
|
|
|
|
|
如使用剪贴板功能手机需安装uweb定制Termux,并在termux下安装openssl。
|
|
|
|
|
此处假定远程PC的IP地址为192.168.2.102,PC已经开通了ssh服务。建议用户配置ssh服务为免密码登录,此时用户无需将密码写入文件default.select。用户PC上安装有xsel剪贴板工具。使用其它工具请酌情修改。
|
|
|
|
|
重启浏览器,长按“链接”按钮,将弹出菜单。若用户当前窗口并无选中文本,则选取整个页面作相应操作,否则以选中文本为准。
|
|
|
|
|
采用以上配置,笔记将储存在/sdcard/uweb目录下文件note.txt或note.html中(富文本)。命名笔记储存文件则由用户在地址栏输入框内指定。
|
|
|
|
|
手机其它应用中的文本可选中后分享给超微浏览器,再由超微浏览器作笔记或进一步分享给PC。如果其它应用无法分享选中文本,这种情况可以先复制文本至剪贴板。
|
|
|
|
|
[在超微浏览器中长按并在新窗口打开此链接](data:text/html;charset=utf-8,&lt;body contenteditable%3E),然后点击窗口并粘贴文本。长按链接按钮选择适当功能即可复制至PC剪贴板。
|
|
|
|
@ -44,29 +66,6 @@ Windows PC 对Windows PC而言,vista及以后自带clip.exe,此时配置如
|
|
|
|
|
pclip</description>
|
|
|
|
|
</item>
|
|
|
|
|
|
|
|
|
|
<item>
|
|
|
|
|
<title>一键执行任意预定义命令(附手机PC剪贴板互通)</title>
|
|
|
|
|
<link>https://jamesfengcao.gitee.io/uwebzh/cmd/</link>
|
|
|
|
|
<pubDate>Sat, 20 Jan 2018 00:00:00 +0000</pubDate>
|
|
|
|
|
|
|
|
|
|
<guid>https://jamesfengcao.gitee.io/uwebzh/cmd/</guid>
|
|
|
|
|
<description>技巧等级:中级 PC剪贴板(高级)
|
|
|
|
|
uweb浏览器支持一键执行任意预定义命令,这些命令可以与剪贴板交互,可以将结果(文本、图像、音视频)输出到浏览器窗口。
|
|
|
|
|
手机推荐安装uweb定制Termux,否则能够执行的命令极其有限。
|
|
|
|
|
预定义命令保存在文件&quot;/sdcard/uweb/default.cmds&quot;中。重启浏览器,长按历史按钮,超微将弹出菜单供用户点击执行。
|
|
|
|
|
资深用户可能注意到文件名与default.acmd类似。default.acmd中的命令适合以不同的参数反复执行;而default.cmds一般以单次执行为多。default.acmd结果会显示在浏览器当前窗口;而default.cmds中命令执行结果会显示在新窗口之中。这两个文件格式也完全相同,每行格式如下:
|
|
|
|
|
[命令名称]:[mimetype]:[命令代码]
|
|
|
|
|
命令代码可以是任意命令,其中可以包含%c(当前网址cookie)、%s (地址栏输入)、 %t (当前窗口标题)、 %u (当前窗口url或文件路径)。执行时这些特殊标识将会被相应内容自动替换。
|
|
|
|
|
mimetype用来表示命令的输出类型。除了标准的mimetype之外,超微对此还作了扩充,便利与剪贴板交互。下面是扩充版的mimetype:
|
|
|
|
|
&quot;clip/clip&quot; : 以剪贴板作为命令输入,输出结果复制到剪贴板。
|
|
|
|
|
&quot;/clip&quot; : 输出结果复制到剪贴板。
|
|
|
|
|
&quot;clip/text/html&quot; : 以剪贴板作为命令输入,输出结果mimetype类型为“text/html”。
|
|
|
|
|
&quot;termux/*&quot;: 在termux中执行命令。
|
|
|
|
|
&quot;uweb&quot;: 输出结果作为链接来处理。
|
|
|
|
|
下面是笔者使用的default.cmds配置(命令具体解释):
|
|
|
|
|
复制手机剪贴板至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" </description>
|
|
|
|
|
</item>
|
|
|
|
|
|
|
|
|
|
<item>
|
|
|
|
|
<title>浏览器一键控制台式机/服务器下载资源</title>
|
|
|
|
|
<link>https://jamesfengcao.gitee.io/uwebzh/pcdown/</link>
|
|
|
|
|