Closed davejacobs closed 11 years ago
Actually we now already have a script for epub, and the output HTML pages served by Jekyll now match the Japanese original page names. Also GitHub does a good job of the HTML on GitHub pages. I haven't checked if it's possible, but maybe you can tweak the script to output PDF. And obviously feel free to host it, but perhaps we can just have a script that generates the book formats and uploads to GitHub via the API. In general I'd rather have one simple, clean way of doing things, and if we can stick with GitHub that should keep it simple. If you do need different file names you could always just have a script that runs through and uses Tempfile to have temporary renamed versions for the PDF generation. Either that or you could add something in the yaml metadata at the top. Obviously as the translation is CC license I can't prevent you doing so on your own, but if you're interested in contributing to this repo, then those are my thoughts. I mean I'm not personally vehemently opposed to renaming the files, but it seems like the wrong reason to rename them, so I'd probably resist it if there's alternative workarounds like I suggested that are relatively easy.
Cheers,
Mark
On Friday, 16 August 2013, David Jacobs wrote:
I was talking to Mark on Hacker Newshttps://news.ycombinator.com/item?id=6197629and offered to help maintain a PDF version of this guide. I'd love to host a PDF version along with the HTML version of the guide for anyone who wants a book-like experience while reading. Anyone opposed to me tackling that?
I have a commandline tool (http://github.com/davejacobs/minthttps://github.com/davejacobs/mint) that can almost handle this task, but one blocker is that the source files aren't ordered by chapter.
Is there any problem with me adding a chapter number to each file name (and associated references)?
— Reply to this email directly or view it on GitHubhttps://github.com/ruby-hacking-guide/ruby-hacking-guide.github.com/issues/19 .
I understand what you're saying -- in fact, when I said "host a PDF version", I meant on Github, like you're saying.
I would be interested in renaming the files to include numbers not just for the purposes of PDF generation (you're right that a script could work its way around that) but so that the files are in order in the filesystem, too.
Files in order on the filesystem may be a preferable reason for doing it. I think @ocha- objected at one point to chapter renaming, but let's see what he thinks. Perhaps a numeric prefix makes sense. It still wouldn't feel great for the URLs mind. If we do rename them, it would be nice if there's a way to tweak Jekyll (does it have an option in the YAML?) to not prefix the HTML filenames. They were at one point called chapter01.textile, chapter02.textile, etc. Which is less useful than their names when in URLs or when trying to compare to the originals.
In my epub.rb
I'm also using TOC to order pages
I object to renaming file names further because it can cause hiding the real contributors.
For example, when you open the file of chapter 10 https://github.com/ruby-hacking-guide/ruby-hacking-guide.github.com/blob/master/parser.textile
@alexdowad is not included in the contributors list, but by clicking the blame button, you'll find his contributions. This is because the file names are renamed once after the contributions were made.
Thanks to @avsej , we can generate .epub and probably also .mobi ? I'm sorry for I have not checked them closely because I wanted to focus on the untranslated parts.
If generated .epub and .mobi files are available somewhere, I think it can be converted to a PDF as well, by using Calibre or something.
The script generates epub only, but yes, you can convert it further in any format using calibre
As written in preface.html, this book expect that readers have the knowledge about C to some extent, but does not require the knowledge about Ruby. Since epub.rb naturally requires an environment of Ruby to run, providing a generated epub version is probably good for readers.
RE #24 #23 we can't rename files without losing information on contributions in the GitHub UI. I think the trade-off is unfair to those that have contributed a lot of their time and efforts.
Also we should be able to use metadata somehow in order to order the chapters, either that or some script with hard-coded mapping like ./script/publish
.
If the GitHub contributions issue is solved then we can re-consider opening this. By the way, there is a released epub file in https://github.com/ruby-hacking-guide/ruby-hacking-guide.github.com/releases/tag/v0.0.1
Having released epub files is very nice. Thank you very much!
I was talking to Mark on Hacker News and offered to help maintain a PDF version of this guide. I'd love to host a PDF version along with the HTML version of the guide for anyone who wants a book-like experience while reading. Anyone opposed to me tackling that?
I have a commandline tool (http://github.com/davejacobs/mint) that can almost handle this task, but one blocker is that the source files aren't ordered by chapter.
Is there any problem with me adding a chapter number to each file name (and associated references)?