def build():
    app = create_app('production')
    if(app.config['SHOW_DRAFTS'] | app.debug | app.testing):
        print('WARNING!! This build will show drafts or is running in debug or testing mode.')
    freezer.init_app(app)
    freezer.freeze()
    buildSitemap()
Beispiel #2
0
def publish(push=False, remote='origin', branch='master'):
    """adds blog post pages in root directory to git staging, commits, 
    and optionally those blog posts to github"""
    freezer.freeze()

    for page in pages:
        os.system('git add %s' % page.path)
    os.system('git add %s' % os.path.join(basedir,'app/pages/'))
    for page in pages:
        os.system('git add %s' % os.path.join(basedir, page.path))
    os.system('git commit -m "publishing articles %s"' % ' '.join(
            [page.path for page in pages]))
    if push or prompt_bool(
            "push from branch '%s' to remote '%s'? [y]" % (remote, branch)):
        os.system('git push %s %s' % (remote, branch))
Beispiel #3
0
def publish(push=False, remote='origin', branch='master'):
    """adds blog post pages in root directory to git staging, commits, 
    and optionally those blog posts to github"""
    freezer.freeze()

    for page in pages:
        os.system('git add %s' % page.path)
    os.system('git add %s' % os.path.join(basedir, 'app/pages/'))
    for page in pages:
        os.system('git add %s' % os.path.join(basedir, page.path))
    os.system('git commit -m "publishing articles %s"' %
              ' '.join([page.path for page in pages]))
    if push or prompt_bool("push from branch '%s' to remote '%s'? [y]" %
                           (remote, branch)):
        os.system('git push %s %s' % (remote, branch))
Beispiel #4
0
def publish(msg, push=False, remote='origin', branch='master'):
    """regenerates by freezing and commits everything, optionally pushes with given message
    arguments:
    msg: the commit message
    push=False: whether to push
    remote='origin'
    branch='master'
    """
    freezer.freeze()
    """
    for page in pages:
        os.system('git add %s' % page.path)
    os.system('git add %s' % os.path.join(basedir,'app/pages/'))
    for page in pages:
        os.system('git add %s' % os.path.join(basedir, page.path))
    """
    os.system('git commit -am "%s"' % msg)
    if push or prompt_bool("push to remote branch '%s %s'? [y]" %
                           (remote, branch)):
        os.system('git push %s %s' % (remote, branch))
Beispiel #5
0
# -*- coding: utf-8 -*-

from app import freezer

if __name__ == '__main__':
    freezer.freeze()
Beispiel #6
0
def freeze(debug=False):
    if debug:
        freezer.run(debug=True)
    freezer.freeze()
Beispiel #7
0
def freeze(debug=False):
    if debug:
        freezer.run(debug=True)
    freezer.freeze()