~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to man/build_class_rest.py

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
# generates REST man pages docs/rest/<category>.txt
 
4
# (c) The GRASS Development Team, Markus Neteler, Glynn Clements 2003, 2004, 2005, 2006, 2009
 
5
 
 
6
import sys
 
7
import os
 
8
import string
 
9
 
 
10
from build_rest import *
 
11
 
 
12
os.chdir(rest_dir)
 
13
 
 
14
#write separate module pages:
 
15
 
 
16
#for all module groups:
 
17
cls = sys.argv[1]
 
18
modclass = sys.argv[2]
 
19
 
 
20
filename = modclass + ".txt"
 
21
 
 
22
f = open(filename + ".tmp", 'wb')
 
23
 
 
24
write_rest_header(f, "GRASS GIS %s Reference Manual: %s" % (grass_version, modclass))
 
25
if modclass.lower() not in ['general', 'misc', 'postscript']:
 
26
    f.write(modclass_intro_tmpl.substitute(modclass = modclass, modclass_lower = modclass.lower()))
 
27
f.write(modclass_tmpl.substitute(modclass = modclass))
 
28
 
 
29
#for all modules:
 
30
for cmd in rest_files(cls):
 
31
    basename = os.path.splitext(cmd)[0]
 
32
    desc = check_for_desc_override(basename)
 
33
    if desc is None:
 
34
        desc = get_desc(cmd)
 
35
    f.write(desc2_tmpl.substitute(basename = basename,
 
36
                              desc = desc))
 
37
 
 
38
write_rest_footer(f, "index.txt")
 
39
 
 
40
f.close()
 
41
replace_file(filename)