Add script to generate book PDF

This commit is contained in:
rubenwardy 2017-08-26 17:26:08 +01:00
parent d5a9844de6
commit 380027cd75
2 changed files with 86 additions and 3 deletions

79
.gitignore vendored
View File

@ -1,4 +1,77 @@
_site book.pdf
.directory
# Created by https://www.gitignore.io/api/ruby,linux,jekyll
### Jekyll ###
_site/
.sass-cache/
.jekyll-metadata .jekyll-metadata
*~*
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### Ruby ###
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/
# Used by dotenv library to load environment variables.
# .env
## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/
## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/
## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/
## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/
# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
# End of https://www.gitignore.io/api/ruby,linux,jekyll

10
utils/convert_to_pdf.sh Executable file
View File

@ -0,0 +1,10 @@
---
---
#!/bin/sh
oldCWD="$PWD"
cd $(dirname $0)
cd ../en/
wkhtmltopdf --print-media-type {% for link in site.data.links_en %}{% if link.link %}{{ link.link }} {% endif %}{% endfor %} out.pdf
mv out.pdf $oldCWD/book.pdf