All Projects → openzim → node-libzim

openzim / node-libzim

Licence: GPL-3.0 license
Binding to libzim, read/write ZIM files in Javascript

Programming Languages

C++
36643 projects - #6 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to node-libzim

youtube
Create a ZIM file from a Youtube channel/username/playlist
Stars: ✭ 25 (+8.7%)
Mutual labels:  zim, openzim
gutenberg
Scraper for downloading the entire ebooks repository of project Gutenberg
Stars: ✭ 100 (+334.78%)
Mutual labels:  offline, zim
Forbind
Functional chaining and promises in Swift
Stars: ✭ 44 (+91.3%)
Mutual labels:  binding
global-upvote
A progressive web app that provides top voted stories across the web, summarized and updated every sixty seconds.
Stars: ✭ 25 (+8.7%)
Mutual labels:  offline
examples-android
Android demo application for GLMap framework
Stars: ✭ 14 (-39.13%)
Mutual labels:  offline
progressive
This is the repository for my course, Building a Progressive Web App on LinkedIn Learning and Lynda.com.
Stars: ✭ 26 (+13.04%)
Mutual labels:  offline
Canvas-Vision
📷 Wallpaper Downloading Android App
Stars: ✭ 14 (-39.13%)
Mutual labels:  offline
xyTalk-pc
企业IM即时通讯定制平台,百万级高并发、高性能、可扩展、安全、高交互体验的企业通信和协作im平台。包含通讯服务、客户端(PC、Android、iOS)、Web门户(用于集成企业应用)、WebAPI。
Stars: ✭ 48 (+108.7%)
Mutual labels:  offline
pyHeadspace
command-line script to download headspace packs, singles, everyday meditation and other sessions. You could also download all packs at once
Stars: ✭ 37 (+60.87%)
Mutual labels:  offline
otp-authenticator-webapp
A 'Google Authenticator' like Single Page Application
Stars: ✭ 69 (+200%)
Mutual labels:  offline
janetrs
Rust high level bindings for Janet
Stars: ✭ 36 (+56.52%)
Mutual labels:  binding
service-workers-offline
Code for the Service Workers / PWA section of the Service Workers & Offline course by Kyle Simpson
Stars: ✭ 99 (+330.43%)
Mutual labels:  offline
Telegraf-Test
Telegraf Test - Simple Test ToolKit of Telegram Bots
Stars: ✭ 22 (-4.35%)
Mutual labels:  offline
pyguetzli
Python bindings for Google's Guetzli, a JPEG encoder that optimises JPEG compression
Stars: ✭ 28 (+21.74%)
Mutual labels:  binding
react-health-check
Lightweight React hook for checking health of API services.
Stars: ✭ 28 (+21.74%)
Mutual labels:  offline
Binder
🦁"Hello World" <-> [🏷, 🏷, 🏷, 🏷]
Stars: ✭ 37 (+60.87%)
Mutual labels:  binding
organicmaps
🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Your donations and positive reviews motivate and inspire our small team!
Stars: ✭ 3,689 (+15939.13%)
Mutual labels:  offline
imgui-java
JNI based binding for Dear ImGui
Stars: ✭ 270 (+1073.91%)
Mutual labels:  binding
choo-offline
🔧 offline first support for choo apps
Stars: ✭ 12 (-47.83%)
Mutual labels:  offline
HelpOff
Providing help via offline system : Runner-Up at NMIMS Hackathon 2018
Stars: ✭ 20 (-13.04%)
Mutual labels:  offline

node-libzim

This is the Node.js binding to the libzim. Read and write ZIM files easily in Javascript.

npm Build Status codecov CodeFactor License: GPL v3

Dependencies

This package relies on node-addon-api / n-api.

On GNU/Linux & macOS, the package will download a libzim binary. On other OSes you will need to install libzim separately (see here).

Usage

npm i openzim/libzim

Writing a Zim file

// write.js
const { ZimArticle, ZimCreator } = require("@openzim/libzim");

(async () => {

    console.info('Starting');
    const creator = new ZimCreator({ fileName: 'test.zim' }, { welcome: 'index.html' });

    for (let i = 100; i > 0; i--) {
        const a = new ZimArticle({ url: `file${i}`, data: `Content ${i}` });
        await creator.addArticle(a);
    }

    const welcome = new ZimArticle({ url: `index.html`, data: `<h1>Welcome!</h1>` });
    await creator.addArticle(welcome);

    await creator.finalise();

    console.log('Done Writing');

})();

Reading a Zim file

// read.js

const { ZimArticle, ZimReader } = require("@openzim/libzim");

(async () => {

    const zimFile = new ZimReader(path.join(__dirname, '../test.zim'));

    const suggestResults = await zimFile.suggest('laborum');
    console.info(`Suggest Results:`, suggestResults);

    const searchResults = await zimFile.search('rem');
    console.info(`Search Results:`, searchResults);

    const readArticleContent = await zimFile.getArticleByUrl('A/laborum');
    console.info(`Article by url (laborum):`, readArticleContent);

    await zimFile.destroy();

})();

License

GPLv3 or later, see LICENSE for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].