Code Monkey home page Code Monkey logo

webiblo's Introduction

Webiblo - web to ebook project


Overview

Webiblo is a project to convert web sites to ebooks.

You can convert Getting Real web data to mobipcoket format like this.

$ webiblo.pl http://mizzy.org/webiblo/data/Getting_Real.json

JSON data format

JSON data format to convert web data to ebook is like this:

{
    "title"       : "Structure and Interpretation of Computer Programs",
    "authors"     : [
        "Harold Abelson",
        "Gerald Jay Sussman",
        "Julie Sussman"
    ],
    "cover_image"   : "http://mitpress.mit.edu/sicp/full-text/book/cover.jpg",
    "content_xpath" : "//div[@class=\"content\"]", # Optional
    "exclude_xpath" : "//div[@class=\"navigation\"]", # Optional
    "chapters" : [
        {
            "title" : "Foreword",
            "uri"   : "http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-5.html#%_chap_Temp_2"
        },
        {
            "title" : "1  Building Abstractions with Procedures",
            "uri"  : "http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-9.html#%_chap_1",
            "sections" : [
                "title" : "1.1  The Elements of Programming",
                "uri"   : "http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_sec_1.1"
                "subsections" : [
                    {
                        "title" : "1.1.1  Expressions",
                        "uri"   : "http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_sec_1.1.1"
                    },
                ]
            ]
        }
    ]
}

These are the examples.


Try your own JSON data

webiblo.pl takes JSON data from STDIN, so you can run webiblo.pl like this:

$ cat data.json | webiblo.pl

Share your JSON data

JSON data are put on gh-pages branch and shared on GitHub Pages.

If you create a JSON data for webiblo, please send me pull requests.


TODO

  • Support formats other than mobipocket. (eg. EPUB3)
  • Search JSON catalog from CLI.

webiblo's People

Contributors

mizzy avatar

Stargazers

 avatar

Watchers

 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.