Git Product home page Git Product logo

dartbook's Introduction

Dartbook is a dart implementation of gitbook-cli for guys who loves gitbook.

Multilingual Entry

Book page looking

Installation

  • Requirement: Dart sdk >= 3.0

dartbook should be "activated".

$ dart pub global activate dartbook
$ export PATH=$PATH:~/.pub-cache/bin

Create a book

set up a boilerplate book:

$ dartbook init

Preview and serve your book using:

$ dartbook serve

Build the static website using:

$ dartbook build

Show what have changed in one document:

$ dartbook diff [file1] [file2] ...

Nearly same with gitbook!

Feature

  • Write using Markdown
  • Patch diff of characters
  • Output as a website or ebook (pdf, epub, mobi)
  • Multi-Languages
  • Lexicon / Glossary
  • Variables and Templating
  • Content References
  • Material default theme

Why

Dartbook aims to smooth the migration from GitBook (Legacy) to Dart.

gitbook-cli stopped developping since 5 years ago, it was used widely but with many shortage.

First, it is very slow, especially for those books containing over 100 pages, in my case, it cost over 5 minutes for my project, which contains 3 language books, 168 pages for each.

Second, it contains some issues, e.g. glossary matching in different lingual text.

There is a nodejs project forked of gitbook called honkit, but it inherits bugs and errors since gitbook, and its update and bug-fixing is not so active.

What

Try to keep everything same with gitbook, dartbook is compatible to run existing book projects. A little differences are:

  1. No glossary generated page. All glossary entries are shown as tooltip, no more link jumping.

  2. Encoding text as slug id. In different lingual text, many glossories contain special characters.

  3. No mulilingual book any more in code, every book is managed by BookContext. langPath of Book is '' if book is located in project root.

  4. Book navigation would ignore invalid link article.

  5. No more font-sizing, theme-changing settings config, but they would come back in the future if new UX design appears.

Theme development

If you would like to develop your own dartbook theme, go to dartbook-theme.

Patch diff

Git diff is based on line, that means whole line would be labeled even if one character is changed, it is extremely inconvenient to find what we haved revised when doing authoring work. Thanks to google-diff-match-patch, we could clearly take on the text change.

Just change command git diff [<options>] to dartbook diff [<options>], it would output precisely the revised character.

plugins system

It is very powerful to use plugins to extend applications, but currently we had no plan for it.

dartbook's People

Contributors

lindeer avatar

Stargazers

Mukti avatar Pengji Du avatar  avatar  avatar Chengxi Gu avatar  avatar Sandeepin avatar  avatar  avatar  avatar Power Lin avatar  avatar  avatar Matt Reach avatar Simon avatar yjz0065 avatar crstdo avatar  avatar  avatar  avatar Alan avatar  avatar allen.hu avatar Asahina_1096 avatar ww avatar Hugh Liu avatar  avatar DchG avatar 王五 avatar 橘梧 avatar  avatar Yeqi Huang avatar zhaoolee avatar  avatar  avatar Lamries avatar recar avatar Sunniberg avatar LiTong avatar itech001 avatar wz5891 avatar String S. avatar Haoyi HAN avatar 钟宬 avatar  avatar LPZ avatar  avatar alwayrun avatar flying ape avatar RangeChoi avatar jump-and-jump avatar Joe avatar 唐墨夏 avatar Gundy avatar Kaixinguo avatar Wendy avatar  avatar  avatar Jaya avatar

Watchers

 avatar

Forkers

bbz525 ossoen

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.