Exemplo n.º 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)
Exemplo n.º 2
0
def tables(args):
    c = fetch_config(args)

    with BuildApp.context(c) as app:
        if c.runstate.clean_generated is True:
            table_clean(c, app)
        else:
            table_tasks(c, app)
Exemplo n.º 3
0
def tables(args):
    c = fetch_config(args)
    app = BuildApp(c)

    if c.runstate.clean_generated is True:
        table_clean(c, app)
    else:
        table_tasks(c, app)

    app.run()
Exemplo n.º 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)
Exemplo n.º 5
0
def tables(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(table_clean(c))
        else:
            app.extend_queue(table_tasks(c))
Exemplo n.º 6
0
def tables(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(table_clean(c))
        else:
            app.extend_queue(table_tasks(c))