Esempio n. 1
0
def publish():
    """
    Copy current draft xml file to the public location for document files.
    """
    print 'edit::publish:'
    filename = session.filename
    return BookManager.publish(filename)
Esempio n. 2
0
def publish():
    """
    Copy current draft xml file to the public location for document files.
    """
    print 'edit::publish:'
    filename = session.filename
    return BookManager.publish(filename)
Esempio n. 3
0
def index():
    session.filename = request.args[0]
    filename = session.filename

    BookManager.copy_book(filename)

    # get parsed document info
    info, p = _get_bookinfo(filename)
    #get title of document
    title = info['book']['title']

    buttons = {'renumber units': URL('edit', 'renumber', args=[filename]),
               'publish': URL('edit', 'publish', args=[filename])}

    return {'filename': filename,
            'buttons': buttons,
            'title': title}
Esempio n. 4
0
def index():
    session.filename = request.args[0]
    filename = session.filename

    BookManager.copy_book(filename)

    # get parsed document info
    info, p = _get_bookinfo(filename)
    #get title of document
    title = info['book']['title']

    buttons = {
        'renumber units': URL('edit', 'renumber', args=[filename]),
        'publish': URL('edit', 'publish', args=[filename])
    }

    return {'filename': filename, 'buttons': buttons, 'title': title}
Esempio n. 5
0
def renumber():
    """
    Renumber units and options throughout the current document.

    Units must be numbered consecutively and options must be numbered starting
    at 0 within each unit.
    """
    print 'edit::renumber:'
    filename = session.filename
    return BookManager.renumber_units(filename)
Esempio n. 6
0
def renumber():
    """
    Renumber units and options throughout the current document.

    Units must be numbered consecutively and options must be numbered starting
    at 0 within each unit.
    """
    print 'edit::renumber:'
    filename = session.filename
    return BookManager.renumber_units(filename)