GithubHelp home page GithubHelp logo

books's Introduction

Some Rust books conversion

The purpose of this repository is to try to provide PDF and EPUB vesions of Rust books. Currently, there is only an early attempt at converting the The Rust Programming Language, which you can look at here:

Second edition

(Last updated: 2017-06-11)

First edition

(Last updated: 2017-06-11)

Why?

Because these books are great but I personally prefer to read on a ereader than on computer screen. Plus my pet project is building yet another converter from Markdown books to PDF, EPUB and HTML converter from Markdown books to PDF, EPUB and HTML, so I wanted to know if it could work on this kind of books.

Status and what's next

The PDF and EPUB files are existing, so it somewhat works. They could be better, though. Inner links don't work. The toc is quite messy. There are probably a ton of quirks.

I'd also like to try to see how this works on other books. Later. Maybe.

How?

I used Crowbook, yet another converter from Markdown books to PDF, EPUB and HTML. The book configuration file is here.

If you want to play with that too, you'll need the Github version of crowbook, since I had to do some tweaking to get The Rust Lang Book to work under it.

$ git clone https://github.com/lise-henry/crowbook
$ cargo install

Then

$ git clone https://github.com/lise-henry/books/
$ cd books
$ crowbook trpl2.book
$ crowbook trpl1.book

Since the source files are in a git submodule you might need to do some git magic. Honestly, I am not sure of how that works so I won't be able to help you on that.

Keeping these versiong up to date should not be too difficult, as long as the structure of the Summary.md file in the source repository is mirrored to the trpl2.book file here.

License

The Rust Programming Language books are dual licensed under the Apache 2 and MIT License.

Other EPUB/PDF versions of Rust books

Other people have converted Rust books to PDF and EPUB:

books's People

Contributors

crowdagger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

books's Issues

Release download links

Feel free to close or delete this after reading:

I recommend migrating the epub itself into a release so that we can go there to download as opposed to the readme.md... or maybe as an alternative instead.

Thank you for making this into an epub!

Validation errors

I get the following errors when I submit trpl2.epub to epubcheck:

ERROR(RSC-005): trpl2.epub/OEBPS/chapter_013.xhtml(186,17): Error while parsing file 'attribute "start" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"'.
ERROR(RSC-005): trpl2.epub/OEBPS/chapter_068.xhtml(26,17): Error while parsing file 'attribute "start" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"'.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(61,173): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(80,422): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(87,313): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(88,182): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(97,235): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(97,422): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(100,323): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_004.xhtml(316,102): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_020.xhtml(90,353): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_020.xhtml(155,349): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_020.xhtml(184,393): Referenced resource could not be found in the EPUB.
ERROR(RSC-007): trpl2.epub/OEBPS/chapter_028.xhtml(19,173): Referenced resource could not be found in the EPUB.

Cleaning up the generated TOC

Hi,

I was able to get a cleaner output of the TOC by using the merged .md files generated by the nostarch.sh script in the book repo:
screen shot 2017-10-29 at 2 49 14 pm

And by modifiying a bit the .book config file

As mentioned by #3, the img/ prefix in ch20-00-final-project-a-web-server.md needs to be removed so that the build doesn't fail.

This is the output of applying these changes with the 2017-10-28 7db393d version of the book:

PDF
EPUB
HTML

Unable to build trpl2 278f4db5

The latest version of master of trpl (278f4db5489fe0ca791f4f93b2fca858ae9cdc90) does not build with the following error:

Error: Error rendering html: trpl/second-edition/src/ch20-00-final-project-a-web-server.md: Could not find file 'trpl/second-edition/src/img/img/trpl20-01.png' for image

The complete error output is in this gist.

The version from the submodule checked in here, 90bc937c05c5fd53dcf91715a0fb3a06dd8366e5, does work fine, though. It looks like they changed

-![hello from rust](hello.png)
+![hello from rust](img/trpl20-01.png)

removing the img/ makes crowbook work again.
I'm not sure, whether the error lies with crowbook or the original book sources (which are unit tested, though, and seem to pass those...). Could you please investigate that?

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.