Giter VIP home page Giter VIP logo

aozora2odt's Introduction

Aozora ruby -> *.odt converter.

I've wrote it to convert some of the Aozora's txt books to more nice format for my pocket book reader.

Usage is simple:

  python aozora2odt.py -C <codepage> -T template.odt -o output.odt input.txt

This command will read file "input.txt", encoded in the "<codepage>" encoding (usually youw ill use shift-jis, utf-8, or other Japanese encoding), and creates file "output.odt", using "template.odt" as template.

Each argument, except for the input file name, may be ommited. Default codepage is utf-8.

Any *.odt file can be used as template. You would probably use empty file, though it is not required. Redefine "Default" style in this file to apply formatting to your document. Using tempalte, you can define fonts, styles, page size and other document parameters. It is recommended to use template with some fine Japanese font specified, because default results are somewhat ugly, at least at my computer.


You can process many files at once. In this case, do not use "-o" option. If output file is not specified, it is created in the current directory, with the same name as the input file, but extension replaced to ".odt".

This module requires odfpy module for generating and reading odf. See http://odfpy.forge.osor.eu/

Author: shintyakov <at-mark> gmai.com

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.