enable html5 apps from sitecache/local

This commit is contained in:
James Feng Cao 2022-10-21 09:45:05 +08:00
parent 3cb1a66d80
commit c0e90a6090
7 changed files with 73 additions and 60 deletions

View file

@ -5,7 +5,17 @@
<link>/en/_posts/</link> <link>/en/_posts/</link>
<description>Recent content in _posts on uweb browser</description> <description>Recent content in _posts on uweb browser</description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Sun, 02 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" /> <lastBuildDate>Thu, 20 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Thu, 20 Oct 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Offline resources locate in the folder &amp;quot;sitecache&amp;quot;. With the option &amp;quot;use offline resources&amp;quot; enabled, the corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded first before reaching the network.
PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp;amp; .xpi for firefox) are just packaged websites. Ex. the &amp;quot;kiwix&amp;quot; extension can be extracted to the folder &amp;quot;sitecache/kiwix&amp;quot;, then the kiwix extension can be accessed via url &amp;quot;https://kiwix/www/index.</description>
</item>
<item> <item>
<title>Html5 applications</title> <title>Html5 applications</title>
<link>/en/html5/</link> <link>/en/html5/</link>
@ -24,7 +34,7 @@ epub reader (authorllili)
djvu viewer djvu viewer
The corresponding menus can be installed with url services. The corresponding menus can be installed with url services.
Features The following mentioned subfolders locate in the configuration folder. Features The following mentioned subfolders locate in the configuration folder.
All html5 applications locating in a subfolder whose name begins with &amp;quot;app&amp;quot; (such as &amp;quot;appPDF&amp;quot;) are allowed to read local files.</description> The following html5 applications are allowed to read local files referred by &amp;quot;https://local/sdcard/.</description>
</item> </item>
<item> <item>
@ -122,15 +132,6 @@ Commands Clicking to run is only allowed from local pages for bookmarks in this
To save the bookmarks to local, users firstly need to install &amp;quot;bookmark&amp;quot; menu by clicking corresponding link in the url services page, then long press the bookmark link =&amp;gt; &amp;quot;open in new tab&amp;quot; =&amp;gt; &amp;quot;Commands&amp;quot; =&amp;gt; &amp;quot;bookmark&amp;quot; to save the bookmark.</description> To save the bookmarks to local, users firstly need to install &amp;quot;bookmark&amp;quot; menu by clicking corresponding link in the url services page, then long press the bookmark link =&amp;gt; &amp;quot;open in new tab&amp;quot; =&amp;gt; &amp;quot;Commands&amp;quot; =&amp;gt; &amp;quot;bookmark&amp;quot; to save the bookmark.</description>
</item> </item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded with option &amp;quot;use offline resources&amp;quot;.</description>
</item>
<item> <item>
<title>Resource redirection</title> <title>Resource redirection</title>
<link>/en/redirect/</link> <link>/en/redirect/</link>

View file

