🍭 epub generator for lightnovel.us 轻之国度 epub 生成器

Overview

lightnovel_epub

本工具用于基于轻之国度网页生成epub小说。

注意:本工具仅作学习交流使用,作者不对内容和使用情况付任何责任!

原理

直接抓取 HTML,然后将其中的图片下载至本地,随后打包成 EPUB。

EPUB 内部目录:

.
├── Images               # 图片
│   ├── ...
│   └── ...
└── Text                 # 文本
    ├── about.xhtml      # 本项目自动生成
    └── lightnovel.xhtml # 轻小说正文

Requirements

  • python 3.5 +
  • click
  • beautifulsoup4
  • requests
  • ebooklib

CLI使用方法

下载命令:

python3 cli.py download <link> <path>

下面是我写的 --help:

$ python3 cli.py download --help
Usage: cli.py download [OPTIONS] URL PATH

  download the light novel

  ARGUMENTS:
  * URL: url of light novel to download
  * PATH: directory to store the light novel

Options:
  --title TEXT       title of light novel
  --authors TEXT     (optional) authors' names, separated by comma (,)
  --identifier TEXT  (optional) identifier of light novel
  --cover_link TEXT  (optional) cover_link of light novel. cover_link can
                     either be web link or file path. if it is not beginned
                     with "http", it would be recognized as file path. if
                     nothing was given, then it will use the first picture of
                     webpage.

  --help             Show this message and exit.

注意:命令的 options 可以直接忽略,因为执行命令后如果发现没有 options 会进行第二轮询问。

TODO

  • 图片下载至临时路径
  • 用 PyQt 写 GUI
  • 为漫画提供更好的支持
  • 增加更多 metadata : tags, publisher, ...
  • 自动抓取标题
  • 自动生成目录,如果网页上有 headers 的话
  • 添加自定义 CSS / 字体 等支持
  • 简繁自动转换

相关帖子:

You might also like...
epub2sphinx is a tool to convert epub files to ReST for Sphinx
epub2sphinx is a tool to convert epub files to ReST for Sphinx

epub2sphinx epub2sphinx is a tool to convert epub files to ReST for Sphinx. It uses Pandoc for converting HTML data inside epub files into ReST. It cr

[Unofficial] Python PEP in EPUB format

PEPs in EPUB format This is a unofficial repository where I stock all valid PEPs in the EPUB format. Repository Cloning git clone --recursive git@gith

Creating an Audiobook (mp3 file) using a Ebook (epub) using BeautifulSoup and Google Text to Speech

epub2audiobook Creating an Audiobook (mp3 file) using a Ebook (epub) using BeautifulSoup and Google Text to Speech Input examples qual a pasta do seu

Prime Path Generator is a prime path generator used to generate prime paths.

Prime Path Generator is a prime path generator used to generate prime paths.

ANKIT-OS/TG-SESSION-GENERATOR-BOTbisTG-SESSION-GENERATOR-BOT a special repository. Its Is A Telegram Bot To Generate String Session
ANKIT-OS/TG-SESSION-GENERATOR-BOTbisTG-SESSION-GENERATOR-BOT a special repository. Its Is A Telegram Bot To Generate String Session

ANKIT-OS/TG-SESSION-GENERATOR-BOTbisTG-SESSION-GENERATOR-BOT a special repository. Its Is A Telegram Bot To Generate String Session

QR-Generator - An awesome QR Generator to create or customize your QR's
QR-Generator - An awesome QR Generator to create or customize your QR's

QR Generator An awesome QR Generator to create or customize your QR's! Table of

BTC-Generator - BTC Generator With Python

Что такое BTC-Generator? Это генератор чеков всеми любимого @BTC_BANKER_BOT Для

NFT Generator - A NFT Generator created using Python

NFT_Generator v1 An NFT Generator created using Python. This NFT Generation tool

NFT Generator: A modular NFT generator application

NFT Generator A simple passion project done with the role to learn a bit about h

Simple ONNX operation generator. Simple Operation Generator for ONNX.
Simple ONNX operation generator. Simple Operation Generator for ONNX.

sog4onnx Simple ONNX operation generator. Simple Operation Generator for ONNX. https://github.com/PINTO0309/simple-onnx-processing-tools Key concept V

A curated list of awesome tools for Sphinx Python Documentation Generator

