commit 935b636d238e51a992f642a4cc543ee20b06eafb Author: Nemo Date: Sat Sep 16 21:52:31 2017 +0530 Initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ad208b7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +; +; Global Editor Config for Adaptive Labbers +; +; This is an ini style configuration. See http://editorconfig.org/ for more information on this file. +; +; Top level editor config. +root = true +; Always use Unix style new lines with new line ending on every file and trim whitespace +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +; Python: PEP8 defines 4 spaces for indentation +[*.py] +indent_style = space +indent_size = 4 +; Salt state files, YAML format, 2 spaces +[*.sls, *.yaml, *.yml, *.rb] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f5e1ea6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +html/ +.direnv diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..23bbee7 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +# frozen_string_literal: true +source "https://rubygems.org" + +gem 'nokogiri' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..9512002 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,15 @@ +GEM + remote: https://rubygems.org/ + specs: + mini_portile2 (2.2.0) + nokogiri (1.8.0) + mini_portile2 (~> 2.2.0) + +PLATFORMS + ruby + +DEPENDENCIES + nokogiri + +BUNDLED WITH + 1.15.4 diff --git a/README.md b/README.md new file mode 100644 index 0000000..6e637a6 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# google-sre-ebook + +![Cover](cover.jpg) + +Generates a EPUB for the Google SRE Book. + +Original sources are downloaded from https://landing.google.com/sre/ + +Review and run the `bootstrap.sh` script to generate the EPUB. + +**Note**: Currently relies on python2 and pip to install dependencies +and does not setup a virtualenv. Please review the script and edit +as per your needs. If you have [direnv](https://direnv.net/) +installed, it will set up the virtualenv for you after you run +`direnv allow`. diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..b653882 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +mkdir -p html +cd html +wget --mirror https://landing.google.com/sre/book/ + +mv landing.google.com/sre/book/* . +rm -rf landing.google.com +cd .. + +bundle install +ruby generate.rb diff --git a/cover.jpg b/cover.jpg new file mode 100644 index 0000000..123b7c4 Binary files /dev/null and b/cover.jpg differ