Merge changes from master
This commit is contained in:
commit
1e2df2dd49
|
@ -5,8 +5,6 @@ LABEL maintainer="github.google-sre-ebook@captnemo.in"
|
|||
|
||||
ARG DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
COPY . /src/
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
@ -19,10 +17,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
zlib1g-dev \
|
||||
file \
|
||||
&& gem install bundler --no-ri --no-rdoc \
|
||||
&& bundle install \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . /src/
|
||||
|
||||
RUN bundle install
|
||||
|
||||
ENTRYPOINT ["/src/bootstrap.sh", "docker"]
|
||||
|
||||
VOLUME ["/output"]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
mini_portile2 (2.3.0)
|
||||
nokogiri (1.8.4)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
mini_portile2 (2.4.0)
|
||||
nokogiri (1.10.1)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -12,4 +12,4 @@ DEPENDENCIES
|
|||
nokogiri
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.3
|
||||
2.0.1
|
||||
|
|
23
README.md
23
README.md
|
@ -12,14 +12,14 @@ Original sources are downloaded from https://landing.google.com/sre/
|
|||
|
||||
Requirements:
|
||||
|
||||
- Docker
|
||||
- Docker
|
||||
|
||||
```
|
||||
$ docker run --rm --volume "$(pwd):/output" captn3m0/google-sre-ebook:latest
|
||||
```
|
||||
|
||||
- You should see the final EPUB/MOBI/PDF files in the `output` directory after the above runs.
|
||||
- The file may be owned by the root user.
|
||||
- You should see the final EPUB/MOBI/PDF files in the `output` directory after the above runs.
|
||||
- The file may be owned by the root user.
|
||||
|
||||
**NOTE:** You'll have to allow docker access to a directory that's local to your system. The safest way to do this is as follows:
|
||||
|
||||
|
@ -37,18 +37,17 @@ Review and run the `bootstrap.sh` script to generate the EPUB, MOBI, and PDF fil
|
|||
|
||||
Requirements:
|
||||
|
||||
- Ruby
|
||||
- `gem install bundler`
|
||||
- `gem install nokogiri`
|
||||
- `brew install pandoc`
|
||||
- `brew cask install calibre`
|
||||
- `brew install wget`
|
||||
- Ruby
|
||||
- `gem install bundler`
|
||||
- `gem install nokogiri`
|
||||
- `brew install pandoc`
|
||||
- `brew cask install calibre`
|
||||
- `brew install wget`
|
||||
|
||||
# Known Issues
|
||||
|
||||
- Inline references are not handled in the best possible way
|
||||
- metadata.xml is not complete. There are just too many authors
|
||||
- Foreword/Preface is not part of the index
|
||||
- metadata.xml is not complete. There are just too many authors
|
||||
- Foreword/Preface is not part of the index
|
||||
|
||||
# LICENSE
|
||||
|
||||
|
|
13
bootstrap.sh
13
bootstrap.sh
|
@ -52,20 +52,19 @@ for FILE_NAME_FULL in ${IMGS_FILES}; do
|
|||
|
||||
done
|
||||
|
||||
#
|
||||
ruby generate.rb
|
||||
|
||||
#
|
||||
pushd html/landing.google.com/sre/${BOOK_NAME}/toc
|
||||
pandoc -f html -t epub -o ../../../../../${BOOK_FILE}.epub --epub-metadata=../../../../../metadata.xml --epub-cover-image=../../../../../cover.jpg complete.html
|
||||
pushd html/landing.google.com/sre/${BOOK_FILE}/toc
|
||||
pandoc --from=html --to=epub \
|
||||
--output=../../../../../${BOOK_FILE}.epub \
|
||||
--epub-metadata=../../../../../metadata.xml \
|
||||
--epub-cover-image=../../../../../cover.jpg \
|
||||
complete.html
|
||||
popd
|
||||
|
||||
#
|
||||
for EXTENSION in mobi pdf; do
|
||||
ebook-convert ${BOOK_FILE}.epub ${BOOK_FILE}.${EXTENSION}
|
||||
done
|
||||
|
||||
#
|
||||
if [ "$1"=="docker" ]; then
|
||||
chown -v $(id -u):$(id -g) ${BOOK_FILE}.*
|
||||
mv -f ${BOOK_FILE}.* /output
|
||||
|
|
Loading…
Reference in New Issue