Awesome Sphinx (Python Documentation Generator) A curated list of awesome extra libraries, software and resources for Sphinx (Python Documentation Gen

Literate-style documentation generator.

888888b. 888 Y88b 888 888 888 d88P 888 888 .d8888b .d8888b .d88b. 8888888P" 888 888 d88P" d88P" d88""88b 888 888 888

Python avatar generator for absolute nerds

pagan Welcome to the Python Avatar Generator for Absolute Nerds. Current version: 0.4.3 View the change history here. Remember those good old days whe

Python QR Code image generator

Pure python QR Code generator Generate QR codes. For a standard install (which will include pillow for generating images), run: pip install qrcode[pil

Simple, lightweight, and magic-free static site/blog generator for Python coders

makesite.py Take full control of your static website/blog generation by writing your own simple, lightweight, and magic-free static site generator in

A static website and blog generator
A static website and blog generator

Nikola, a Static Site and Blog Generator In goes content, out comes a website, ready to deploy. Why Static Websites? Static websites are safer, use fe

Static site generator that supports Markdown and reST syntax. Powered by Python.

Pelican Pelican is a static site generator, written in Python. Write content in reStructuredText or Markdown using your editor of choice Includes a si

Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.
Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.

Mimesis - Fake Data Generator Description Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes

Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.
Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.

Mimesis - Fake Data Generator Description Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes

Comments
  • Refactor Roadmap

    Refactor Roadmap

    • Load & Store Architecture
      • [x] 将原来的 cli 也设计成可以 dump 的
      • [x] 给原来的 cli 设计 dump 目录
      • [x] 图片不要下在 temp path
      • [x] 每下完一张图片就替换掉 src 然后 dump 新的 html
      • [x] 将 download_image 从 write_epub 中分离,write_epub 只接受本地 image
      • [x] 给原来的 cli 添加 html-dump
    enhancement 
    opened by JeffersonQin 0
Releases(v0.1)
Owner
gyro永不抽风
OIer | Amateur Programer | osu! | 宅 | 高三
gyro永不抽风
[Unofficial] Python PEP in EPUB format

PEPs in EPUB format This is a unofficial repository where I stock all valid PEPs in the EPUB format. Repository Cloning git clone --recursive git@gith

Mickaël Schoentgen 9 Oct 12, 2022
A curated list of awesome tools for Sphinx Python Documentation Generator

Awesome Sphinx (Python Documentation Generator) A curated list of awesome extra libraries, software and resources for Sphinx (Python Documentation Gen

Hyunjun Kim 831 Dec 27, 2022
Literate-style documentation generator.

888888b. 888 Y88b 888 888 888 d88P 888 888 .d8888b .d8888b .d88b. 8888888P" 888 888 d88P" d88P" d88""88b 888 888 888

Pycco 808 Dec 27, 2022
API spec validator and OpenAPI document generator for Python web frameworks.

API spec validator and OpenAPI document generator for Python web frameworks.

1001001 249 Dec 22, 2022
Documentation generator for C++ based on Doxygen and mosra/m.css.

mosra/m.css is a Doxygen-based documentation generator that significantly improves on Doxygen's default output by controlling some of Doxygen's more unruly options, supplying it's own slick HTML+CSS generation and adding a fantastic live search feature.

Mark Gillard 109 Dec 7, 2022
Dynamic Resume Generator

Dynamic Resume Generator

Quinten Lisowe 15 May 19, 2022
Swagger Documentation Generator for Django REST Framework: deprecated

Django REST Swagger: deprecated (2019-06-04) This project is no longer being maintained. Please consider drf-yasg as an alternative/successor. I haven

Marc Gibbons 2.6k Jan 3, 2023
Markdown documentation generator from Google docstrings

mkgendocs A Python package for automatically generating documentation pages in markdown for Python source files by parsing Google style docstring. The

Davide Nunes 44 Dec 18, 2022
Word document generator with python

In this study, real world data is anonymized. The content is completely different, but the structure is the same. It was a script I prepared for the backend of a work using UiPath.

Ezgi Turalı 3 Jan 30, 2022
Convert ACSM files to DRM-free EPUB files with one command on Linux

Knock Convert ACSM files to DRM-free EPUB files using one command. This software does not utilize Adobe Digital Editions nor Wine. It is completely fr

Benton Edmondson 622 Dec 9, 2022