Compare commits
48 Commits
Author | SHA1 | Date |
---|---|---|
Nemo | f1e69acbe2 | |
Nemo | 82d22e9c02 | |
Nemo | 3efda8c00d | |
Justin Gorinsky | dcaaf336d1 | |
dependabot[bot] | c736f2c9a4 | |
Peter Gillich | d8a848cfe5 | |
dependabot[bot] | 8087055b50 | |
dependabot[bot] | 6ce887bc0b | |
dependabot[bot] | f7bf70a2d6 | |
dependabot[bot] | 4bd3237e93 | |
Nemo | d1580cd6e0 | |
dependabot[bot] | 42c5dbc990 | |
dependabot[bot] | efaa0b8a82 | |
dependabot[bot] | 0417040c96 | |
Nemo | e822596ca0 | |
Nemo | d477e657f5 | |
Nemo | 6f565ec85a | |
Nemo | 5dd7f8f1ae | |
dependabot[bot] | ea568b5b16 | |
dependabot[bot] | 613f2daa39 | |
dependabot[bot] | 1845e47107 | |
dependabot[bot] | f66ba6de96 | |
dependabot[bot] | 4db7b6fd5d | |
dependabot[bot] | 0d70812422 | |
dependabot[bot] | d230a45c84 | |
dependabot[bot] | df4ddb7ff4 | |
dependabot[bot] | f1fe87ee40 | |
dependabot[bot] | 3bc53035d5 | |
Nemo | ec94c91a95 | |
Nemo | d8f5a05356 | |
Nemo | eb0e9e660f | |
dependabot-preview[bot] | 424dff2098 | |
dependabot-preview[bot] | 1f6a79ffb0 | |
Michael Nolan | 546b8667e9 | |
Sam Mingo | 9a315907d1 | |
Sam Mingo | c4558ddea9 | |
Sam Mingo | 080af52a9d | |
dependabot-preview[bot] | 93db6b3491 | |
Nemo | 81abcd3491 | |
Nemo | 1664bd5b17 | |
Nemo | e88559fd00 | |
Nemo | e24c1ab587 | |
Nemo | 8ac81f6f7b | |
Mads H. Danquah | 2be3103c32 | |
dependabot-preview[bot] | 7fae963067 | |
Nemo | 1ea7af6995 | |
Sam Mingo | da6d5306a6 | |
Sam Mingo | e78ea16a17 |
|
@ -0,0 +1,3 @@
|
|||
ko_fi: captn3m0
|
||||
liberapay: captn3m0
|
||||
github: captn3m0
|
|
@ -0,0 +1,8 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: bundler
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "23:30"
|
||||
open-pull-requests-limit: 99
|
|
@ -0,0 +1,82 @@
|
|||
name: Container Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ruby" ]
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
# This is used to complete the identity challenge
|
||||
# with sigstore/fulcio when running outside of PRs.
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Install the cosign tool except on PR
|
||||
# https://github.com/sigstore/cosign-installer
|
||||
- name: Install cosign
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
|
||||
with:
|
||||
cosign-release: 'v2.1.1'
|
||||
|
||||
# Set up BuildKit Docker container builder to be able to build
|
||||
# multi-platform images and export cache
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
|
||||
|
||||
# Login against a Docker registry except on PR
|
||||
# https://github.com/docker/login-action
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Extract metadata (tags, labels) for Docker
|
||||
# https://github.com/docker/metadata-action
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
# Sign the resulting Docker image digest except on PRs.
|
||||
# This will only write to the public Rekor transparency log when the Docker
|
||||
# repository is public to avoid leaking data. If you would like to publish
|
||||
# transparency data even for private images, pass --force to cosign below.
|
||||
# https://github.com/sigstore/cosign
|
||||
- name: Sign the published Docker image
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
env:
|
||||
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
|
||||
TAGS: ${{ steps.meta.outputs.tags }}
|
||||
DIGEST: ${{ steps.build-and-push.outputs.digest }}
|
||||
# This step uses the identity token to provision an ephemeral certificate
|
||||
# against the sigstore community Fulcio instance.
|
||||
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
|
2
COPYING
2
COPYING
|
@ -1,7 +1,7 @@
|
|||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2015 Abhay Rana <me@captnemo.in>
|
||||
Copyright (C) 2021 Abhay Rana <me@captnemo.in>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -1,5 +1,4 @@
|
|||
# LTS Image
|
||||
FROM ubuntu:18.04
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
LABEL maintainer="github.google-sre-ebook@captnemo.in"
|
||||
|
||||
|
@ -10,14 +9,16 @@ WORKDIR /src
|
|||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
calibre \
|
||||
file \
|
||||
pandoc \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
lmodern \
|
||||
texlive-fonts-recommended \
|
||||
texlive-xetex \
|
||||
wget \
|
||||
zlib1g-dev \
|
||||
file \
|
||||
&& gem install bundler --no-ri --no-rdoc \
|
||||
&& gem update --system \
|
||||
&& gem install bundler --no-document \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -1,9 +1,11 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
mini_portile2 (2.4.0)
|
||||
nokogiri (1.10.9)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
mini_portile2 (2.8.5)
|
||||
nokogiri (1.16.3)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
racc (1.7.3)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -12,4 +14,4 @@ DEPENDENCIES
|
|||
nokogiri
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
2.2.5
|
||||
|
|
72
README.md
72
README.md
|
@ -1,16 +1,30 @@
|
|||
# Google SRE Book/s
|
||||
|
||||
Generates a EPUB/MOBI/PDF for the Google SRE Book/s.
|
||||
Generates a EPUB/MOBI/PDF for the Google SRE Books. Original sources are downloaded from https://sre.google/books/
|
||||
|
||||
Original sources are downloaded from https://landing.google.com/sre/books
|
||||
|
||||
Visit the [Releases](https://github.com/captn3m0/google-sre-ebook/releases) page to download the latest release.
|
||||
Visit the [Releases](https://github.com/captn3m0/google-sre-ebook/releases) page to download the latest release. Go through all the releases, and click "Assets" to view a list of files.
|
||||
|
||||
# Books
|
||||
|
||||
| Site Reliability Engineering (2016) | The Site Reliability Workbook (2018) |
|
||||
| :-------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a href="https://github.com/captn3m0/google-sre-ebook/releases"><img src="cover/sre-book.jpg" width="320" alt="site reliability engineering cover" /></a> | <a href="https://github.com/captn3m0/google-sre-ebook/releases"><img src="cover/workbook.jpg" width="320" alt="the site reliability workbook cover" /></a> |
|
||||
| <a href="https://github.com/captn3m0/google-sre-ebook/releases"><img src="cover/sre-book.jpg" width="320" alt="site reliability engineering cover" /></a><br> <a href="https://books.google.com/books?id=81UrjwEACAAJ">BUY</a> | <a href="https://github.com/captn3m0/google-sre-ebook/releases"><img src="cover/workbook.jpg" width="320" alt="the site reliability workbook cover" /></a><br> <a href="https://books.google.com/books?id=fElmDwAAQBAJ">BUY</a>|
|
||||
|
||||
A few other SRE books/reports are available as directly from Google or publishers. A few links point to Internet Archive. Links marked in 🔻 are currently down.
|
||||
|
||||
- [Building Secure & Reliable Systems](https://sre.google/books/building-secure-reliable-systems/) - [[PDF](https://sre.google/static/pdf/building_secure_and_reliable_systems.pdf)] [[EPUB](https://sre.google/static/pdf/building_secure_and_reliable_systems.epub)] [[MOBI](https://sre.google/static/pdf/building_secure_and_reliable_systems.mobi)] [[Google Books](https://www.google.com/books/edition/Building_Secure_and_Reliable_Systems/Kn7UxwEACAAJ?hl=en)] [[Amazon](https://www.amazon.com/dp/B088Y67XG4)] [[Kobo](https://www.kobo.com/in/en/ebook/building-secure-and-reliable-systems)]
|
||||
- [Training Site Reliability Engineers](https://sre.google/resources/practices-and-processes/training-site-reliability-engineers/) - [[PDF](https://googlesre.page.link/traininggh)] [[EPUB](https://sre.google/static/pdf/training-sre-epub.epub)]
|
||||
- [SLO Adoption and Usage in SRE](https://www.oreilly.com/library/view/slo-adoption-and/9781492075370/) - [[PDF](https://web.archive.org/web/20210702035314/https://static.googleusercontent.com/media/sre.google/en//static/pdf/slo-adoption-and-usage-in-sre.pdf)]
|
||||
- [Practical Guide to Cloud Migration](https://sre.google/resources/practices-and-processes/practical-guide-to-cloud-migration/) - [[PDF](https://sre.google/static/pdf/practical-guide-to-cloud-migration.pdf)] [[EPUB](https://sre.google/static/pdf/practical-guide-to-cloud-migration.epub)]
|
||||
- [Creating a Production Launch Plan](https://sre.google/resources/practices-and-processes/production-launch-planning/) - [[PDF](https://googlesre.page.link/plpgh)] [[EPUB](https://web.archive.org/web/20210702003102/https://sre.google/static/pdf/cplp-epub.zip)] [[MOBI](https://web.archive.org/web/20210102115046/https://sre.google/static/pdf/cplp-mobi.zip)]
|
||||
- [Case Studies in Infrastructure Change Management](https://get.oreilly.com/ind_case-studies-in-infrastructure-change-management.html) - [[PDF](https://web.archive.org/web/20210702035412/https://static.googleusercontent.com/media/sre.google/en//static/pdf/case-studies-infrastructure-change-management.pdf)]
|
||||
- [A Case Study in Community-Driven Software Adoption](https://www.oreilly.com/library/view/a-case-study/9781098114596/) - [[PDF](https://web.archive.org/web/20210702035416/https://static.googleusercontent.com/media/sre.google/en//static/pdf/community-driven-software-adoption.pdf)] [[EPUB](https://web.archive.org/web/20210702003151/https://sre.google/static/pdf/community-driven-software-adoption-epub.zip)] [[MOBI](https://web.archive.org/web/20210702003132/https://sre.google/static/pdf/community-driven-software-adoption-mobi.zip)]
|
||||
- [Incident Metrics in SRE](https://sre.google/resources/practices-and-processes/incident-metrics-in-sre/) - [[PDF](https://static.googleusercontent.com/media/sre.google/en//static/pdf/IncidentMeticsInSre.pdf)] [[EPUB](https://static.googleusercontent.com/media/sre.google/en//static/pdf/IncidentMeticsInSre.epub)]
|
||||
- [Engineering Reliable Mobile Applications](https://www.oreilly.com/library/view/engineering-reliable-mobile/9781492057444/) - [[PDF](https://web.archive.org/web/20211011151056/https://static.googleusercontent.com/media/sre.google/en//static/pdf/engineering-reliable-mobile-applications.pdf)] [[EPUB](https://web.archive.org/web/20210702082730if_/https://sre.google/static/pdf/engineering-reliable-mobile-applications-epub.zip)] [[MOBI 🔻](https://sre.google/static/pdf/engineering-reliable-mobile-applications-mobi.zip)]
|
||||
|
||||
You might also like:
|
||||
|
||||
- [Software Engineering at Google](https://abseil.io/resources/swe-book) [[PDF](https://github.com/abseil/abseil.github.io/raw/cd13b21daa6ec74155548241241693198c1b1264/resources/swe_at_google.2.pdf)] [[PDF-Archive](https://archive.softwareheritage.org/browse/content/sha1_git:80ee550c6bda571d4e9f56fc093243d31a90b651/raw/?filename=swe_at_google.2.pdf)] [[Read Online](https://abseil.io/resources/swe-book/html/toc.html)] [[O’Reilly](https://www.oreilly.com/library/view/software-engineering-at/9781492082781/)] [[Amazon](https://www.amazon.com/_/dp/1492082791)] [[Ebooks.com](https://www.ebooks.com/en-in/book/detail/209970024/)] [Generated EPUB/PDF](https://github.com/captn3m0/google-swe-ebook/)
|
||||
|
||||
# Build
|
||||
|
||||
|
@ -39,17 +53,16 @@ $ docker run --rm --volume "$(pwd):/output" -e BOOK_SLUG='srw_book' captn3m0/goo
|
|||
```
|
||||
$ mkdir /tmp/sreoutput
|
||||
$ chcon -Rt svirt_sandbox_file_t /tmp/sreoutput
|
||||
$ docker run --rm --volume "/tmp/sreoutput:/output" -e BOOK_SLUG='srw_book' captn3m0/google-sre-ebook:latest
|
||||
$ docker run --rm --volume "/tmp/sreoutput:/output" -e BOOK_SLUG='srw_book' ghcr.io/captn3m0/google-sre-ebook:ruby
|
||||
```
|
||||
|
||||
The build for the above Docker image can be audited at <https://hub.docker.com/repository/docker/captn3m0/google-sre-ebook/builds>.
|
||||
Builds on [Docker Hub](https://hub.docker.com/r/captn3m0/google-sre-ebook) are no longer maintained.
|
||||
|
||||
## macOS
|
||||
|
||||
Review and run the `generate.sh` script to generate the EPUB, MOBI, and PDF files
|
||||
## macOS / Linux
|
||||
|
||||
Requirements:
|
||||
|
||||
- Make
|
||||
- Ruby
|
||||
- `gem install bundler`
|
||||
- `bundle install`
|
||||
|
@ -57,6 +70,43 @@ Requirements:
|
|||
- `brew cask install calibre`
|
||||
- `brew install wget`
|
||||
|
||||
Run either of the following:
|
||||
|
||||
```bash
|
||||
# To download Site Reliability Engineering.
|
||||
BOOK_SLUG='sre_book' ./generate.sh
|
||||
|
||||
# To download The Site Reliability Workbook.
|
||||
BOOK_SLUG='srw_book' ./generate.sh
|
||||
```
|
||||
|
||||
### PDF options
|
||||
|
||||
Any option can be passed to `pandoc` by `PDF_OPT_` prefix, for example:
|
||||
|
||||
```sh
|
||||
PDF_OPT_GEOMETRY=margin=1.5cm \
|
||||
PDF_OPT_DOCUMENTCLASS=extbook \
|
||||
PDF_OPT_FONTSIZE=14pt \
|
||||
PDF_OPT_MAINFONT=LiberationSerif-Regular.ttf \
|
||||
PDF_OPT_MAINFONTOPTIONS=BoldFont=LiberationSerif-Bold.ttf,ItalicFont=LiberationSerif-Italic.ttf,BoldItalicFont=LiberationSerif-BoldItalic.ttf \
|
||||
PDF_OPT_MONOFONT=LiberationMono-Regular.ttf \
|
||||
PDF_OPT_MONOFONTOPTIONS=BoldFont=LiberationMono-Bold.ttf,ItalicFont=LiberationMono-Italic.ttf,BoldItalicFont=LiberationMono-BoldItalic.ttf \
|
||||
PDF_OPT_SANSFONT=LiberationSans-Regular.ttf \
|
||||
PDF_OPT_SANSFONTOPTIONS=BoldFont=LiberationSans-Bold.ttf,ItalicFont=LiberationSans-Italic.ttf,BoldItalicFont=LiberationSans-BoldItalic.ttf \
|
||||
BOOK_SLUG=sre_book ./generate.sh
|
||||
```
|
||||
|
||||
Default options passed to `pandoc` in `generate.sh` are overloaded by `PDF_OPT_` prefix, see `PDF_OPT_GEOMETRY` in above example.
|
||||
|
||||
Fonts in above axample are packed to `fonts-liberation2` on **Ubuntu**.
|
||||
|
||||
See more details:
|
||||
|
||||
* <https://pandoc.org/MANUAL.html#fonts>
|
||||
* <https://ctan.org/pkg/extsizes>
|
||||
* <https://ctan.org/pkg/fontspec>
|
||||
|
||||
# Known Issues
|
||||
|
||||
- metadata is not complete. There are just too many authors
|
||||
|
@ -69,4 +119,4 @@ This is licensed under WTFPL. See COPYING file for the full text.
|
|||
|
||||
## Extra
|
||||
|
||||
I have a list of my E-book publishing related projects at https://captnemo.in/ebooks/.
|
||||
I have a list of my E-book publishing related projects at https://captnemo.in/ebooks/. Links to other related books can be found at https://github.com/upgundecha/howtheysre#books-1
|
||||
|
|
4
books.sh
4
books.sh
|
@ -9,7 +9,7 @@ BOOKS=(
|
|||
BOOK_NAME=sre-book
|
||||
BOOK_NAME_FULL=Site Reliability Engineering
|
||||
BOOK_FILE=google-site-reliability-engineering
|
||||
BOOK_TOC_URL=https://landing.google.com/sre/sre-book/toc/index.html
|
||||
BOOK_TOC_URL=https://sre.google/sre-book/table-of-contents/index.html
|
||||
'
|
||||
|
||||
# Site Reliability Workbook
|
||||
|
@ -17,7 +17,7 @@ BOOKS=(
|
|||
BOOK_NAME=workbook
|
||||
BOOK_NAME_FULL=The Site Reliability Workbook
|
||||
BOOK_FILE=google-the-site-reliability-workbook
|
||||
BOOK_TOC_URL=https://landing.google.com/sre/workbook/toc/index.html
|
||||
BOOK_TOC_URL=https://sre.google/workbook/table-of-contents/index.html
|
||||
'
|
||||
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'fileutils'
|
|||
|
||||
# First we get the list of all the book sections:
|
||||
|
||||
Dir.chdir("html/landing.google.com/sre/%s/toc" % ENV['BOOK_NAME'])
|
||||
Dir.chdir("html/sre.google/%s/table-of-contents" % ENV['BOOK_NAME'])
|
||||
chapter_links = Nokogiri::HTML(open("index.html"))
|
||||
.css('#drop-down a')
|
||||
.map {|l| l.attribute('href').value}
|
||||
|
|
37
generate.sh
37
generate.sh
|
@ -12,10 +12,17 @@ export ${BOOKS[${BOOK_SLUG^^}]}
|
|||
# Common vars.
|
||||
IMGS_DOMAIN="lh3.googleusercontent.com"
|
||||
|
||||
PDF_OPTIONS=()
|
||||
for i in ${!PDF_OPT_*}; do
|
||||
declare -n val=$i
|
||||
key=${i#PDF_OPT_}
|
||||
PDF_OPTIONS+=("-V" "${key,,}=${val}");
|
||||
done
|
||||
|
||||
# Make sure that links are relative \
|
||||
# # Remove the /sre/ directories
|
||||
# Save stuff in html/ directory
|
||||
# Do not create a landing.google.com directory
|
||||
# Do not create a sre.google directory
|
||||
# Enable recursion, timestamping (--mirror)
|
||||
# Images are hosted elsewhere, download them as well.
|
||||
# We need to go up a level from /toc/ where we start
|
||||
|
@ -31,7 +38,7 @@ wget \
|
|||
--mirror \
|
||||
--no-verbose \
|
||||
--recursive \
|
||||
--domains=${IMGS_DOMAIN},landing.google.com ${BOOK_TOC_URL} || true
|
||||
--domains=${IMGS_DOMAIN},sre.google ${BOOK_TOC_URL} || true
|
||||
|
||||
#
|
||||
echo "Get working mode..."
|
||||
|
@ -53,8 +60,11 @@ for FILE_NAME_FULL in ${IMGS_FILES}; do
|
|||
FILE_TYPE=$(file -b -- "${FILE_NAME_FULL}" | cut -f1 -d " ")
|
||||
|
||||
# Rename and replace file.
|
||||
mv "${FILE_NAME_FULL}" "${FILE_NAME_FULL}.${FILE_TYPE,,}" &&
|
||||
grep -rl -- "${FILE_NAME_BASE}" ./html | xargs sed -i -- "s/${FILE_NAME_BASE}/${FILE_NAME_BASE}.${FILE_TYPE,,}/g"
|
||||
if grep -rl -- "${FILE_NAME_BASE}" ./html; then
|
||||
mv "${FILE_NAME_FULL}" "${FILE_NAME_FULL}.${FILE_TYPE,,}" &&
|
||||
grep -rl -- "${FILE_NAME_BASE}" ./html | xargs sed -i -- "s/${FILE_NAME_BASE}/${FILE_NAME_BASE}.${FILE_TYPE,,}/g"
|
||||
fi
|
||||
|
||||
|
||||
done
|
||||
|
||||
|
@ -66,19 +76,19 @@ fi
|
|||
# Generate epub from html.
|
||||
echo "Generate book ..."
|
||||
bundle exec ruby generate.rb
|
||||
pushd html/landing.google.com/sre/${BOOK_NAME}/toc
|
||||
pushd html/sre.google/${BOOK_NAME}/table-of-contents
|
||||
pandoc --from=html --to=epub \
|
||||
--output=../../../../../${BOOK_FILE}.epub \
|
||||
--epub-metadata=../../../../../metadata/${BOOK_NAME}.xml \
|
||||
--epub-cover-image=../../../../../cover/${BOOK_NAME}.jpg \
|
||||
--output=../../../../${BOOK_FILE}.epub \
|
||||
--epub-metadata=../../../../metadata/${BOOK_NAME}.xml \
|
||||
--epub-cover-image=../../../../cover/${BOOK_NAME}.jpg \
|
||||
--metadata title="$BOOK_NAME" \
|
||||
complete.html
|
||||
|
||||
# generate PDF from HTML
|
||||
pandoc --from=html --to=pdf \
|
||||
--output=../../../../../${BOOK_FILE}.pdf \
|
||||
--metadata title="$BOOK_NAME" \
|
||||
pandoc --from=html \
|
||||
--pdf-engine=xelatex \
|
||||
--output=../../../../${BOOK_FILE}.pdf \
|
||||
--metadata title="$BOOK_NAME" \
|
||||
--dpi=300 \
|
||||
-V book \
|
||||
--top-level-division=chapter \
|
||||
|
@ -86,13 +96,14 @@ pandoc --from=html --to=pdf \
|
|||
-V lang=en-US \
|
||||
-V classoption=oneside \
|
||||
-V titlepage=true \
|
||||
-V logo=../../../../../cover/${BOOK_NAME}.jpg \
|
||||
-V titlepage-background=../../../../../cover/${BOOK_NAME}.jpg \
|
||||
-V logo=../../../../cover/${BOOK_NAME}.jpg \
|
||||
-V titlepage-background=../../../../cover/${BOOK_NAME}.jpg \
|
||||
-V toc-own-page=true \
|
||||
-V footnotes-pretty=true \
|
||||
-V subparagraph \
|
||||
-V geometry=margin=2cm \
|
||||
-V fig_caption=false \
|
||||
${PDF_OPTIONS[@]} \
|
||||
--columns=60 \
|
||||
complete.html
|
||||
|
||||
|
|
Loading…
Reference in New Issue