uweb/en/acmd/index.html

63 lines
2.9 KiB
HTML
Raw Normal View History

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
<title>Address bar command modes</title>
<script type="text/javascript">
function findLang(){
let href = location.href;
for(let i=href.length-1;i>0;i--){
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
return i;
}
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);
}
</script>
</head>
<body>
<header class='header'>
<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>
<nav>
</nav>
</header>
<br />
<div class="container">
<h1 class="title">Address bar command modes
<br>
<span class="subtitle"></span>
</h1>
<ul class="tags">
</ul>
<p><a href="../cmds/index.html">Commands</a> are the best for repeated execution of an instruction. Address bar command modes provide ways to run different commands in the same category easily.</p>
<p>The configure file &quot;default.acmd&quot; has the exactly same format as <a href="../cmds/index.html">default.cmds</a>. Click the following links to install new modes (cold start the app to take effect, then long click the &quot;refresh&quot; botton to switch modes):</p>
<p><a href="i:0gdefault.acmd::shell:text/plain:%25s%0A">Shell command mode</a></p>
<p>&lt;a href=&quot;i:0gdefault.acmd::bc:text/plain:echo &quot;%25s&quot;|bc -l -q%0A&quot;&gt;GNU bc (basic calculator) command mode (need termux for Android 10- )</a></p>
<p><a href="i:0gdefault.acmd::plot 2D function:image/svg%2Bxml:gnuplot -e 'set term svg;set
output;plot %25s'%0A">GNUPlot plot (2D function), needs uweb adapted termux &amp; gnuplot</a></p>
<p><a href="i:0gdefault.acmd::plot 3D function:image/svg%2Bxml:gnuplot -e 'set term svg;set
output;splot %25s'%0A">GNUPlot plot (3D function), needs uweb adapted termux &amp; gnuplot</a></p>
<h4 id="shell-command-mode">Shell command mode</h4>
<p>Click the following links to make commands appear in address bar, then press &quot;enter&quot; to execute:<br>
<a href="i:15cd;toybox mkdir -p /sdcard/Download/app;toybox ln -s /sdcard/Download/app">symbolic link &quot;app&quot; folder to be under the &quot;Download&quot; folder</a></p>
<p><a href="i:15cd;cd ../..;toybox cp -r files /sdcard/Download/uweb;toybox rm -rf files;toybox ln -s /sdcard/Download/uweb files">symbolic link configuration folder to &quot;/sdcard/Download/uwweb&quot;</a></p>
</div>
</body>
</html>