GithubHelp home page GithubHelp logo

pipin68k / pyaozora Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ymndoseijin/pyaozora

0.0 0.0 0.0 26 KB

aozoraのXHTMLリンクからEPUB3に

License: GNU General Public License v3.0

Python 100.00%
aozorabunko epub3 python

pyaozora's Introduction

pyaozora

青空文庫のXHTMLをEPUB3に変換

主な変更点

  • JIS X0213 対応表を利用した外字対応
  • 青空文庫上で目次がない図書への対応
  • 青空文庫へのアクセスをキャッシュ化
  • ePubのスタイルをシンプルに
  • ePubの目次を変換しない

セットアップ

「プロジェクトX0213」から JIS X0213 対応表 を取得してください。

Invoke-WebRequest -Uri http://x0213.org/codetable/jisx0213-2004-std.txt -OutFile 'jisx0213-2004-std.txt'

あとは、pip だけでセットアップできます。dataclass を使っているので、Python 3.7以降。

pip install -r requirements.txt

使い方

-tが縦書きの設定です。 デフォルトは横書き。 -oプログラムの出力ファイルの設定です。デフォルトは $題名.epub です。

python pyaozora -t https://www.aozora.gr.jp/cards/000096/files/2381_13352.html

参照サイト

pyaozora's People

Contributors

ymndoseijin avatar pipin68k 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.