node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

bookiza

Bookiza

Quick and beautiful books. Everywhere. Responsive by default.

Bookiza is a book baking tool. It is a lightweight javascript (node 6+) framework that helps you compose books, magazines and comics (SPAs).

Travis Commitizen friendly npm alt tag

Advantage

Bookiza cuts your book writing & publishing time down by half. By HALF!, no less. Bringing in some of the best design and development techniques in the world, bookiza will turn your saga into a timeless product, an eternal journey of … no wait, an offline-first, well-paginated simple book app.

Get your developer & designer friends to work and collaborate with you.

Produce delightful books that work everywhere!

Visit the Bookiza Website for more details.

Support

Books written using Bookiza are supported on every major device, tablet and desktop out there. All it needs is a modern browser and an Internet connection (This will change!).

Here are some demo books created by our community.

Despite ubiquity our effort with superbooks points mostly to yielding best reading experiences on tablets i.e. iPads(iOS 7+), Kindle 3 (Silk) and Android 5.0+ phablets. Because, well, even though it's great to support desktops, smartphones, TVs and whatnot, the most ideal situation and surface for reading books is the tablet.

Documentation

Full documentation is available here and here and here.

A quick tutorial on how to write superbooks is here.

What you'll need

node > 6.2.1, git-scm, bubblin's api_key and a unixy-style shell/terminal.

Setup

$ npm install -g bookiza

You'll need to install bookiza and shelljs as global.

Check installation with:

$ bookiza --version

Register client with:

$ bookiza register or $ b z

Provide your Bubblin credentials to connect to its sweet POST API. You're all set!

To check:

$ bookiza whoami or $ b w

Getting started

To bootstrap new project, run:

$ bookiza new MY-AWESOME-BOOK --leafs 12 --template comics        # Creates a project with 12 fresh leafs (24 pages) inside `manuscript/` and applies a `comics` template.

cd into the project and:

$ bookiza server                  # Opens http://localhost:4567 on your browser!

Open the project on your favorite text editor (Sublime/Atom) and write away! Once you're ready (or even if you're not) hit:

$ bookiza publish

Your book will be POST'ed / PATCH'ed over Bubblin instantly, in real time. Keep updating!

To see full CLI documentation with:

$ bookiza --help 

That's it.

Templates

Bookiza comes along with several FREE, responsive and scalable templates so that you don’t have to do the layouts yourself.

Feel free to use templates to kickstart your book/magazine in a best possible way and ensure that your work is responsive and scalable on as many devices as possible.

We’re accepting new templates for all kinds of longform. Feel free to fork and submit pull requests per following rules for any kind of book that you may have worked on.

Configuration

Bookiza and Bubblin default to only the building blocks of web i.e. HTML, CSS & JavaScript. Infact Bubblin accepts only clean and compiled HTML, CSS & JS to render books.

No preprocessor jugglery is allowed on live books that're meant for the readers!

Bookiza lets you compose your manuscript with any preprocessor or engine you like. There are two ways to configure Bookiza so as to cater to your most general writing needs and at times, needs that are specific to a particular book.

.bookizarc

When you register bookiza ($ bookiza register or $ b z ) it will automatically set up the following global runcom (.rc) file at the root. Bookiza will pick up the mode for its generators from this arc file.

# $ vi .bookizarc
 
{
  "token": "",
  "username": "",
  "email": "",
  
  "mode": {
    "HTML": "html",   # markdown, haml, pug etc.
    "CSS": "css",
    "JS": "js",
    "HEAD": "html"
  },
 
  "urls": {
    "registrationURL": "https://bubbl.in/api/register",
    "baseURL": "https://bubbl.in/api/books/"
  }
}
 

As you can see, configuring bookiza is as simple as setting the mode to use preprocessors of your liking. See full list of templating engines & preprocessors that are currently available.

.bookrc

Similarly, editing mode can also be set on per book basis with the following rc configuration inside the root of your project:

# $ vi .bookrc
 
{
  "mode": {
    "HTML": "html",
    "CSS": "css",
    "JS": "js",
    "HEAD": "html"
  }
}
 

