def js_classes(args):
    if not os.path.exists(args.dest): os.mkdir(args.dest)
    if os.path.isfile(args.src):
        print_js_classes(args.src, args.dest)
    elif os.path.isdir(args.src):
        for path in utils.get_proto_files(args.src):
            print_js_classes(path, args.dest)
Beispiel #2
0
def js_classes(args):
    if not os.path.exists(args.dest): os.mkdir(args.dest)
    if os.path.isfile(args.src):
        print_js_classes(args.src, args.dest)
    elif os.path.isdir(args.src):
        for path in utils.get_proto_files(args.src):
            print_js_classes(path, args.dest)
def scope_doc(args):
    if not os.path.exists(args.dest): os.mkdir(args.dest)
    proto_paths = [args.src] if os.path.isfile(args.src) else utils.get_proto_files(args.src)
    services = get_scope_services(proto_paths, args.dest)
    for service in services.values():
        for version in service.values():
            with open(version.html_path, "wb") as fp:
                print_service(fp, services, version.service)
    with open(os.path.join(args.dest, "index.html"), "wb") as fp:
         print_index(fp, services, args.dest)
    copy_html_src(os.path.join(SOURCE_ROOT, RESOURCES), args.dest)
def scope_doc(args):
    if not os.path.exists(args.dest): os.mkdir(args.dest)
    proto_paths = [args.src] if os.path.isfile(
        args.src) else utils.get_proto_files(args.src)
    services = get_scope_services(proto_paths, args.dest)
    for service in services.values():
        for version in service.values():
            with open(version.html_path, "wb") as fp:
                print_service(fp, services, version.service)
    with open(os.path.join(args.dest, "index.html"), "wb") as fp:
        print_index(fp, services, args.dest)
    copy_html_src(os.path.join(SOURCE_ROOT, RESOURCES), args.dest)