Merge changes from master

This commit is contained in:
Nemo 2019-01-31 15:23:27 +05:30
commit 1e2df2dd49
4 changed files with 25 additions and 26 deletions

View File

@ -5,8 +5,6 @@ LABEL maintainer="github.google-sre-ebook@captnemo.in"
ARG DEBIAN_FRONTEND="noninteractive" ARG DEBIAN_FRONTEND="noninteractive"
COPY . /src/
WORKDIR /src WORKDIR /src
RUN apt-get update && apt-get install -y --no-install-recommends \ 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 \ zlib1g-dev \
file \ file \
&& gem install bundler --no-ri --no-rdoc \ && gem install bundler --no-ri --no-rdoc \
&& bundle install \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY . /src/
RUN bundle install
ENTRYPOINT ["/src/bootstrap.sh", "docker"] ENTRYPOINT ["/src/bootstrap.sh", "docker"]
VOLUME ["/output"] VOLUME ["/output"]

View File

@ -1,9 +1,9 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
mini_portile2 (2.3.0) mini_portile2 (2.4.0)
nokogiri (1.8.4) nokogiri (1.10.1)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.4.0)
PLATFORMS PLATFORMS
ruby ruby
@ -12,4 +12,4 @@ DEPENDENCIES
nokogiri nokogiri
BUNDLED WITH BUNDLED WITH
1.16.3 2.0.1

View File

@ -46,7 +46,6 @@ Requirements:
# Known Issues # Known Issues
- Inline references are not handled in the best possible way
- metadata.xml is not complete. There are just too many authors - metadata.xml is not complete. There are just too many authors
- Foreword/Preface is not part of the index - Foreword/Preface is not part of the index

View File

@ -52,20 +52,19 @@ for FILE_NAME_FULL in ${IMGS_FILES}; do
done done
#
ruby generate.rb ruby generate.rb
pushd html/landing.google.com/sre/${BOOK_FILE}/toc
# pandoc --from=html --to=epub \
pushd html/landing.google.com/sre/${BOOK_NAME}/toc --output=../../../../../${BOOK_FILE}.epub \
pandoc -f html -t epub -o ../../../../../${BOOK_FILE}.epub --epub-metadata=../../../../../metadata.xml --epub-cover-image=../../../../../cover.jpg complete.html --epub-metadata=../../../../../metadata.xml \
--epub-cover-image=../../../../../cover.jpg \
complete.html
popd popd
#
for EXTENSION in mobi pdf; do for EXTENSION in mobi pdf; do
ebook-convert ${BOOK_FILE}.epub ${BOOK_FILE}.${EXTENSION} ebook-convert ${BOOK_FILE}.epub ${BOOK_FILE}.${EXTENSION}
done done
#
if [ "$1"=="docker" ]; then if [ "$1"=="docker" ]; then
chown -v $(id -u):$(id -g) ${BOOK_FILE}.* chown -v $(id -u):$(id -g) ${BOOK_FILE}.*
mv -f ${BOOK_FILE}.* /output mv -f ${BOOK_FILE}.* /output