~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/scripts/utilities/apiindex.py

Merge from lp:~launchpad-pqm/launchpad/db-devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
 
# GNU Affero General Public License version 3 (see the file LICENSE).
3
 
 
4
 
"""A script to build reference html from wadl.
5
 
 
6
 
Uses an xsl from the launchpadlib package."""
7
 
 
8
 
__metaclass__ = type
9
 
__all__ = ['main']
10
 
 
11
 
 
12
 
import pkg_resources
13
 
import subprocess
14
 
import sys
15
 
 
16
 
def main():
17
 
    source = sys.argv[1]
18
 
    stylesheet = pkg_resources.resource_filename(
19
 
        'launchpadlib', 'wadl-to-refhtml.xsl')
20
 
    subprocess.call(['xsltproc', stylesheet, source])
21
 
    pkg_resources.cleanup_resources()