Skip to content

PDF of Wiki Tutorial

kalden edited this page Mar 21, 2013 · 1 revision

PDF of Wiki Tutorial

Introduction

In previous versions of iDynomics, the tutorial existed as a Word document. From version 1.2 onwards, the tutorial will now be present on this wiki, and all updates will be completed on these pages.

However we are aware that there are some who will still prefer a hard copy via PDF. Thus we have written a script that downloads the wiki, makes a few required amendments to the pages, and compiles these to form a PDF of the tutorial.

This script is called iDynomics_Wiki_To_PDF_Tutorial.bash, and can be found in the utilities folder.

Usage

This runs in Linux or Mac OS, but does have some required software. The commands to get this software (on linux) are noted in the script:

  • gimli: converts markdown files from the wiki to pdf
  • pdftk: joins pdf files created by gimli to form one single file

These in turn have their own requirements (libxslt-dev, libxml2-dev, rubygems, wkhtmltopdf, ruby1.9.1-dev) that should also be installed from the command line.

When run, the script clones the wiki onto the local machine. The bash utility sed is then used to make some changes to the markdown files - mainly removing the wiki based navigation system. For aesthetic sake a few of the pages are then combined to save whitespace. Once this is complete, gimli is used to create PDFs of each page of the wiki (or the combined pages), and pdftk used to combine them in the correct order. Finally, the files used to make the PDF are removed from the local machine.