Giter VIP home page Giter VIP logo

kindlebookhelper's Introduction

KindleBookHelper

Overview

Converts raw text file to MOBI html format that can be consumed by Kindle Previewer. It provides fairly basic formatting/functionality and only includes code for poetry at the moment. It will generate navigation, including a linkable table of contents to each poem. Some additional text can be included via the book metadata file.

Usage

  • -f JSON file with book metadata (required)
  • -e Text marking the end of each poem (optional; defaults to "[END]")
  • -p If provided, pauses the application after running (useful if running within an IDE)

Output

All files utilize an url-friendly version of the book title (lowercase with special characters and spaces encoded or removed)

  • book-title.opf Xml document that serves as the book's manifest. This is the file fed into Kindle Previewer.
  • book-title.ncx Xml document that lays out the book's navigation.
  • book-title.html Html document that has all content.
  • poetry.css Stylesheet used by book.

Notes

  • Program assumes that the first line is the name of the poem and that each stanza is separated by a line break
  • A unique identifier Id field will be generated on first run; be sure to clear it if re-using json for additional books.
  • CSS is initially pulled from the application DLL. It will not override it, so you can edit the file freely.

Examples

Book Metadata

{
  "RawFilePath": "G:\\Documents\\Books\\Book Title\\raw.txt",
  "Title": "Book Title",
  "CoverFileName": "cover.jpg",
  "Publisher": "Author Name or Company",
  "Creator": "Author Name",
  "Author": "Author Name",
  "AuthorAlphabetical": "Last, First",
  "AuthorDescription": "Author description",
  "AuthorWebsite": "Author web site (no http://)",
  "Forward": "Forward text"
}

Raw text file

A Title

First Line
Second Line

Another Stanza
Last Line

[END]

Another Title

Another line
Yet Another line
The line to end all lines

[END]

kindlebookhelper's People

Contributors

pdwetz avatar dependabot[bot] 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.