This repository contains the gitbook sources for the documentation and OER regarding only the second version of senseBox that comes with the senseBox MCU instead of Arduino/Genuino Uno.
There are seperate branches for each book inside this repository. These books are gitbooks consisting of markdown files. There are four books until now:
Additionally, there is a gh-pages branch. This is where all the builded gitbooks are stored as static html files and hosted from.
To avoid redundant data all pictures used in all senseBox books are stored in one single pictures-folder in the gh-pages branch instead of directly inside each book branch.
We use the node.js-based tool GitBook for rendering of the content.
To live-preview or render a book, you need the npm package gitbook-cli
.
Follow these instructions or have a look at the official documentation.
Install node.js and npm package.
# Mac OSX.
$ brew install node npm
# Ubuntu.
$ sudo apt-get install nodejs npm
Install n with npm.
$ sudo npm install n -g
Downgrade node.js to v5.12.0. (see Build error with node v6 · Issue #1)
$ n 5.12.0
Install gitbook-cli package.
$ sudo npm install -g gitbook-cli
Clone this repository with the following command:
$ git clone https://github.com/sensebox/books-v2.git
to your computer. Change into the created folder with:
$ cd books-v2
To get a live preview of a books website-output, run:
gitbook install # only required once
gitbook serve
To get a PDF version of a book you need to follow these instructions in addition to the setup of github (see above):
Install necessary package with npm.
$ gitbook install
Check version.
$ gitbook -V
CLI version: 2.3.0
GitBook version: 3.1.1
Install calibre for build pdf, epub and mobi.
Link calibre command line tool.
# neccessary in Mac OSX only
$ ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin/
Run the following commands:
git checkout <BRANCH_NAME> # use either `home` or `edu` as branch_name
gitbook ./ <BOOK_NAME>.pdf # choose your pdf name here
GitBook provides the output formats website
, pdf
and ebook
.
To render a book run:
gitbook install # only required once
gitbook build # build the website
gitbook pdf # build the pdf
gitbook epub # build the ebook
Each (multilingual) book resides on its own branch.
Currently these are edu
,home
, osem
and blockly
, each containing a de
and en
language book.
The german versions have more content, while the english versions are steadily supplemented from there.
Files that are parsed specially by GitBook have a filename in caps:
LANGS.md
: defines the languages of a multilingual bookREADME.md
: the landingpage of a book, eg an introductionSUMMARY.md
: the table of contents, rendered as the left navbarGLOSSARY.md
: a glossary, whose terms are referenced on all other book pagesFOOTER.md
: the page footer on any pageStylesheets applied on all books are in ./styles
, and are symlinked into each book (unix only).
Currently the books are built and hosted by gitbook.com.
A commit on each of the
The pdf builds however are built on travis to support custom cover pages. These builds are autocommited into the gh-pages
branch.
See LICENSE file.