make_ari_stubs Namespace Reference


Functions

def main
def rel

Variables

list API_TRANSFORMS
list RESOURCES_TRANSFORMS
tuple TOPDIR = os.path.dirname(os.path.abspath(__file__))
string WIKI_PREFIX = 'Asterisk 13'


Function Documentation

def make_ari_stubs::main (   argv  ) 

Definition at line 68 of file make_ari_stubs.py.

00068               :
00069     parser = OptionParser(usage="Usage %prog [resources.json] [destdir]")
00070 
00071     (options, args) = parser.parse_args(argv)
00072 
00073     if len(args) != 3:
00074         parser.error("Wrong number of arguments")
00075 
00076     source = args[1]
00077     dest_dir = args[2]
00078     renderer = pystache.Renderer(search_dirs=[TOPDIR], missing_tags='strict')
00079     processor = AsteriskProcessor(wiki_prefix=WIKI_PREFIX)
00080 
00081     # Build the models
00082     base_dir = os.path.dirname(source)
00083     resources = ResourceListing().load_file(source, processor)
00084     for api in resources.apis:
00085         api.load_api_declaration(base_dir, processor)
00086 
00087     # Render the templates
00088     for api in resources.apis:
00089         for transform in API_TRANSFORMS:
00090             transform.render(renderer, api, dest_dir)
00091     for transform in RESOURCES_TRANSFORMS:
00092         transform.render(renderer, resources, dest_dir)
00093 
if __name__ == "__main__":

def make_ari_stubs::rel (   file  ) 

Helper to get a file relative to the script's directory

@parm file: Relative file path.

Definition at line 37 of file make_ari_stubs.py.

00037              :
00038     """Helper to get a file relative to the script's directory
00039 
00040     @parm file: Relative file path.
00041     """
00042     return os.path.join(TOPDIR, file)
00043 
WIKI_PREFIX = 'Asterisk 13'


Variable Documentation

Definition at line 46 of file make_ari_stubs.py.

Definition at line 57 of file make_ari_stubs.py.

tuple TOPDIR = os.path.dirname(os.path.abspath(__file__))

Definition at line 34 of file make_ari_stubs.py.

string WIKI_PREFIX = 'Asterisk 13'

Definition at line 44 of file make_ari_stubs.py.


Generated on Thu Apr 16 06:41:38 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6