@ -61,9 +61,19 @@ Click to install the following html5 apps:<br>
<h4 id="features">Features</h4> <h4 id="features">Features</h4>
<p>The following mentioned subfolders locate in the configuration folder.</p> <p>The following mentioned subfolders locate in the configuration folder.</p>
<ul> <ul>
<li>All html5 applications locating in a subfolder whose name begins with &quot;app&quot; (such as &quot;appPDF&quot;) are allowed to read local files. Use url &quot;https://local/sdcard/...&quot; for a local file.</li> <li>
<li><span style="color:red">All files under the subfolder &quot;app&quot; can be automatically choosed as file objects by any web page</span>.</li> <p>The following html5 applications are allowed to read local files referred by &quot;https://local/sdcard/...&quot; where the &quot;/sdcard/..&quot; part is the full path of the file. The below applications <span style="color:red">can auto choosed any files as file objects</span>.</p>
<li><span style="color:red">Local files (including binary files) can be processed by appending &quot;?app=[html5 app url]&quot; to the file urls.</span> Ex. &quot;file:///..../xx.md?app=https://...../app.html&quot; loads &quot;app.html&quot; first, then &quot;app.html&quot; processes the local file.</li> <ul>
<li>Locating in a subfolder whose name begins with &quot;app&quot; (such as &quot;appPDF&quot;)</li>
<li>&quot;https://local/...&quot; applications (only possible with the option &quot;<a href="../offlinecache/index.html">use offline resources</a>&quot; and installed under the folder &quot;sitecache/local/&quot;)</li>
</ul>
</li>
<li>
<p><span style="color:red">All files under the subfolder &quot;app&quot; can be automatically choosed as file objects by any web page</span>.</p>
</li>
<li>
<p><span style="color:red">Local files (including binary files) can be processed by appending &quot;?app=[html5 app url]&quot; to the file urls.</span> Ex. &quot;file:///..../xx.md?app=https://...../app.html&quot; loads &quot;app.html&quot; first, then &quot;app.html&quot; processes the local file.</p>
</li>
</ul> </ul>
<p>With the first approach, the html5 application is installed locally and can read any file allowed by the OS; while in the second approach, the html5 application can be either local or remote, and only files under the subfolder &quot;app&quot; can be accessed; The third approach allows easy access of other external resources (ex. local media).</p> <p>With the first approach, the html5 application is installed locally and can read any file allowed by the OS; while in the second approach, the html5 application can be either local or remote, and only files under the subfolder &quot;app&quot; can be accessed; The third approach allows easy access of other external resources (ex. local media).</p>
<h4 id="open-local-files-with-html5-apps">Open local files with html5 apps</h4> <h4 id="open-local-files-with-html5-apps">Open local files with html5 apps</h4>

View file

@ -84,6 +84,12 @@
<li class="post">
<a href="offlinecache/index.html">
<span>Offline resources</span>
</a>
</li>
<li class="post"> <li class="post">
<a href="html5/index.html"> <a href="html5/index.html">
<span>Html5 applications</span> <span>Html5 applications</span>
@ -126,12 +132,6 @@
</a> </a>
</li> </li>
<li class="post">
<a href="offlinecache/index.html">
<span>Offline resources</span>
</a>
</li>
<li class="post"> <li class="post">
<a href="redirect/index.html"> <a href="redirect/index.html">
<span>Resource redirection</span> <span>Resource redirection</span>

View file

@ -5,7 +5,17 @@
<link>/en/</link> <link>/en/</link>
<description>Recent content on uweb browser</description> <description>Recent content on uweb browser</description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Sun, 02 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/index.xml" rel="self" type="application/rss+xml" /> <lastBuildDate>Thu, 20 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Thu, 20 Oct 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Offline resources locate in the folder &amp;quot;sitecache&amp;quot;. With the option &amp;quot;use offline resources&amp;quot; enabled, the corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded first before reaching the network.
PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp;amp; .xpi for firefox) are just packaged websites. Ex. the &amp;quot;kiwix&amp;quot; extension can be extracted to the folder &amp;quot;sitecache/kiwix&amp;quot;, then the kiwix extension can be accessed via url &amp;quot;https://kiwix/www/index.</description>
</item>
<item> <item>
<title>Html5 applications</title> <title>Html5 applications</title>
<link>/en/html5/</link> <link>/en/html5/</link>
@ -24,7 +34,7 @@ epub reader (authorllili)
djvu viewer djvu viewer
The corresponding menus can be installed with url services. The corresponding menus can be installed with url services.
Features The following mentioned subfolders locate in the configuration folder. Features The following mentioned subfolders locate in the configuration folder.
All html5 applications locating in a subfolder whose name begins with &amp;quot;app&amp;quot; (such as &amp;quot;appPDF&amp;quot;) are allowed to read local files.</description> The following html5 applications are allowed to read local files referred by &amp;quot;https://local/sdcard/.</description>
</item> </item>
<item> <item>
@ -236,15 +246,6 @@ Commands Clicking to run is only allowed from local pages for bookmarks in this
To save the bookmarks to local, users firstly need to install &amp;quot;bookmark&amp;quot; menu by clicking corresponding link in the url services page, then long press the bookmark link =&amp;gt; &amp;quot;open in new tab&amp;quot; =&amp;gt; &amp;quot;Commands&amp;quot; =&amp;gt; &amp;quot;bookmark&amp;quot; to save the bookmark.</description> To save the bookmarks to local, users firstly need to install &amp;quot;bookmark&amp;quot; menu by clicking corresponding link in the url services page, then long press the bookmark link =&amp;gt; &amp;quot;open in new tab&amp;quot; =&amp;gt; &amp;quot;Commands&amp;quot; =&amp;gt; &amp;quot;bookmark&amp;quot; to save the bookmark.</description>
</item> </item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded with option &amp;quot;use offline resources&amp;quot;.</description>
</item>
<item> <item>
<title>Resource redirection</title> <title>Resource redirection</title>
<link>/en/redirect/</link> <link>/en/redirect/</link>

