Beispiel #1
0
def build_content_generation_tasks(conf, app):
    """
    :param Configuration conf: The current build configuration object.

    :param BuildApp app: A :class:`~giza.core.app.BuildApp()` object.

    Add tasks to the ``app`` for all tasks that modify the content in
    ``build/<branch>/source`` directory.
    """
    app.randomize = True

    with Timer("adding content tasks"):
        for content, func in conf.system.content.task_generators:
            t = app.add('task')
            t.job = func
            t.args = [conf]
            t.target = True

        results = app.run()

        for content_generator_tasks in results:
            app.extend_queue(content_generator_tasks)

    robots_txt_tasks(conf, app)
    intersphinx_tasks(conf, app)
    includes_tasks(conf, app)
    table_tasks(conf, app)
    hash_tasks(conf, app)
    api_tasks(conf, app)
    redirect_tasks(conf, app)
    image_tasks(conf, app)
Beispiel #2
0
def intersphinx(args):
    c = fetch_config(args)

    with BuildApp.context(c) as app:
        if c.runstate.clean_generated is True:
            intersphinx_clean(c, app)
        else:
            intersphinx_tasks(c, app)
Beispiel #3
0
def intersphinx(args):
    c = fetch_config(args)
    app = BuildApp(c)

    if c.runstate.clean_generated is True:
        intersphinx_clean(c, app)
    else:
        intersphinx_tasks(c, app)

    app.run()
Beispiel #4
0
def build_prep_tasks(conf, app):
    image_tasks(conf, app)
    robots_txt_tasks(conf, app)
    assets_tasks(conf, app)
    includes_tasks(conf, app)
    intersphinx_tasks(conf, app)
    release_tasks(conf, app)
    option_tasks(conf, app)
    api_tasks(conf, app)
    table_tasks(conf, app)
Beispiel #5
0
def intersphinx(args):
    c = fetch_config(args)

    with BuildApp.new(pool_type=c.runstate.runner,
                      pool_size=c.runstate.pool_size,
                      force=c.runstate.force).context() as app:
        if c.runstate.clean_generated is True:
            app.extend_queue(intersphinx_clean(c))
        else:
            app.extend_queue(intersphinx_tasks(c))
def intersphinx(args):
    c = fetch_config(args)

    with BuildApp.new(pool_type=c.runstate.runner,
                      pool_size=c.runstate.pool_size,
                      force=c.runstate.force).context() as app:
        if c.runstate.clean_generated is True:
            app.extend_queue(intersphinx_clean(c))
        else:
            app.extend_queue(intersphinx_tasks(c))