This is an example of how to use scp-to-epub to generate a custom scp ebook.
This is the link to the book - note the hash value at the end
[http://absolute.url/to/this/page#u-my-book-name]
wrap everything in [[div id="u-BOOK"]] ... [[/div]], where BOOK is a unique name on this page
--- # this is a block in YAML format (comment lines start with #) # whitespace (spaces) is significant # it defines metadata about the book title: Book Title cover: # this is optional. comment out to not include a cover url: http://absolute.url/to/a/cover/image.jpg preface: | # Hello! You can add additional text that shows up in the preface to the book by including it here. Text is in **markdown** format, not wikidot syntax. Sorry! Make sure you keep 2 spaces before each line here, because of YAML. This section is helpful for adding credits or other notes, for example: Cover image by [username](http://scp-wiki.wikidot.com/user:info/username) # these are configurable options. All optional language: en publisher: 'SCP Foundation' author: 'SCP Foundation' # if loading an international page may need to change this. That's untested right now! defaultOrigin: http://www.scp-wiki.net # Maximum number of articles to load. 50-100 is a sane value maxChapters: 100 # how deeply to follow links. A max depth of 0 means don't load any more # links then the ones explicitly listed below. maxDepth = 1 means also include # any linked pages. maxDepth: 3 # the point at which chapters just get listed in the appendix, rather than being included # in the table of contents appendixDepthCutoff: 2 # just include a list of URLs, nothing fancy. Useful for just loading a single URL to start, like a hub page. include: ["/awesome-hub", "a-different-page", "scp-173"] # list of pages to never load, even if something links it exclude: - /project-heimdall ---
[!— Above is the "front-matter" metadata about the book. anything after the [[/code]] Gets put
into the table of contents.]]
Part 1 - your table of contents
use H2 headers (++ in wikidot syntax) to separate the book into different "Parts" - sections of content. Anything in-between headers will get included in the intro to each part, and any links will get added as chapters to the "Part"
this is an article that will be added
This is an external link - it won't be added as a chapter, but will be included in the table of contents
Part 2
This is a different section. It includes more links.
Research Site-45
USORPL-Site-64 - SCP Foundation Portland Research and Containment Facility
EUITLA-Site-77 - SCP Foundation Southern Europe Mass Containment Facility
USINBL-Site-81 - SCP Foundation Bloomington Research and Containment Facility
USALBC-Site-88 - SCP Foundation Southeastern Containment Facility
LMaImb-Area-32 - SCP Foundation Specialised Lunar Containment and Research Area
Close up the book definition with a [[/div]]
Then generate the book - navigate to the scp-to-epub folder and run
node index.js —book "http://absolute.url/to/this/page#u-my-book-name" —output "./output/my-book.epub"
You can include multiple book definitions on the same page by using the anchor reference (the #u-BOOK part of the link). Here's one that should actually work:
---
title: Broken Masquerade
cover:
url: "https://usercontent.irccloud-cdn.com/file/XGrGTCsH/movie2.png"
preface: |
Cover image by [Cyantreuse]http://www.scp-wiki.net/sexycontainmentprocedures)
language: en
publisher: 'SCP Foundation'
author: 'SCP Foundation'
appendixDepthCutoff: 3
maxDepth: 3
maxChapters: 100
defaultOrigin: http://www.scp-wiki.net
include:
- http://www.scp-wiki.net/broken-masquerade-hub
exclude: []
---
Create the book above with:
node index.js —book "http://scp-sandbox-3.wikidot.com/tmonty#u-book-broken-masquerade" —output "./output/broken-masquerade.epub"






Per 


