Remove broken PDF export scripts

This commit is contained in:
rubenwardy 2018-09-18 02:21:32 +01:00
parent af6bfb8e8c
commit c1a2528c72
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
4 changed files with 1 additions and 65 deletions

View File

@ -22,7 +22,7 @@ Each chapter focuses on a particular part of the API, and will soon get you maki
your own mods. your own mods.
As well as [reading this book online](https://rubenwardy.com/minetest_modding_book), As well as [reading this book online](https://rubenwardy.com/minetest_modding_book),
you can also [download it in PDF or HTML form](https://github.com/rubenwardy/minetest_modding_book/releases). you can also [download it in HTML form](https://github.com/rubenwardy/minetest_modding_book/releases).
### Feedback and Contributions ### Feedback and Contributions

View File

@ -1,7 +0,0 @@
epub:
name: Minetest Modding Book
title: Minetest Modding Book
identifier: rubenwardy.com/minetest_modding_book
description: An easy guide in learning how to create mods for Minetest.
creator: rubenwardy
rights: CC-BY-SA 3.0

View File

@ -1,51 +0,0 @@
---
---
"use strict";
Number.prototype.pad = function(size) {
size = size || 2;
var s = String(this)
while (s.length < size) {
s = "0" + s;
}
return s;
}
const puppeteer = require("puppeteer")
const fs = require("fs")
const os = require("os")
var links = {{ site.data.links_en | jsonify }};
(async() => {
const browser = await puppeteer.launch()
const page = await browser.newPage()
var root = "file:///" + __dirname + "/../en/"
console.log("Root is: " + root)
for (var i = 0; i < links.length; i++) {
var link = links[i]
if (link.link) {
console.log("Rendering " + link.title)
await page.goto(root + link.link, {waitUntil: "networkidle"})
// page.pdf() is currently supported only in headless mode.
// @see https://bugs.chromium.org/p/chromium/issues/detail?id=753118
const margin = "0.2in"
const file_seg = link.num ? link.num.pad() : ("00_" + link.title.replace(".", "_"))
await page.pdf({
path: "tmp/page_" + file_seg + ".pdf",
format: "A5",
margin: {
top: margin,
right: margin,
bottom: margin,
left: margin,
}
})
}
}
browser.close()
})()

View File

@ -1,6 +0,0 @@
#!/bin/sh
jekyll build
mkdir -p tmp
n use latest _site/utils/convert_to_pdf.js
pdfunite tmp/page*.pdf tmp/book.pdf