mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
address bar: :! to add example command line file web.js & web.sh
This commit is contained in:
parent
aeec3960f5
commit
cd87cc793c
6 changed files with 63 additions and 31 deletions
|
@ -49,7 +49,9 @@
|
||||||
<p><a href="https://releases.pagure.org/uweb/">pagure</a></p>
|
<p><a href="https://releases.pagure.org/uweb/">pagure</a></p>
|
||||||
<p><a href="https://sourceforge.net/projects/uwebbrowser/files/v1/">sourceforge</a></p>
|
<p><a href="https://sourceforge.net/projects/uwebbrowser/files/v1/">sourceforge</a></p>
|
||||||
<h4 id="change-logs">Change logs</h4>
|
<h4 id="change-logs">Change logs</h4>
|
||||||
<p>949: Address bar: ":p [width in milliInch]x[height]" to generate PDF in custom size<br>
|
<p>954: Address bar: ":!" for command line support (.js/.sh files as executables).<br>
|
||||||
|
953: hardware keyboard: ":", "!" to set focus on address bar<br>
|
||||||
|
949: Address bar: ":p [width in milliInch]x[height]" to generate PDF in custom size<br>
|
||||||
946: Option "use offline cache" to support serverless local websites.</p>
|
946: Option "use offline cache" to support serverless local websites.</p>
|
||||||
<p>945: commands to support evaluation of generated js code.</p>
|
<p>945: commands to support evaluation of generated js code.</p>
|
||||||
<p>943: Multiple home screens support .mht (offline webpage), .search & .html local files.</p>
|
<p>943: Multiple home screens support .mht (offline webpage), .search & .html local files.</p>
|
||||||
|
@ -63,26 +65,6 @@
|
||||||
<li>Serverless local sites: PWA-kind web extension (chrome .crx & firefox .xpi) support.</li>
|
<li>Serverless local sites: PWA-kind web extension (chrome .crx & firefox .xpi) support.</li>
|
||||||
<li>PWAs and web extensions to be used as search engines, ex. kiwix zim as search engines.</li>
|
<li>PWAs and web extensions to be used as search engines, ex. kiwix zim as search engines.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>925:</p>
|
|
||||||
<ul>
|
|
||||||
<li>remote js: wait for remote js to be fully loaded.</li>
|
|
||||||
<li>html5 apps are as powerful as native ones now and still secure.</li>
|
|
||||||
<li>Security enhancements.</li>
|
|
||||||
</ul>
|
|
||||||
<p>921: fix remote file decompression.</p>
|
|
||||||
<p>917:</p>
|
|
||||||
<ul>
|
|
||||||
<li>re-implement html5 enhancement for better mdict lookup support.</li>
|
|
||||||
</ul>
|
|
||||||
<p>908:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Add internal links "i:1d" to launch apps. (to fix "am" issues for Android 8+)</li>
|
|
||||||
<li>File sending now supports pseudo file manager (page url faked as a file url for folder), thus scripts of internal links "d:" can generate any kind of pseudo file manager for file transfer.</li>
|
|
||||||
<li>Better support for naked Termux (without any initial packages with updateonly version).</li>
|
|
||||||
</ul>
|
|
||||||
<p>903: Enhance html5 apps. (ex. mdict-js, a dictionary lookup<br>
|
|
||||||
app, works like native with minimal change)<br>
|
|
||||||
901: Use in-app files folder for configuration</p>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -59,13 +59,12 @@ uweb, termux &amp; history versions
|
||||||
github
|
github
|
||||||
pagure
|
pagure
|
||||||
sourceforge
|
sourceforge
|
||||||
Change logs 949: Address bar: &quot;:p [width in milliInch]x[height]&quot; to generate PDF in custom size
|
Change logs 954: Address bar: &quot;:!&quot; for command line support (.js/.sh files as executables).
|
||||||
|
953: hardware keyboard: &quot;:&quot;, &quot;!&quot; to set focus on address bar
|
||||||
|
949: Address bar: &quot;:p [width in milliInch]x[height]&quot; to generate PDF in custom size
|
||||||
946: Option &quot;use offline cache&quot; to support serverless local websites.
|
946: Option &quot;use offline cache&quot; to support serverless local websites.
|
||||||
945: commands to support evaluation of generated js code.
|
945: commands to support evaluation of generated js code.
|
||||||
943: Multiple home screens support .mht (offline webpage), .search &amp; .html local files.
|
943: Multiple home screens support .</description>
|
||||||
940: Any url as website with local html processing (&quot;i:0m/..../xxx.html:url&quot;)
|
|
||||||
935:
|
|
||||||
Pipe support: command line output to uweb tabs.</description>
|
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -102,6 +102,8 @@ Socks proxy</p>
|
||||||
The command line could be a ".js", ".sh" or other executable with arguments. Ex. ":!s youtube keyword" could invoke "s.js" executable with the whole string as arguments ("s.sh" or "s" if file exists); ":! youtube keyword" would invoke the file ".js" or ".sh" as executable.</li>
|
The command line could be a ".js", ".sh" or other executable with arguments. Ex. ":!s youtube keyword" could invoke "s.js" executable with the whole string as arguments ("s.sh" or "s" if file exists); ":! youtube keyword" would invoke the file ".js" or ".sh" as executable.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>For regular (non-js) executables, the standard output of the command line will be treated as lines of web urls.</p>
|
<p>For regular (non-js) executables, the standard output of the command line will be treated as lines of web urls.</p>
|
||||||
|
<p><a href="i:0h.sh:../searchurl/txt/web.sh">Click to install the example file ".sh"</a><br>
|
||||||
|
<a href="i:0hs.js:../searchurl/txt/web.js">Click to install the example file "s.js"</a></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>:p [width in milliInch]x[height] [top margin]:[right margin]:[bottom margin]:[left margin]<br>
|
<li>:p [width in milliInch]x[height] [top margin]:[right margin]:[bottom margin]:[left margin]<br>
|
||||||
Generate/Print PDF file in the "/sdcard/Download" folder, all units are milliinch.<br>
|
Generate/Print PDF file in the "/sdcard/Download" folder, all units are milliinch.<br>
|
||||||
|
|
15
en/searchurl/txt/web.js
Normal file
15
en/searchurl/txt/web.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
let ess = {};
|
||||||
|
ess["g"]=["https://google.com/search?q=",];
|
||||||
|
ess["v"]=["https://www.youtube.com/results?search_query=",];
|
||||||
|
ess["b"]=["http://www.bing.com/search?q=",];
|
||||||
|
ess["w"]=["https://encyclopedia.thefreedictionary.com/",];
|
||||||
|
|
||||||
|
let url=arguments[1];
|
||||||
|
let iS1 = url.search(/ [^ ]/);
|
||||||
|
let iS2 = url.indexOf(' ',iS1+2);
|
||||||
|
let name = url.substring(iS1+1,iS2)
|
||||||
|
let keywords = url.substring(iS2+1);
|
||||||
|
let es = ess[name];
|
||||||
|
if(es){
|
||||||
|
location.href=es[0]+keywords;
|
||||||
|
}
|
35
en/searchurl/txt/web.sh
Executable file
35
en/searchurl/txt/web.sh
Executable file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/usr/bin/dash
|
||||||
|
#usage: g [engine] word1 word2 ...
|
||||||
|
|
||||||
|
default=''
|
||||||
|
g="https://www.google.com.hk/search?q="
|
||||||
|
yt="https://www.youtube.com/results?search_query="
|
||||||
|
m="http://www.merriam-webster.com/dictionary/"
|
||||||
|
w="http://en.wikipedia.org/wiki/"
|
||||||
|
wd="https://en.wiktionary.org/wiki/"
|
||||||
|
b="http://www.bing.com/search?intlF=1&q="
|
||||||
|
ks="http://www.iciba.com/"
|
||||||
|
en="http://www.enacademic.com/searchall.php?SWord="
|
||||||
|
gen="http://gen.lib.rus.ec/search.php?req="
|
||||||
|
abb="http://audiobookbay.li/?s="
|
||||||
|
|
||||||
|
bd="https://www.baidu.com/s?wd="
|
||||||
|
gb="https://www.gigablast.com/search?q="
|
||||||
|
yd="http://dict.youdao.com/search?q="
|
||||||
|
a="http://www.amazon.com/s?url=search-alias%3Daps&field-keywords="
|
||||||
|
bdic="http://cn.bing.com/dict/search?q="
|
||||||
|
be="http://www.britannica.com/search?query="
|
||||||
|
u="http://www.urbandictionary.com/define.php?term="
|
||||||
|
o="http://en.oxforddictionaries.com/definition/"
|
||||||
|
|
||||||
|
eval engine=\$${1:-default} #engine=$(eval echo \${$1})
|
||||||
|
|
||||||
|
shift #concate second argument to the last one with +
|
||||||
|
string=$1
|
||||||
|
shift
|
||||||
|
for a in "$@"
|
||||||
|
do
|
||||||
|
string+="+$a"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo $engine$string
|
|
@ -17,13 +17,12 @@ uweb, termux &amp; history versions
|
||||||
github
|
github
|
||||||
pagure
|
pagure
|
||||||
sourceforge
|
sourceforge
|
||||||
Change logs 949: Address bar: &quot;:p [width in milliInch]x[height]&quot; to generate PDF in custom size
|
Change logs 954: Address bar: &quot;:!&quot; for command line support (.js/.sh files as executables).
|
||||||
|
953: hardware keyboard: &quot;:&quot;, &quot;!&quot; to set focus on address bar
|
||||||
|
949: Address bar: &quot;:p [width in milliInch]x[height]&quot; to generate PDF in custom size
|
||||||
946: Option &quot;use offline cache&quot; to support serverless local websites.
|
946: Option &quot;use offline cache&quot; to support serverless local websites.
|
||||||
945: commands to support evaluation of generated js code.
|
945: commands to support evaluation of generated js code.
|
||||||
943: Multiple home screens support .mht (offline webpage), .search &amp; .html local files.
|
943: Multiple home screens support .</description>
|
||||||
940: Any url as website with local html processing (&quot;i:0m/..../xxx.html:url&quot;)
|
|
||||||
935:
|
|
||||||
Pipe support: command line output to uweb tabs.</description>
|
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
|
|
Loading…
Reference in a new issue