GithubHelp home page GithubHelp logo

kiwix / kiwix-js-pwa Goto Github PK

View Code? Open in Web Editor NEW
150.0 9.0 28.0 235.03 MB

Kiwix JS Offline Browser implemented as a Progressive Web App (PWA), and packaged as Electron, NWJS and UWP apps for Windows and Linux.

Home Page: https://pwa.kiwix.org

License: GNU General Public License v3.0

HTML 2.18% PowerShell 1.58% CSS 10.94% JavaScript 85.21% Shell 0.09% Batchfile 0.01%
uwp uwp-apps kiwix windows-mobile windows-10 wikimedia wikipedia offline kiwix-js zim

kiwix-js-pwa's Introduction

Kiwix JS for PWA, Windows and Linux (Electron, NWJS, UWP)

Demos: [ Instal PWA on Desktop ] [ Install and use: Android ] [ Install and use: Firefox Android ] [ Picking a folder of archives ] [ File handling (desktop) ] [ Demo all OPFS features ] [ Adding app to Edge sidebar ]

Kiwix JS Seven Wonders Montage trans

Kiwix is an offline browser for Wikipedia, Project Gutenberg, TED Talks, Wikivoyage, Stackexchange, and many other sites and resources. It makes knowledge available, in many different languages, to people with limited or no Internet access. The software and the content are free for anyone to use. Get the app and download your choice of offline content (ZIM archives, which can be downloaded free in-app). There are hundreds of multilingual archives to choose from, on many different topics and subjects. Build a whole digital library of offline knowledge!

Part of the Kiwix family, this app is available either as an offline-capable, installable Progressive Web App (PWA), for almost all modern browsers and devices, or else as app packages for various Windows and Linux operating systems: see Kiwix JS for Windows and Linux. For Mac and iOS, use the offline PWA.

We also have packaged apps of WikiMed by Kiwix (a complete medical encyclopaedia), and Wikivoyage by Kiwix (a complete travel guide) in English -- no extra download needed! (You can, however, download other languages in these apps.)

If you are using Windows 10 or 11, then all three apps are conveniently available in the Microsoft Store: Kiwix JS UWP, WikiMed by Kiwix, and Wikivoyage by Kiwix. They will automatically update when a new package is available. If you are using Linux, then the Electron AppImage package of Kiwix JS also (optionally) self-updates, as does the installable Windows Electron package. Other apps will notify you when an update is available.

Universal Progressive Web App

Don't like stores or packages? We've got you covered! Launch this app instantly by opening the installable, offline-capable PWA (Progressive Web App) in your browser right now at pwa.kiwix.org. This works in any browser that supports Service Workers: modern Chrome, Edge, Firefox and Safari (note that on iOS devices, you must use Safari because Apple bans the use of Service Workers in any other browser on i-devices).

Get a free ZIM archive to use with the PWA from the Configuration page of the app, or you can preview a ZIM at library.kiwix.org before you download one. Once installed, bookmarked or added to your home screen, the PWA works even when your device is fully offline! Take a look at our demo that shows how quick and easy it is to install the PWA.

How do I get all of Wikipedia offline?

If you want it with images, then please be aware that it's a big download: the English version is around 97 Gigabytes! We recommend you try it out first with one of the themed, much smaller, archives, like Astronomy, Chemistry, Maths, Physics, etc. In-app, you'll find a handy dropdown that allows you to choose your language and your theme, and then download it. The archive will download in your browser.

If you really want full English Wikipedia with images, then we strongly recommend you use the open-source app qBittorrent to download it on a PC with plenty of disk space. First install qBittorrent. Then, when you select a large archive for download in the app, it will provide you with a torrent link. Click the link and allow your browser to download and open the torrent file. This small file will open in qBittorrent and you'll be asked where you want to save the archive you want to download. It's much easier than it sounds!

What about Zimit (Web Archive) format?

Zimit is a service that allows any Web site to be archived as a ZIM, although there are lots of exciting pre-crawled Zimit-based ZIMs for you to use (see below). If you want to make your own, try it out at https://youzim.it/. The Kiwix JS PWA and Electron apps have full support for Zimit-based archives as of v.2.8.5 using the open-source Replay Web Archive reader, and already support the forthcoming Zimit v2 format. Please note that most Zimit archives will require ServiceWorker mode, due to their highly dynamic content.