View file

@ -47,7 +47,8 @@
<ul class="tags"> <ul class="tags">
</ul> </ul>
<p>Corresponding files in &quot;sitecache/[domain name]/[full path including filename, '?' , '&amp;' , '='. exactly as url]&quot; are loaded with option &quot;use offline resources&quot;.</p> <p>Offline resources locate in the folder &quot;sitecache&quot;. With the option &quot;use offline resources&quot; enabled, the corresponding files in &quot;sitecache/[domain name]/[full path including filename, '?' , '&amp;' , '='. exactly as url]&quot; are loaded first before reaching the network.</p>
<p>PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp; .xpi for firefox) are just packaged websites. Ex. the &quot;kiwix&quot; extension can be extracted to the folder &quot;sitecache/kiwix&quot;, then the kiwix extension can be accessed via url &quot;https://kiwix/www/index.html&quot; in the browser. Note: the folder name &quot;kiwix&quot; is used as the domain name in the url.</p>
</div> </div>

View file

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml"> xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url> <url>
<loc>/en/_posts/</loc> <loc>/en/_posts/</loc>
<lastmod>2022-10-02T00:00:00+00:00</lastmod> <lastmod>2022-10-20T00:00:00+00:00</lastmod>
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="zh" hreflang="zh"
@ -14,6 +14,32 @@
hreflang="en" hreflang="en"
href="/en/_posts/" href="/en/_posts/"
/> />
</url><url>
<loc>/en/offlinecache/</loc>
<lastmod>2022-10-20T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/offlinecache/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/offlinecache/"
/>
</url><url>
<loc>/en/</loc>
<lastmod>2022-10-20T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/"
/>
</url><url> </url><url>
<loc>/en/html5/</loc> <loc>/en/html5/</loc>
<lastmod>2022-10-02T00:00:00+00:00</lastmod> <lastmod>2022-10-02T00:00:00+00:00</lastmod>
@ -27,19 +53,6 @@
hreflang="en" hreflang="en"
href="/en/html5/" href="/en/html5/"
/> />
</url><url>
<loc>/en/</loc>
<lastmod>2022-10-02T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/"
/>
</url><url> </url><url>
<loc>/en/changelog/</loc> <loc>/en/changelog/</loc>
<lastmod>2022-09-16T00:00:00+00:00</lastmod> <lastmod>2022-09-16T00:00:00+00:00</lastmod>
@ -215,19 +228,6 @@
hreflang="en" hreflang="en"
href="/en/bookmark/" href="/en/bookmark/"
/> />
</url><url>
<loc>/en/offlinecache/</loc>
<lastmod>2022-04-25T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/offlinecache/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/offlinecache/"
/>
</url><url> </url><url>
<loc>/en/tags/redirection/</loc> <loc>/en/tags/redirection/</loc>
<lastmod>2022-04-25T00:00:00+00:00</lastmod> <lastmod>2022-04-25T00:00:00+00:00</lastmod>

View file

@ -4,7 +4,7 @@
<sitemap> <sitemap>
<loc>en/sitemap.xml</loc> <loc>en/sitemap.xml</loc>
<lastmod>2022-10-02T00:00:00+00:00</lastmod> <lastmod>2022-10-20T00:00:00+00:00</lastmod>
</sitemap> </sitemap>