In case of conflict of modes between .bookrc and .bookizarc the book_level configuration i.e. .bookrc shall prevail.

What is Bookiza?

Bookiza is an open source book writing framework that makes your life easy. Be up and running with a manuscript in seconds and publish some of the best most crazy beautiful books that ever existed.

Books baked with Bookiza use building-blocks of web i.e. HTML, CSS and JavaScript (Yeah, we got JS inside e-books!) so now you can spice up your story with underlying code, dynamic illustrations, data visualizations, interactive graphs, visual explanations and what not.

Get the whole web inside your book!

Check out our demo book on your iPad, for example.

Why a framework & not wordprocessor?

We wanted to be able to write any kind of book — comics, scientific journals, magazines, novels, schoolbooks, textbooks - using the awesomeness of web.

Wordprocessors trump the flexibility that is required for books, comics & magazines that artists all over the world can create. That's not surprising because wordprocessors originally were meant for enterprise documentation (bureaucracy?) only. For things like purchase orders, contracts or legalese which has nothing to do with nice and creative books.

We also wanted books to feel native on the new web -- not like websites that pretend to be books. Be one that handles long form correctly and scales across all the devices and desktops out there, ala - responsive, adaptive and scalable (with or without touch capability).

🤘👉 A framework with a powerful CL interface also ensures that we can use our existing developer toolchain to mint and print books.

What it is not.

📖 Bookiza is not yet another javascript framework (thankfully) for mobile or app development. It doesn't prescribed a pattern or emphasizes MVC or anything like that. Bookiza is also not a blogging solution. If you wish to write short-form essays or blogposts of upto 3-4 pages (or so) we recommend you to go for a blog instead.

At the moment bookiza will bake manuscripts that are at least 4 pages long. Read more about Superbooks on Bubblin.

Obsession

Bookiza is obsessive about live book editions and quick manuscript turnarounds. Using instant edit2publish state of web to the maximum. Our goal is to optimize books on the web, make it friendlier for people to read, write and connect. Provide a flexibility that book writers haven't had for the last twenty years. A framework that decidely leaves behind the old-school idea of downloading-a-lifeless-artifact called ebook that is nothing but a dull file sponsored by an even older lobby group that wants physical books to thrive and remain on top!.

We want to focus on a future where web and books are unified, in a single resource that is both accessible and available everywhere.

Features

  • Responsive container by default
  • Cover on all major devices and browsers
  • Support beautiful typography with @font-faces
  • Allow CDN resources for quick load
  • Open once, offline forever without needing to download any artifact
  • Modular pages that follow web standards
  • Visual explanations with in-page JavaScript
  • Full-bleed imagery for fashion/lifestyle journals
  • Support for WebGL, CSS3 or other HTML5 experiments.
  • Searchable & indexable content
  • Simplicity of git
  • Push2Deploy with real-time editions

The library

Books created via Bookiza can be published directly to bubblin - our substrate platform for book lovers. Or you can host it on your own website!

Find a selection of exclusive and handpicked books by our community of writers.

The community

Authors

Created & maintained by Marvin Danig.

Pull requests, issues, contribution and donations are very welcome. Feedback is welcome from both developers & designers!

See the list of contributors.

Further development

Our motto: "Books should be a first class citizen of the web" -- let web & books be together, like a single unified resource -- both accessible and open!

We're also working on a draft proposal for spine_url to bring native support of books on the web -- like single page apps.

Dependencies

async, superagent, progress, co-prompt, co, path, fs, chalk, commander, string, dateformat, shelljs, os-homedir

Bookiza Commit Conventions

  • PR branches must work everywhere: i.e. should have been tested on all browsers on OSX, Windows & Linux.
  • Commit messages must explain whys & whats. Please lint your JS before submitting your features.
  • Provide system related information of the dev machine(OS/Browser/Screen).

Up next

  • Introduce preprocessors inside page generators
  • TODO: Consider introducing cover attributes within ambit of JSON. Or not.

LICENSE

TBD. UNLICENSED