The Kiwix download library (available in-app) publishes a number of fantastically useful refernce sites in the Zimit file format, such as the Ready.Gov disaster preparedness site, the fascinating Low-Tech magazine, the CIA World Factbook, the Harmony Project library of sheet music, and the Internet Encyclopaedia of Philosophy -- amongst many others. Just open the Zimit directory in the in-app library.

Kiwix_better_zimit_montage

Browser support

We pride ourselves in maintaining support for old browsers and platforms, given that an important target audience for this app consists of users in the developing world who may only have access to old devices with outdated software. We test the app frequently on older browsers and operating systems. The app will usually detect which features don't work on a given browser, and disable them or work around them. However, in some cases (e.g. Firefox <= 59), the app will set itself to Service Worker mode, but this mode will silently fail. If affected, please try switching the app to Restricted mode (see Content injection mode in Configuration).

Officially supported

  • As a Progressive Web App (PWA) on Linux, Windows, Android, iOS, macOS:

    • Google Chrome / Chromium >= 59 (and many browsers based on Chromium, e.g. Opera, Samsung Internet)
    • Microsoft Edge (Chromium) >= 79
    • Mozilla Firefox >= 60 (but see note about Android*)
    • Apple Safari >= 11.3 for iOS and macOS (full-text search only works on iOS 15+)
    • Microsoft Edge Legacy 18 (Windows only)
  • As an application implemented with the following frameworks:

* With Firefox on Android, the app is only useable with files stored in the Origin Private File System. There is a Firefox bug whereby the browser attempts to read the entire ZIM archive into memory if opening it from the user-visible file system.

Deprecated

Although deprecated, we will keep support for as long as is practical:

  • Internet Explorer 11 (Restricted mode only, no offline use of PWA)
  • Edge Legacy <= 17 (Restricted mode only, no offline use of PWA)
  • Firefox 45-59 (some versions require the user to switch manually to Restricted mode)
  • Chromium 49-58 (some versions only run in Restricted mode)

Reporting bugs and technical support

Please use this repository's issue tracker to report any bugs you have found with the software. Open a new ticket (after checking that the issue you identified doesn't have a ticket already). Please state clearly the version number you are using (at the top of the Configuration page in the app), and which browser or platform you are using.

If you are having difficulties with the software, or would like to see a new feature, please also open a ticket. Alternatively, see the Feedback section on the About page in the app for other ways of getting technical support for your issue. Feel free to get in contact (see About page of app) if you would just like to provide feedback, or leave a review if you obtained the app from a Store. If you like the app, please star this Repostiory (see top)!

Technical information

This repository is for development of the Kiwix JS app for PWA, Electron, NWJS and Windows 10/11 Universal Windows Platform (UWP). The latest code is usually on the main branch, but this is used for active development and may be several commits ahead of releases. Installable and portable versions for Windows (XP/Vista/7/8/10/11) and Linux (32bit and 64bit) are available from releases. Unstable nightly builds of the Electron and NWJS apps are available together with a development deployment, but code may be buggy and change rapidly.

The code is based on Kiwix JS, a lightweight HTML/JavaScript port of the Kiwix Offline reader. Significant development has gone into packaging this app for various frameworks, and to add some features which are often backported upstream. The PWA can be installed as a fully integrated system app if opened in a modern Chromium browser, and it uses the File System Access API and the File Handling API for a native-like experience in browsers supporting those APIs. For more info about these APIs, see the bottom of this page: File System Access API and File Handling.

The apps are also available in the WinGet Package Manager. You can sideload the UWP version (in Windows 10/11) by opening a Command Prompt or PowerShell terminal and typing winget install kiwix.kiwixjs (this version will not auto-update, but it will let you know when a new update is ready to install). Alternative sideloading instructions are available in the release notes. The Electron version can be installed with winget install kiwix.kiwixjs.electron, or else by downloading a package from Releases. For testing, the Store, Electron and NWJS versions come packaged with a mini archive of the top 100 Wikipedia articles (without images and with only the lede paragraph).

Some ZIM archives are very large indeed, so the underlyin limits of the File System can be a consideration. For most storage types (including microSD cards) that are formatted as exFAT or NTFS, you can store even these very large files in the storage with no problem. However, if you plan to store your ZIM file on an SD card formatted as FAT32, and you wish to use an archive larger than 4GB, then you will need to split the ZIM: see file splitting instructions.

