#!/usr/bin/env python3 # encoding: UTF-8 __author__ = 'Yanik Cawidrone' __version__ = '0.1' """ For more see the file 'LICENSE' for copying permission. """ from colorama import Fore, Back, Style from time import gmtime, strftime import configuration import datetime name = "mangaParser" def say(message): date_string = strftime("%Y-%m-%d %H:%M:%S %z", gmtime()) prefix = Fore.CYAN + name + " " + Fore.RESET + date_string + " " print(prefix + Style.DIM + message + Style.RESET_ALL) def ok(message, detail=""): date_string = strftime("%Y-%m-%d %H:%M:%S %z", gmtime()) level = Fore.GREEN + "[OK] " + Fore.RESET prefix = Fore.CYAN + name + " " + Fore.RESET + date_string + " " print(prefix + level + Style.BRIGHT + message + Style.RESET_ALL + " " + detail + Style.RESET_ALL) from .mangaParser import readManganatoCom from .mangaParser import mangakakalotCom from .mangaParser import manganeloTv from .mangaParser import direct def readManga(url,opacity,page): if "readmanganato.com" in url: say("READ manganato") return readManganatoCom.read(url,opacity,page) elif "mangakakalot.com" in url: say("READ mangakakalot") return mangakakalotCom.read(url,opacity,page) elif "manganelo.tv" in url: say("READ manganelo.tv") return manganeloTv.read(url,opacity,page) elif ".cbz" in url: say("DIRECT cbz") return direct.read(url,opacity,page) else: return "