Coder Social home page Coder Social logo

mfcar / haruneko Goto Github PK

View Code? Open in Web Editor NEW

This project forked from manga-download/haruneko

0.0 0.0 0.0 8.36 MB

Prototype of HakuNeko based on NW.js + TypeScript

JavaScript 6.86% TypeScript 51.48% HTML 9.50% Svelte 28.50% Vue 0.49% CSS 3.17%

haruneko's Introduction

HaruNeko

Prototype of HakuNeko based on NW.js + TypeScript

Development

The application consists of two ...

Installation

Make sure git and NodeJS + NPM are installed on your system.

# clone the repository
git clone https://github.com/manga-download/haruneko.git
# change into the project directory
cd harunkeo
# install dependencies
npm install

Run

  1. Build and serve the web-application on the local machine

    npm run serve

  2. Build and run the client application that will open the web-application hosted on the local machine

    npm start

Use the console from the developer tools (F12) to investigate HakuNeko API, e.g.

(async () => {
    const website = HakuNeko.PluginController.WebsitePlugins[0];
    console.log('Website:', website.Title);
    if(website.Entries.length === 0) {
        console.log('=>', 'Updating manga list (this may take some time ...)');
        await website.Update();
    } else {
        console.log('=>', 'Using manga list from local cache');
    }

    async function getPages(mangaIndex, chapterIndex) {

        const manga = website.Entries[mangaIndex]; // or with iterator: [...website][mangaIndex];
        console.log(' '.repeat(4), 'Manga:', manga.Title);
        if(manga.Entries.length === 0) {
            console.log(' '.repeat(4), '=>', 'Updating chapter list');
            await manga.Update();
        } else {
            console.log(' '.repeat(4), '=>', 'Use current chapter list');
        }
        
        const chapter = manga.Entries[chapterIndex]; // or with iterator: [...manga][chapterIndex];
        console.log(' '.repeat(8), 'Chapter:', chapter.Title);
        if(chapter.Entries.length === 0) {
            console.log(' '.repeat(8), '=>', 'Updating page list');
            await chapter.Update();
        } else {
            console.log(' '.repeat(8), '=>', 'Use current page list');
        }
        
        for(const page of chapter) {
            console.log(' '.repeat(12), 'Page:', page.SourceURL);
        }
    }

    await getPages(0, 0);
    await getPages(13, 7);

haruneko's People

Contributors

ronny1982 avatar sheepux avatar pierre-monier avatar yoshiyes avatar

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.