This is a Rails project fork to create a PDF generator for the Rails Guides. The project is still ongoing.
Download actual PDF versions of the guides from here (not yet fine enough, but usefull).
PDF guides can be generated as follows
..$ git clone [email protected]:jquemada/rails ..$ cd rails/railties ..$ rake generate_guides_pdf # New command generating pdf guides in railties/guides/pdf ..$ rake generate_guides # Existing command generating html guides in railties/guides/output
“rake generate_guides_pdf” generates the pdf guides in the railties/guides/pdf directory in two steps:
Step 1: transforms the textile source file of the guides (in “railties/guides/sources”) into an enriched textile source file (in “railties/guides/pdf”), which includes everything necessary for proper PDF generation with gimli. Most of the transformations are made with RegExps in method “generate_guide(guide, output_file)” in class “RailsGuides::GeneratorPdf” defined in “railties/guides/rails_guides/generator_pdf.rb”.
Step 2: transforms the enriched textile source file in (railties/guides/pdf) into a PDF file (in railties/guides/pdf) using gimli. Invoked also in the “generate_guide(guide, output_file)” method.
The “rake generate_guides_pdf” command is similar to the old “rake generate_guides” command used to generate HTML guides out of the textile RDoc sources of the guides and reuses a lot of the old code.