Giter Club home page Giter Club logo

book-writing-kit's Introduction

Book Writing Start Kit

Markdown으로 집필한 책을, Gitbook 과 Pandoc 을 이용하여 .pdf, .epub, .mobi, .docx 로 출판하려는 집필자를 위한 집필 스타트 킷이다.

블로그 포스트에서 자세한 설명을 확인할 수 있다.

1. 프로젝트 생성

이 스타트 킷을 복제하여 집필 프로젝트를 시작한다. (프로젝트 디렉터리를 my-book 이라 가정한다.)

$ git clone https://github.com/appkr/book-writing-kit.git my-book

2. Gitbook, Pandoc 설치

이 스타트 킷은 아래 도구들과 함께 동작한다(Mac 운영체제 기준).

$ npm install gitbook-cli --global
$ npm install svgexport --global
$ brew install Caskroom/cask/calibre
$ brew install pandoc

3. 집필

_draft 디렉터리에 마크다운 형식으로 집필한다. 여러 개의 파일로 쪼개서 집필한다면, SUMMARY.md, build.sh 파일을 열어 집필한 파일 이름을 추가해 준다.

<!--// SUMMARY.md-->

-   [Chapter 1](_draft/chapter1.md)
-   [Chapter 2](_draft/chapter2.md)
-   [Chapter 3](_draft/chapter3.md)
-   ...
# build.sh

pandoc --verbose --smart --reference-docx=reference.docx --output=../_build/my-book.docx\
    ../README.md \
    ../SUMMARY.md \
    chapter1.md \
    chapter2.md \
    chapter3.md \
    ...
;;

4. 전자책 출판

처음 한 번은 Gitbook 플러그인을 설치해야 한다.

$ cd my-book
$ gitbook install

아래 명령으로 출판한다. 출판된 파일은 _build 디렉터리에서 찾을 수 있다.

$ bash build_all.sh

- OR -

$ bash build.sh {docx|pdf|epub|mobi}

Happy writing~

book-writing-kit's People

Contributors

appkr avatar

Watchers

James Cloos 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.