Code Monkey home page Code Monkey logo

warbreaker's Introduction

Warbreaker

Brandon Sanderson has his book Warbreaker available for free as an ebook on his website. For ease of reading and offline availability, I created a PDF version of the book.

Warbreaker Cover

webscraper.py

This Python 3.10.8 script uses Selenium 4.8.0 to scrape the version of the book hosted on Brandon Sanderson's website.

This scraper generates .tex files in output/ that converts the main text on each page from HTML to LaTeX.

For example, something like

<p>This is <i>some</i> text.</p>

is written to the output file as

This is \textit{some} text.

This conversion is also automatically done for chapter title, sections headers, and even the table and description list contained in the Ars Arcanum.

On top of generating .tex files for each chapter, this script also generates warbreaker_full.tex, which is the main .tex file which \include's each of the chapters in order.

Brandon Sanderson also posted parallel annotations for each chapter in the book, but since I found it tedious to jump back and forth between the main text and the annotations, I have also appended all of the annotations to the end of each chapter.

#f03c15 WARNING: Some of the annotations do contain spoilers, all text that is in red is a spoiler. #f03c15

final/

The purpose of webscraper.py was not to create a finished product, merely to do the majority of the work for me (rather than copying the plain text and doing all of the formattin by hand).

After running webscraper.py, I copied all the files from output/ to final/ and used a combination of vim magic and a small amount of manual work to finalize the typesetting.

Finally, I created warbreaker.sty in order to define stylistic parameters for the document.

License & rights

As outlined by Brandon Sanderson, his book is protected under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.

In compliance with that license, I have not modified the text of the book in any way, merely typeset it. This is not my writing, I am not the author of this book.

If you notice any mistakes that I have made in converting the book into a PDF or any inconsistencies between the PDF and the online version of the book, please let me know!

warbreaker's People

Contributors

miateixeira avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.