Skip to content

Zepoze/manladag-core

Repository files navigation

@manladag/core

npm version Build Status Coverage Status

But what is it ?

Manladag core is used to download your favorite manga

Example

import {Lib as GoodLib} from 'a-good-lib'
import { ManladagSource, ChapterDownloaderFlags } from '@manladag/core'

const mdg = new ManladagCore(GoodLib);

mdg
    .setOnDownloadChapterStartedListener(() => {
      console.log('Download has started !');
    })
    .setOnDownloadPageFinishedListener(({page, pageCount}) => {
      console.log(`${page}/${pageCount}`);
    })
    .setOnDownloadChapterFinishedListener(() => {
      console.log('Download has finished !');
    }).
    getLastChapter('one-piece').then((chapter) => {
      mdg.createChapterDownloader('one-piece', chapter, __dirname, ChapterDownloaderFlags.INIT.AUTO_START, {
        clearFiles: {onFinish: true, onError: true},
        mlag: {path: __dirname},
      });
    });

In this example the library Source Lelscan was used to download the last chapter of One Piece available on his website into a .mlag file inside the folder __dirname

Manladag's Lib

Your favorite library is missing ? create your own lib !

Visit the lib/example folder

Manladag Core API

Visit the api web