~u5218464/schooltool-book/schooltool-book

« back to all changes in this revision

Viewing changes to i18n/hi/build/html/_sources/editing-this-book.txt

  • Committer: Karun Agarwal
  • Date: 2014-05-22 10:02:44 UTC
  • Revision ID: u5218464@anu.edu.au-20140522100244-0lv39nttpudy41cp
added new branch to make translations for schooltool-book to hindi

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _translate-book:
 
2
 
 
3
Editing or Translating This Book
 
4
================================
 
5
 
 
6
Rationale
 
7
---------
 
8
 
 
9
We have given a lot of thought to setting up this documentation in a way that will make it easy to maintain translations, allow modification for specific sites, and offer a clear process for potential contributors to submit changes to the official version.
 
10
 
 
11
A wiki would be one obvious way to make editing easy -- but for managing multiple versions, languages and formats over a long period of time, maintaining text files in version control gives us more control and flexibility than a set of wikis stuffing text in databases.  Using files in revision control facilitates including scripts to automatically reproduce the steps in demonstrations in the documentation, like `Selenium <http://seleniumhq.org/>`_ scripts.  Also, it fits in nicely with the rest of our project management systems and code documentation practices.
 
12
 
 
13
Even if this system sounds intimidating, please give it a chance.  After you get through the initial setup, the actual editing is very wiki-like.  If you decide you can't deal with the revision control part, go ahead and just email `Tom Hoffman <mailto:hoffman@schooltool.org>`_ with changes, and I'll try to handle your contributions from there.  Simple changes can simply be `filed as bugs on SchoolTool <https://bugs.edge.launchpad.net/schooltool>`_.
 
14
 
 
15
Getting the Sources
 
16
-------------------
 
17
 
 
18
For non-programmers, the weird part will be using the `Bazaar version control system <http://bazaar-vcs.org/>`_ (aka bzr).   
 
19
 
 
20
To install bzr on Ubuntu do::
 
21
 
 
22
    sudo apt-get install bzr
 
23
 
 
24
For all other platforms see `Bazaar downloads <http://bazaar-vcs.org/Download>`_.  The rest of the instructions will assume you're using Ubuntu, other platforms should be similar.  Of course, if you'd like to add instructions for other platforms to this document, just follow these editing process described herein.
 
25
 
 
26
Then, to fetch the source::
 
27
 
 
28
    bzr branch lp:schooltool-book
 
29
 
 
30
This will create a directory called **schooltool-book**, which contains a **source** directory with all the marked up text files and images which make up the book, and a Makefile and associated files which automate the process of turning the sources into a publishable document.
 
31
 
 
32
Building an HTML Version
 
33
------------------------
 
34
 
 
35
The set of scripts which turn the sources into a finished product is called `Sphinx <http://sphinx.pocoo.org/>`_.
 
36
 
 
37
You'll need some basic software development tools, if you don't have them already::
 
38
 
 
39
  sudo apt-get install build-essential python-dev python-virtualenv
 
40
 
 
41
Within the **schooltool-book** directory, do::
 
42
 
 
43
  make html
 
44
 
 
45
This will first make a sandbox containing the Python packages needed for the process, create a **build/html** directory, and put finished web pages in it. 
 
46
 
 
47
If you open **build/html/index.html** from your browser, you'll be able to read the book in web form.  You can publish this directory to the web like any other set of HTML pages.
 
48
 
 
49
Building a PDF Version
 
50
----------------------
 
51
 
 
52
The PDF output from this process is usable.  Because there are a lot of large screengrab images in the book, and we can't (or don't know how to) control the page breaks, the layout isn't that great.  Hopefully we'll be able to improve that in the future.
 
53
 
 
54
Also, as of May 2009 there was a unicode bug that bombed out near the end of the book, but most of the content made it into the PDF. We have not confirmed that this PDF rendering bug is fixed, so your mileage may vary. If you manage to make a beautiful PDF by following the instructions below, feel free to let us know how you accomplished it!
 
55
 
 
56
Grab the TeX libraries::
 
57
 
 
58
  sudo apt-get install texlive-full
 
59
 
 
60
First, from the **schooltool-book** directory do::
 
61
 
 
62
  make latex
 
63
 
 
64
Then::
 
65
 
 
66
  cd build/latex
 
67
  make all-pdf
 
68
 
 
69
This should create a schooltool-book.pdf file in the **build/latex** directory.
 
70
 
 
71
For a more complete explanation of the above, see `Sphinx PDF Generation with LaTeX <http://jimmyg.org/blog/2009/sphinx-pdf-generation-with-latex.html>`_.