mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
26 lines
6.6 KiB
HTML
26 lines
6.6 KiB
HTML
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Commands</title></head><body>
|
||
<h3>Commands</h3>
|
||
<p>
|
||
Click the following links to install commands with <a href="../index.html">uweb browser</a>. <b>Force exit and re-launch the app</b>, then long press the button with clock icon to popup the command menu.</p>
|
||
<p>Configuration file "/sdcard/uweb/default.cmds" examples:<br>
|
||
|
||
<p><a href="i:03Clear data::toybox find /data/data/info.torapp.uweb/app_webview ! -name 'Cookies' -type f -delete">Clear data::toybox find /data/data/info.torapp.uweb/app_webview ! -name 'Cookies' -type f -delete</a></p><p><a href="i:03VPN::am start -a android.net.vpn.SETTINGS">VPN::am start -a android.net.vpn.SETTINGS</a></p><p><a href="i:03wireless::am start -a android.settings.WIRELESS_SETTINGS">wireless::am start -a android.settings.WIRELESS_SETTINGS</a></p><p><a href="i:03Append query to autocomplete:uweb:cd /sdcard/uweb;cat default.autoc query.log|toybox sort|toybox uniq -i>a.tmp;mv a.tmp default.autoc;>query.log;echo file:///sdcard/uweb/default.autoc">Append query to autocomplete:uweb:cd /sdcard/uweb;cat default.autoc query.log|toybox sort|toybox uniq -i>a.tmp;mv a.tmp default.autoc;>query.log;echo file:///sdcard/uweb/default.autoc</a></p><p><a href="i:03Backup cookie::toybox cp /data/data/info.torapp.uweb/app_webview/Default/Cookies /sdcard/uweb/.">Backup cookie::toybox cp /data/data/info.torapp.uweb/app_webview/Default/Cookies /sdcard/uweb/.</a></p><p><a href="i:03Restore cookie::toybox cp /sdcard/uweb/Cookies /data/data/info.torapp.uweb/app_webview/Default/.">Restore cookie::toybox cp /sdcard/uweb/Cookies /data/data/info.torapp.uweb/app_webview/Default/.</a></p><p><a href="i:03Clear cache::toybox rm -rf /data/data/info.torapp.uweb/cache">Clear cache::toybox rm -rf /data/data/info.torapp.uweb/cache</a></p><p><a href="i:03Clear logcat::logcat -c">Clear logcat::logcat -c</a></p><p><a href="i:03logcat.log::logcat -d > /sdcard/uweb/logcat.log">logcat.log::logcat -d > /sdcard/uweb/logcat.log</a></p><p><a href="i:03copy cookie:/clip:printf '%c'">copy cookie:/clip:printf '%c'</a></p><p><a href="i:03tgz install::toybox tar -xzf %f -C /">tgz install::toybox tar -xzf %f -C /</a></p></p><p>Need root permissions:<br></p><p>Need termux:<br><p><a href="i:03cd:termux/*:cd %f;exit 1">cd:termux/*:cd %f;exit 1</a></p><p><a href="i:03vim:termux/*:vim %f">vim:termux/*:vim %f</a></p><p><a href="i:03deduplicate history::awk -F'\t' '!s[\$2]++' /sdcard/uweb/history.rec>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/history.rec">deduplicate history::awk -F'\t' '!s[\$2]++' /sdcard/uweb/history.rec>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/history.rec</a></p><p><a href="i:03deduplicate bookmarks::awk '!s[\$0]++' /sdcard/uweb/bookmark.html>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/bookmark.html">deduplicate bookmarks::awk '!s[\$0]++' /sdcard/uweb/bookmark.html>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/bookmark.html</a></p><p><a href="i:03deduplicate hosts::toybox tac /sdcard/uweb/default.hosts|awk -F' ' '!s[\$1]++' |toybox tac>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/default.hosts">deduplicate hosts::toybox tac /sdcard/uweb/default.hosts|awk -F' ' '!s[\$1]++' |toybox tac>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/default.hosts</a></p><p><a href="i:03deduplicate siteconf::toybox tac /sdcard/uweb/default.siteconf|awk -F':' '!s[\$1]++' |toybox tac>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/default.siteconf">deduplicate siteconf::toybox tac /sdcard/uweb/default.siteconf|awk -F':' '!s[\$1]++' |toybox tac>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/default.siteconf</a></p><p><a href="i:03Send url::printf '%u'|/system/bin/toybox nc 192.168.2.155 1500">Send url::printf '%u'|/system/bin/toybox nc 192.168.2.155 1500</a></p><p><a href="i:03Send url(player)::printf 'i:5g%u'|/system/bin/toybox nc 192.168.2.155 1500">Send url(player)::printf 'i:5g%u'|/system/bin/toybox nc 192.168.2.155 1500</a></p><p><a href="i:03Sendurl(bookmark)::printf 'i:51../home5:i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500">Sendurl(bookmark)::printf 'i:51../home5:i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500</a></p><p><a href="i:03Send url(fullscreen)::printf 'i:5f%u'|/system/bin/toybox nc 192.168.2.155 1500">Send url(fullscreen)::printf 'i:5f%u'|/system/bin/toybox nc 192.168.2.155 1500</a></p><p><a href="i:03Send url(video)::printf 'i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500">Send url(video)::printf 'i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500</a></p><p><a href="i:03Send url(clipboard):clip:(printf 'i:5b';cat)|/system/bin/toybox nc 192.168.2.155 1500">Send url(clipboard):clip:(printf 'i:5b';cat)|/system/bin/toybox nc 192.168.2.155 1500</a></p><p><a href="i:03Clipboard2PC:clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -i'">Clipboard2PC:clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -i'</a></p><p><a href="i:03ClipboardFromPC:/clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -o'">ClipboardFromPC:/clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -o'</a></p><p><a href="i:03Clipboard broadcast:clip:socat - UDP-DATAGRAM:255.255.255.255:1500,broadcast">Clipboard broadcast:clip:socat - UDP-DATAGRAM:255.255.255.255:1500,broadcast</a></p><p><a href="i:03Clipboard from broadcast:/clip:socat -u udp-recvfrom:1500 SYSTEM:'cat;exit'">Clipboard from broadcast:/clip:socat -u udp-recvfrom:1500 SYSTEM:'cat;exit'</a></p><p><a href="i:03Clipboard2QR:clip/uweb:qrencode -o /sdcard/uweb/a.png;echo file:///sdcard/uweb/a.png">Clipboard2QR:clip/uweb:qrencode -o /sdcard/uweb/a.png;echo file:///sdcard/uweb/a.png</a></p></p>
|
||
<p>"Send url" needs to modify Android TV ip address.
|
||
Clipboard2PC needs to modify username, PC needs xsel. ssh needs to be installed inside termux (apt install openssh).
|
||
Clipboard broadcast needs socat(apt install socat)。
|
||
Clipboard2QR needs libqrencode.</p>
|
||
<h4 id="cmds-file-format">".cmds" file format</h4>
|
||
<p>Each line has the following format:
|
||
[Name]:[mimetype]:[command line]</p>
|
||
<p>[command line] can have "%c" (cookie), "%s" (address bar text), "%u" (url), "%t" (title).
|
||
[mimetype] have the following formats:
|
||
- regular mimetype such as "text/html" to indicate the content type of the command output.
|
||
- "clip/clip" to indicate "clipboard" as input and the command output is copied to clipboard.
|
||
- "/clip": copy the command output to clipboard.
|
||
- "clip/text/html" : clipboard as input, and the command output is processed as "text/html".
|
||
- "termux/*": command line is executed under termux.
|
||
- "/uweb": the command output is processed as <a href="../links/index.html">links</a>.</p>
|
||
|
||
|
||
</body></html>
|