devlato / github-book

Command-line util that builds a PDF directly from a GitHub repo's markdown files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Book

Generate a PDF book from GitHub repo URL

Build Status Coverage Status Code Climate Issue Count npm version

Dependencies:

The project depends on the following technologies and libraries:

  • Node.js;
  • TypeScript;
  • jest and ts-jest;
  • ts-node-dev;
  • tslint and tslint-config-airbnb.

As you see, there no dependencies but various dev tools.

Installation

(These installation instructions would be valid after publishing, so the package name could change).

Let's consider you use Yarn as your package manager. If you use npm, it would pretty easy for you to translate the commands using this cheatsheet.

To install it as a global binary, use the following command:

$ yarn global add github-book

To install it as your project dependency, run:

$ yarn add github-book

Usage

If you have the package installed globally, you can use github-book as binary name. Otherwise keep in mind that you can use ./node_modules/github-book/dist/index.js or yarn start (in development mode) instead of github-book.

$ github-book --help

  Syntax: github-book [options]
  Options:
  --url:         [*] URL of the GitHub repo
  --out-file:    [*] Output file path
  
  --version          Print package version
  --help             Print this help message

Currently the library has limitation: the repo should be public.

Building the project

It is recommend to manage Node versions with NVM.

After cloning the project, run

$ yarn

to install the project dependencies. Project has only development dependencies: TypeScript, tslint, jest, etc. As the command succeeded, type

$ yarn build

to build the project locally.

Copyright

Author: Denis Tokarev (@devlato)

License: MIT

About

Command-line util that builds a PDF directly from a GitHub repo's markdown files

License:MIT License


Languages

Language:JavaScript 100.0%