예제 #1
0
def handle_exported(project, language = None, page = None):
    web_docs_repository_path = os.path.join(settings.WEB_DOCS_DIR, project.slug, )
    doc_dir =  os.path.join(web_docs_repository_path, settings.ORIGINAL_LANGUAGE)
    exprot_dir = os.path.join(web_docs_repository_path, settings.TRANSLATION_LANGUAGE)
    
    if not page:
        temp_project_doc_path = project.doc_path + '-temp'
        client = pysvn.Client()
        client.exception_style = 1
        if os.path.exists(temp_project_doc_path):
            shutil.rmtree(temp_project_doc_path)
        client.export(project.doc_path, temp_project_doc_path)
        problem_file_name = os.path.join(temp_project_doc_path, '_templates','modindex.html')
        handle_modindex(problem_file_name)
    problem_file_name = os.path.join(project.export_path, '_templates','modindex.html')
    handle_modindex(problem_file_name)
    
    if page:
        build_docs(project.export_path, exprot_dir, page = page)
        return
    
    if language == None:
        build_docs(temp_project_doc_path, doc_dir)
        build_docs(project.export_path, exprot_dir)
    elif language == settings.ORIGINAL_LANGUAGE:
        build_docs(temp_project_doc_path, doc_dir)
    elif language == settings.TRANSLATION_LANGUAGE:
        build_docs(project.export_path, exprot_dir)
예제 #2
0
def handle_exported(project, language=None, page=None):
    web_docs_repository_path = os.path.join(
        settings.WEB_DOCS_DIR,
        project.slug,
    )
    doc_dir = os.path.join(web_docs_repository_path,
                           settings.ORIGINAL_LANGUAGE)
    exprot_dir = os.path.join(web_docs_repository_path,
                              settings.TRANSLATION_LANGUAGE)

    if not page:
        temp_project_doc_path = project.doc_path + '-temp'
        client = pysvn.Client()
        client.exception_style = 1
        if os.path.exists(temp_project_doc_path):
            shutil.rmtree(temp_project_doc_path)
        client.export(project.doc_path, temp_project_doc_path)
        problem_file_name = os.path.join(temp_project_doc_path, '_templates',
                                         'modindex.html')
        handle_modindex(problem_file_name)
    problem_file_name = os.path.join(project.export_path, '_templates',
                                     'modindex.html')
    handle_modindex(problem_file_name)

    if page:
        build_docs(project.export_path, exprot_dir, page=page)
        return

    if language == None:
        build_docs(temp_project_doc_path, doc_dir)
        build_docs(project.export_path, exprot_dir)
    elif language == settings.ORIGINAL_LANGUAGE:
        build_docs(temp_project_doc_path, doc_dir)
    elif language == settings.TRANSLATION_LANGUAGE:
        build_docs(project.export_path, exprot_dir)
예제 #3
0
def handle_exported(project, language=None, page=None):
    web_docs_repository_path = os.path.join(
        settings.WEB_DOCS_DIR,
        project.slug,
    )
    doc_dir = os.path.join(web_docs_repository_path,
                           settings.ORIGINAL_LANGUAGE)
    exprot_dir = os.path.join(web_docs_repository_path,
                              settings.TRANSLATION_LANGUAGE)

    version_info_file = os.path.join(project.root, 'sqlalchemy-trunk',
                                     '__init__.py')
    if not page:
        temp_project_doc_path = project.doc_path + '-temp'
        client = pysvn.Client()
        client.exception_style = 1
        if os.path.exists(temp_project_doc_path):
            shutil.rmtree(temp_project_doc_path)
        client.export(project.doc_path, temp_project_doc_path)
        problem_file_name = os.path.join(temp_project_doc_path, 'conf.py')
        handle_problem_file_name(problem_file_name, version_info_file)

    problem_file_name = os.path.join(project.export_path, 'conf.py')
    handle_problem_file_name(problem_file_name, version_info_file)

    setuper = Setuper()
    setuper.setup()

    if page:
        build_docs(project.export_path, exprot_dir, page=page)
        return

    if language == None:
        build_docs(temp_project_doc_path, doc_dir)
        build_docs(project.export_path, exprot_dir)
    elif language == settings.ORIGINAL_LANGUAGE:
        build_docs(temp_project_doc_path, doc_dir)
    elif language == settings.TRANSLATION_LANGUAGE:
        build_docs(project.export_path, exprot_dir)

    setuper.restore()
