commit
7d0fe14980
|
@ -0,0 +1,18 @@
|
|||
FROM ubuntu:latest
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
calibre \
|
||||
pandoc \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
wget \
|
||||
zlib1g-dev
|
||||
|
||||
RUN gem install bundler --no-ri --no-rdoc
|
||||
|
||||
COPY . /
|
||||
|
||||
RUN bundle install
|
14
README.md
14
README.md
|
@ -6,6 +6,10 @@ Generates a EPUB/MOBI for the Google SRE Book.
|
|||
|
||||
Original sources are downloaded from https://landing.google.com/sre/
|
||||
|
||||
# Build
|
||||
|
||||
## macOS
|
||||
|
||||
Review and run the `bootstrap.sh` script to generate the EPUB and MOBI files
|
||||
|
||||
Requirements:
|
||||
|
@ -17,6 +21,16 @@ Requirements:
|
|||
- brew cask install calibre
|
||||
- brew install wget
|
||||
|
||||
## Docker
|
||||
|
||||
Requirements:
|
||||
|
||||
- Docker
|
||||
|
||||
```
|
||||
$ ./build_docker.sh
|
||||
```
|
||||
|
||||
# Known Issues
|
||||
|
||||
- Inline references are not handled in the best possible way
|
||||
|
|
|
@ -13,6 +13,6 @@ bundle install
|
|||
ruby generate.rb
|
||||
|
||||
pushd html/chapters
|
||||
pandoc -f html+smart -t epub+smart -o ../../google-sre.epub --epub-metadata=../../metadata.xml --epub-cover-image=../../cover.jpg sre.html
|
||||
pandoc -f html -t epub -o ../../google-sre.epub --epub-metadata=../../metadata.xml --epub-cover-image=../../cover.jpg sre.html
|
||||
popd
|
||||
ebook-convert google-sre.epub google-sre.mobi
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
docker build -t google-sre-ebook .
|
||||
docker run -i --rm -v "$(pwd):/output" google-sre-ebook sh -s <<EOF
|
||||
./bootstrap.sh
|
||||
chown -v $(id -u):$(id -g) /google-sre.*
|
||||
mv -f /google-sre.* /output
|
||||
EOF
|
Loading…
Reference in New Issue