A lot of development for this app happens upstream in the Kiwix JS repository to which I ontribute actively. Without Kiwix JS, this app would be impossible, and huge thanks goes to the original developers of first the Evopedia app and then Kiwix HTML5, which eventually became Kiwix JS. The port and further development of Kiwix JS PWA and other apps is by Geoffrey Kantaris. I can be contacted by email: egk10 at cam ac uk.

Contributing code

If you have coding experience and are interested in contributing to this project, we suggest you start by contributing to the upstream Kiwix JS repository, as much of the code contributed there is subsequently ported to this repository. Please see CONTRIBUTING.md for details. If you wish to contribute to a specific Kiwix JS PWA feature, then please open an issue on this repository explaining the feature or other code you aim to contribute and how you propose this should be done. You should be comfortable creating PRs and have good knowledge of JavaScript. Follow the same contributing guidelines as for Kiwix JS.

We have now transitioned this app to ES6 code, which is transpiled by rollup.js and Babel to code that is compatible with older browsers. Brief instructions:

  • Clone this repo and run npm install to get the Node dependencies;
  • To serve the app with Vite.js, which includes Hot Module Replacement, run npm run serve;
  • You MUST turn on the option to Bypass the app cache in Configuration under Troubleshooting and development. If the app loads in a disordered way, you should still be able to access this setting so long as the app is in ServiceWorker mode (if it isn't turn it on under Content injection mode). Refresh the app with Ctrl-R;
  • Vite will watch for changes and will refresh the app when you make any and save them;
  • To preview the bundled version of the app, run npm run preview, and Vite will build the app and open a browser window to view the bundled version;
  • To fully build the app, run npm run build. The built app will be saved to a directory called dist in your cloned repo;
  • To run the app in the Electron framework, you can use npm start. This will run the unbundled app in the Electron version specified in package.json. See various scripts to build the bundled version of the app for Electron in package.json (you can only build it for the OS you are currently on, though the Linux app can be built on Windows with WSL).

Other contributions / donations

If you like this project and would like to contribute financially towards keeping it running, you can make one-off or regular donations on the Kiwix Support page. Donations help pay for servers, coding certificates, maintenance, etc. If you would like to contribute time and expertise rather than money, and you have good knowledge of a foreign language, you can help with translations of Kiwix projects. Alternatively, you can help improve Wikimedia projects by making edits or corrections to Wikipedia or Wikivoyage articles.

ContactSheet-Kiwix-5x6_sphere@0 5x_masked

Privacy Policy

This Privacy Policy applies to the Kiwix JS Progressive Web App and versions of it packaged for the Electron, NWJS and UWP frameworks that are published on Kiwix servers, and by official Kiwix accounts on GitHub and other third-party vendor stores ("app stores").

When installed, this application is capable of working entirely offline. It does not collect or record any of your personal data, though if you installed it from a Store, the Store operator may collect anonymous usage data (see below). The app only remembers your browsing history for the duration of a session (for the purpose of returning to previously viewed pages). This history is lost on exiting the app with the optional exception of the last-visited page.

If you access this application from a secure web server (e.g. the PWA server), it will only work offline if your browser is capable of installing a Service Worker. If you install or bookmark the PWA version in Service Worker mode, then it will work offline, but note that by design any PWA will periodically check the PWA server (in this case, https://pwa.kiwix.org/), if it is available, to check for an updated Service Worker.

Versions of the app that are not installed via a Store or that are not PWAs, will offer to check the GitHub Releases API for updates on startup, but this functionality is optional and can be kept off. Some Electron apps will also optionally self-update (via the same API), if you allow them to check for updates. This applies to the installer (setup) version for Windows, and to the AppImage version for Linux. The Store version and the PWA also self-update, but this is not controllable within the app.

By default, this application will remember your last-visited page between sessions using local stoarage or a cookie that is accessible only on this device. If you are accessing sensitive information that you do not wish to be displayed next time you open this app, we recommend that you turn this option off in the Configuration options.

This application only reads the archive files that you explicitly select on your device and files included in its own package: it is not capable of reading any other files. It will only access the Kiwix archive download server if you specifically request it to access the download library for ZIM archives on the Configuration page. If you run the app as a PWA, it will cache its own code from the secure PWA server and then can be used offline. Some ZIM archives contain active content (scripts) which may, in rare circumstances, attempt to contact external servers for incidental files such as fonts. We block these with a Content Security Policy injected into articles, but in some cases, if the article already has a CSP, ours may be overwritten. Note that scripts only run if you enable Service Worker mode in Configuration.

If you believe your Internet access is insecure, or is being observed or censored, we recommend that you completely shut down your Internet access (Data or WiFi) before using the application.

Additionally, if you obtained this app from a vendor store (including extensions), then the Store operator may track your usage of the app (e.g. download, install, uninstall, date and number/duration of sessions) for the purpose of providing anonymous, aggregate usage statistics to developers. If this concerns you, you should check the relevant Store Privacy Policy for further information.

Builds of this app are available that do not use a Store or an online Service Worker. Please see:

  • Releases
  • NWJS version - this version is completely standalone and will never access servers unless you allow it to.

kiwix-js-pwa's People

Contributors

danielzgtg avatar dependabot[bot] avatar jaifroid avatar kelson42 avatar rgaudin avatar tomayac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiwix-js-pwa's Issues

Remove drop-down indicator if only one archive is found

When only one archive is found in storage, the drop-down indicator is still displayed:

image

This is confusing, because it leads the user to click on it looking for more archives, but clicking on it opens the archive. Ideally also add a number in the description saying how many archives have been found.

Custom apps should *not* be able to open custom ZIM file

  • The select widget should be removed (or blinded)
  • The app instructions shoudl be adapted
  • The association between the app and *.zim(aa) should be removed to avoid to propose Wikivoyage app as an app able to deal with ZIM files.

Consider theming Kiwix JS Windows with React UWP

Currently Kiwix JS Windows uses Bootstrap to manage its visual style.

If it can be done as a theme layer (selectable/optional?), it would be preferable for the UWP version to follow UWP style guidelines. These can be added with React UWP:

https://www.react-uwp.com/

This uses the new Fluent Design standard.

NB This would only be acceptable if it can be added on to the Kiwix JS base code, as there are lots of benefits of keeping Kiwix JS Windows aligned with Kiwix JS as the reference app. I'm opening this issue in order to investigate the possibility.

Wikimed custom app

I think it would be a good idea to publish a Wikimed Custom app because:

  • Big Windows mobile audience in India
  • Wikimed is our most successful custom app on Android
  • The Wikivoyage custom app on Windows mobile has proven to work properly.

"Wikivoyage by Kiwix" now in Microsoft Store

Following on from issue #24, there is now a version of Kiwix JS Windows packaged with the December 2017 English-language Wikivoyage ZIM in the Microsoft Store, available from here:

https://www.microsoft.com/en-gb/store/p/wikivoyage-by-kiwix/9n5sb90q4jbj

As it is a UWP app, it requires Windows 10 (Mobile / Tablet / PC). It can also be sideloaded from the Releases tab of this GitHub: https://github.com/kiwix/kiwix-js-windows/releases. It is a large download (nearly 700Mb) and may need double this space for installation. I have recommended at least 2Gb free space and installation on a microSD card (in the case of Mobile, obviously). Uninstall any previous test version before attempting to install from the Store. Installation from the Store has been tested on a Lumia 950XL and a Surface tablet, with no hitches.

I'm opening this issue to gather any feedback on this package, its Store presentation, any download or installation difficulties, etc.

One minor issue is #32 - this package does not display the icon that distinguishes external links from internal ones when using locally cached stylesheets. This stylesheet issue has been corrected in the current Wikivoyage branch but will not get into the Store until the next packaged release. It can he worked around by turning off the use of locally cached stylesheets in the settings.

Add a changelog

Mirroring a similar issue over at Kiwix-js. This app needs its own changelog too, incorporating changes adopted from kiwix-js and those specifically for UWP.

Cache the Wikimedia stylesheets in the file-system for dramatic performance gain

Release 0.7.2.0 contains experimental code to read common Wikimedia stylesheets from locally stored copies in the filesystem rather than reading the same files again and again. The use of local stylesheets is a selectable option in the interface. This provides dramatic performance gains on the Edge rendering engine (used in Microsoft Edge and in UWP) both in terms of time to render and in terms of the memory consumed by the app. Here is a screenshot of test timings for the UWP version running on Windows 10 Mobile (Lumia 950XL):

image

Source spreadsheet

For the background to this, see kiwix/kiwix-js#149 . The downside is that not all ZIMs are Wikimedia, but the app falls back to the version stored in the ZIM if it cannot find it in the FS. So long as no ZIM uses the same URL for different stylesheets, this will work.

Note, Wikipedia English uses mostly one main stylesheet, styles.css, with a few loaded for special cases. Wikipedia Spanish uses styles.css and up to five others depending on the complexity of the page. Having all six stylesheets in the filesystem dramatically reduces access time and significantly accelerates the loading of images too. Wikimedia ZIMs made with mw-offliner (see kiwix/kiwix-js#34 ) use the mobile stylesheets, and here there are four core .css files (including one with a ridiculously long filename) which are loaded with nearly every page.

Knowing which css are standard makes it possible to implement a transform from "desktop" to "mobile" styles and vice versa, if the correct stylesheets are detected.

The code is still a little rough, and there are some issues I shall document here.

Incorrectly declared hexadecimal value in xzdec.js

See kiwix/kiwix-js#253 for full discussion. In brief, this change is needed:

/* var TOTAL_MEMORY = Module["TOTAL_MEMORY"] || 8e7; //GK hex value incorrectly declared */
var TOTAL_MEMORY = Module["TOTAL_MEMORY"] || 0x8e7;

This is a blocking bug for W10M.
This also fixes #1 (CSS fails to load with some pages).

Dark-theme icon is accidentally used on first launch of WikiMed

This is a cosmetic bug that affects only the first launch of WikiMed (possibly all Kiwix JS Windows at version 0.9.8). On first launch, before the cookie is established with user preferences, the app is loading the dark-theme icon for the top-left icon display (in the navigation bar) even though the default theme is light. This results in an almost invisible icon, extremely washed-out in light mode. This persists until the next launch of the app, or until the user selects a theme (light or dark) explicitly.

The bug is easy to fix, and will ship with the February update to the WikiMed archive.

Add a cookie entry so that the app (optionally) remembers the last visited page and returns to it on next launch

This would be useful in at least these cases:

  • User accidentally exits the app and has to re-launch it to continue reading the article
  • User leaves the app to come back to it later

This should be an option in the interface, so that the user can turn the behaviour on or off, since it has privacy implications. Cookie must not remember the last-visited page if the user has turned the option off.

Such an option, if developed, would need to be added to the Privacy Policy.

Maps of POIs are not displayed in Wikivoyage ZIMs

Comparing the article for Kalamata (Greece) from wikivoyage_en_all_novid_2017-12.zim to the online version of the page (screenshot), the map you see there is completely missing in the ZIM.

While I understand that the best solution would be to use the device's mapping APIs to show a map with the Points of Interest, that is very complicated...

@kelson42 Is there any possibility that mwoffliner could scrape what is displayed visually in the browser on first opening the page? I imagine it's not so easy, as there is no actual fallback image. No API for getting the map render as an image?

image

Kiwix JS Windows is now in the Microsoft Store!

I'm very pleased that the result of a "long summer" of development is now in the Microsoft Store here:

https://www.microsoft.com/en-gb/store/p/kiwix-js/9p8slz4j979j

Although this is intended for Windows Mobile, if you have Windows 10 on a tablet or PC, you can test it out without needing a mobile device. Feedback welcome here, or open an issue for the specific bug.

There is already a known bug with "novid" type ZIMs produced in September or October of this year, which will shortly be fixed (kelson already opened an issue for that).

@mossroy @sharun-s

Create UWP-specific version of abstractFilesystemAccess using native FilePicker API

The aim here would be to allow the user of the app to pick the folder containing the ZIM file or set of ZIM files, and the app would save the folder in its Future Access List with a token, giving read access to the folder without the user having to pick the file each time the app opens.

Implementing this using native APIs may also help fix #3 (App sometimes force closes while file picker is open), but that is just speculation at this stage.

Testing Release 0.9.7 Beta of Kiwix JS Windows

@kelson42 Could you possibly test Release 0.9.7 beta of Kiwix JS Windows on your Windows Phone? (Uninstall any Store version first.) The test release package is here:

https://github.com/kiwix/kiwix-js-windows/releases/tag/v0.9.7-beta

Also here: https://github.com/kiwix/kiwix-js-windows/tree/master/AppPackages/KiwixWebApp_0.9.7.0_Test (same packages)

I have tested it on a few physical devices and some VMs and have squashed display bugs, I hope. I'm particularly interested in whether the toolbar alignment is better on physical devices.. Don't worry if you haven't got time, I have tested it quite extensively, but you never quite know what will happen on different physical models and different display settings.

Testing Wikivoyage pre-release package

@kelson42 I've made an initial pre-release package for the "Wikivoyage by Kiwix" app:

https://github.com/kiwix/kiwix-js-windows/releases/tag/v0.9.4-Wikivoyage

Installation instructions are on that page, especially with regard to checking space requirements -- I'm guessing you'll need at least 2Gb free on the mobile device -- to store the appxbundle, to decompress it, and for the app itself.

If you are able to test it on your test phone, that would be very helpful. I've just tested it on mine, and it installs and runs fine, and basically behaves just like Kiwix JS, only it has the Wikivoyage ZIM packaged in place of Ray Charles. The version of the ZIM package is displayed on the Information page (top right button of toolbar). I will add below some observations I have from testing it on my 950XL.

Homogeneize screenshots on windows store

Screenshots are both in normal and nightmode, and it is rather disturbing. It would be better to homogeneize the whole thing and present standard view only. I'll put a link on the kiwix.org website as soon as this is done. Thanks.

Recognize TeX string maths equations in Stackexchage ZIMs

As per kiwix/kiwix-js#308 , raw TeX strings in Stackexchange ZIMs are not recognized by Kiwix JS Windows MathJax implementation. Format of TeX strings is that they begin and end with $ ($$ if offset) and contain combinations of numbers, letters, symbols and possibly abbreviations beginning with a backslash character such as \sqrt. However $4ac$ can be a TeX string, or $b$ or $1$.

I need to check if there is any other semantic marking to help in identifying them with a regex. Otherwise matching could be liable to false positives wherever anyone has used more than one dollar sign on a page..

WikiMed now in Microsoft Store

After an initial alpha release for testing, I'm pleased to say that WikiMed Offline Medical Wikipedia is now available in the Microsoft Store:

GB Store: https://www.microsoft.com/en-gb/store/p/wikimed/9phjsnp1cz8j

International link: https://www.microsoft.com/store/apps/9PHJSNP1CZ8J

The changelog for this release is available here:
https://github.com/kiwix/kiwix-js-windows/blob/Kiwix-JS-WikiMed-dev/CHANGELOG.md

This release features much better handling of tabbed navigation, including the possibility of "unclicking" a tab to return to the currently loaded page (#44). There is also a fix for SVG extraction on devices with 1GB RAM (these would routinely crash, see #49). Packaged archive apps now hide the file selectors by default, and re-hide them on next launch if they are optionally unhidden (e.g. for downloading WikiMed in different languages). A quick, single-tap way to re-load the packaged archive is provided if a different archive has been loaded.

This issue is for any discussion or feedback about the release that doesn't merit a separate issue.

Create custom apps with preloaded content

This is the same enhancement issue as discussed on Kiwix JS: kiwix/kiwix-js#292

Having released a beta of the main app for Kiwix JS Windows, I would be keen to implement a custom version of Kiwix JS Wikivoyage for UWP. Since the app has been designed to open the first ZIM it finds in its internal storage folder automatically (this is currently Ray Charles, just so we don't ship a completely empty and "useless" app for a naïve end-user), it would be trivial to replace Ray Charles with Wikivoyage.

I'd appreciate advice and policy on this from @kelson42 . I understand these standalone versions have been very popular on Android. Wikivoyage is the most obvious use case for an offline ZIM reader for travellers who may find themselves regularly without an Internet connection. The ZIM is also not too large for the English-language version, currently ~700Mb.

There is also a very compelling use-case for Kiwix JS Wikimedicine, but the English language file with pictures is 1Gb, so it might make sense to start with the smaller Wkivoyage file, to troubleshoot download and storage issues.

I think there is also an argument that having more apps increases discoverability and helps to spread the Kiwix technology by making people aware of it.

App sometimes force closes while file picker is open

I suspect this is also a memory issue. App appears to WM10 to be a single html page, but then starts initializing memory heaps in the background?

Perhaps minifying some libraries for release will help lower the footprint. Or else find a way to increase declared memory requirement for the app.

Links in Stackexchange ZIMs are not working

Pre-alpha support was added for Stackexchange ZIMs (appropriate stylesheets to make the text at least readable), but links are broken. You can search for the text of the link and successfully open it, but the link itself does not work. The fact that search works means this is probably relatively easy to fix.

Random Bootstrap display bug after window resize

There is a bug which primarily affects Kiwix JS Windows when running on a PC, whereby the bottom toolbar stops being evenly spaced across the full window width, and a gap appears on the right-hand side seemingly corresponding to a missing element. See screenshot. This occurs after the window is resized or if the app is minimized (or sent into the background) and re-opened sometime later. The bug does not appear during normal usage in the foreground after first opening the app.

image

Find correct startup value for TOTAL_MEMORY in xzdec.js

Although the immediate issue has been fixed in #6 (incorrectly declared hex value), in line with https://kripken.github.io/emscripten-site/docs/optimizing/Optimizing-Code.html increasing memory size dynamically in the script is costly.

The startup value of 0x8e7 is just 2.2KB and is far too small, causing multiple memory increases in even small page loads. I suggest a minimum of 500KB (0x80000 is 524,288) for W10M, but this needs investigating with different ZIM files sizes, and single file vs split.

Settings top bar button stays "clicked"

It is quite easy to get this buttong stuck as "clicked" status. This is for example easy to achieve by clicking on it during a page loading. I suspect here the whole handling of getting settings displayed and exiting is not so good. Exiting settings is done through a third party link, and I think we should at a least also work by clicking "out" the settings button.

Have an automatic way to synchronize the source code with kiwix-js

Currently, the code of kiwix-js is duplicated here, with a few modifications.
Some of these code modifications are currently being applied upstream (in kiwix-js).
But there will still be some windows-specific modifications (like #4, or adding the BOM in UTF-8 files see kiwix/kiwix-js#266).

An idea would be to have a script here that does all the synchronization stuff.
I had a few ideas coming from the java ecosystem (ant for example), but choose a technology that you prefer, and that is more adequate to the Microsoft ecosystem.

It could take as a parameter :

  • a branch name
  • or a commit id
  • or a tag name

and would do the following :

  • download a zip of the source code of kiwix-js through a URL like https://github.com/kiwix/kiwix-js/archive/master.zip
  • unzip the necessary files locally, overwriting the existing ones
  • add the BOM header to the files that need it
  • apply some patches (using the diff file format, or any other method you like)

It's just a suggestion, there might be better ways to do that.

Add print subroutine and print button

The code for printing from a UWP app is specific to the platform, so should be added here rather than upstream in kiwix-js. However, a print button may be useful in upstream. Will suggest backporting print button once implemented here.

Impossible to open/select a content in the content select box

1 - Going to settings
2 - Above "Rescan storage" button, I have what should be a select box with many ZIM files
3 - Each time I click on it it open a content instead of showing me the list.

I have 3 ZIM files on my devices... maybe Kiwix has only one of them and just open it for that reason?!

ZIM download apparently broken on Xbox

Reported here https://lists.wikimedia.org/pipermail/mobile-l/2017-November/010589.html

I noticed it's labeled as compatible with the whole range of Windows
devices including Xbox, so I had to try it on my Xbox One too... It does
run! However the download links don't work -- they bring up the
index/list view of articles instead. Interface could be better
controller-optimized too, it basically emulates a mouse cursor by
default.

Thank you Brion for this fresh testing feedback... you confirm that the
inability of the app/system to download a ZIM file (one time you have
clicked on a link) is a Xbox specific problem?

Didn't have the problem on the phone, so I assume Xbox-specific. I don't
have a dev setup on my Xbox at the moment to run unsigned builds, but would
be happy to test further when time permits. :) (Supposedly the dev mode
switch is not too difficult to turn on/off.)

ZIM downloads from mirrorservice and fau.de attempt to download the ZIM as plain text and display in browser

This affects Edge and IE, but not Firefox, hence it affects Windows Mobile because it uses the Edge engine (and no way to change that). Other download servers correctly offer to download the file.

I'm reporting the issue to the server providers. However for now it's important to work around it -- this is done for mirrorservice (the app recognizes it and prevents the link from being clickable), but not yet for ftp.fau.de, so this needs to be added to the workaround.

NB this is not a bug in the app. It's either a bug in Edge and IE or it's a bug in the two servers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.