예제 #4
0
def handle_exported(project, language=None, page=None):
    web_docs_repository_path = os.path.join(
        settings.WEB_DOCS_DIR,
        project.slug,
    )
    doc_dir = os.path.join(web_docs_repository_path,
                           settings.ORIGINAL_LANGUAGE)
    exprot_dir = os.path.join(web_docs_repository_path,
                              settings.TRANSLATION_LANGUAGE)
    confdir = os.path.join(settings.DOCS_DIR, project.slug,
                           settings.HG_REPO_NAME, 'sphinx')

    #hack
    os.environ['VERSION'] = '1.91'
    os.environ['TEMPLATES'] = 'pkg'

    if not page:
        temp_project_doc_path = project.doc_path + '-temp'
        client = pysvn.Client()
        client.exception_style = 1
        if os.path.exists(temp_project_doc_path):
            shutil.rmtree(temp_project_doc_path)
        client.export(project.doc_path, temp_project_doc_path)
        problem_file_name = os.path.join(temp_project_doc_path, 'trace',
                                         'index.rst')
        handle_trace_index_rst(problem_file_name)

    problem_file_name = os.path.join(project.export_path, 'trace', 'index.rst')
    handle_trace_index_rst(problem_file_name)

    if page:
        build_docs(project.export_path, exprot_dir, confdir, page=page)
        return

    if language == None:
        build_docs(temp_project_doc_path, doc_dir, confdir)
        build_docs(project.export_path, exprot_dir, confdir)
    elif language == settings.ORIGINAL_LANGUAGE:
        build_docs(temp_project_doc_path, doc_dir, confdir)
    elif language == settings.TRANSLATION_LANGUAGE:
        build_docs(project.export_path, exprot_dir, confdir)
def handle_exported(project, language = None, page = None):
    web_docs_repository_path = os.path.join(settings.WEB_DOCS_DIR, project.slug, )
    doc_dir =  os.path.join(web_docs_repository_path, settings.ORIGINAL_LANGUAGE)
    exprot_dir = os.path.join(web_docs_repository_path, settings.TRANSLATION_LANGUAGE)
    
    version_info_file = os.path.join(project.root, 'sqlalchemy-trunk', '__init__.py')
    if not page:
        temp_project_doc_path = project.doc_path + '-temp'
        client = pysvn.Client()
        client.exception_style = 1
        if os.path.exists(temp_project_doc_path):
            shutil.rmtree(temp_project_doc_path)
        client.export(project.doc_path, temp_project_doc_path)
        problem_file_name = os.path.join(temp_project_doc_path, 'conf.py')
        handle_problem_file_name(problem_file_name, version_info_file)
        
    problem_file_name = os.path.join(project.export_path, 'conf.py')
    handle_problem_file_name(problem_file_name, version_info_file)
    
    setuper = Setuper()
    setuper.setup()
    
    if page:
        build_docs(project.export_path, exprot_dir, page = page)
        return
    
    if language == None:
        build_docs(temp_project_doc_path, doc_dir)
        build_docs(project.export_path, exprot_dir)
    elif language == settings.ORIGINAL_LANGUAGE:
        build_docs(temp_project_doc_path, doc_dir)
    elif language == settings.TRANSLATION_LANGUAGE:
        build_docs(project.export_path, exprot_dir)
        
    
    setuper.restore()
    
예제 #6
0
def handle_exported(project, language = None, page = None):
    web_docs_repository_path = os.path.join(settings.WEB_DOCS_DIR, project.slug, )
    doc_dir =  os.path.join(web_docs_repository_path, settings.ORIGINAL_LANGUAGE)
    exprot_dir = os.path.join(web_docs_repository_path, settings.TRANSLATION_LANGUAGE)
    confdir = os.path.join(settings.DOCS_DIR, project.slug, settings.HG_REPO_NAME, 'sphinx')
    
    #hack
    os.environ['VERSION'] = '1.91'
    os.environ['TEMPLATES'] = 'pkg'
    
    if not page:
        temp_project_doc_path = project.doc_path + '-temp'
        client = pysvn.Client()
        client.exception_style = 1
        if os.path.exists(temp_project_doc_path):
            shutil.rmtree(temp_project_doc_path)
        client.export(project.doc_path, temp_project_doc_path)
        problem_file_name = os.path.join(temp_project_doc_path, 'trace','index.rst')
        handle_trace_index_rst(problem_file_name)
    
    problem_file_name = os.path.join(project.export_path, 'trace','index.rst')
    handle_trace_index_rst(problem_file_name)
    
    if page:
        build_docs(project.export_path, exprot_dir, confdir, page = page)
        return
    
    
    if language == None:
        build_docs(temp_project_doc_path, doc_dir, confdir)
        build_docs(project.export_path, exprot_dir, confdir)
    elif language == settings.ORIGINAL_LANGUAGE:
        build_docs(temp_project_doc_path, doc_dir, confdir)
    elif language == settings.TRANSLATION_LANGUAGE:
        build_docs(project.export_path, exprot_dir, confdir)