Example #1
0
def build(options):
    sh('cp %s/index.rst %s' % (options.build.confdir,options.build.sourcedir))

    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    bi = sh('git describe --long',capture=True)[:-1]
    bi = bi.split('-')[0]
    options.build.template_args["build_info"] = bi


    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options, 'build')

    if updateProgressTables:
        print 'Creating Chapter Information'
        populateChapterInfo(project_name, "%s/index.rst" % options.build.confdir)
Example #2
0
def thinkcspy(options):
    sh('cp %s/index.rst %s' % (options.thinkcspy.confdir,options.thinkcspy.sourcedir))

    if 'all' in options.thinkcspy:
      options['force_all'] = True
      options['freshenv'] = True
    paverutils.run_sphinx(options,'thinkcspy')
Example #3
0
def everyday(options):

    if 'all' in options.everyday:
      options['force_all'] = True
      options['freshenv'] = True

    paverutils.run_sphinx(options,'everyday')
Example #4
0
def pythonds(options):
    sh('cp %s/index.rst %s' % (options.pythonds.confdir,options.pythonds.sourcedir))

    if 'all' in options.pythonds:
      options['force_all'] = True
      options['freshenv'] = True
    paverutils.run_sphinx(options,'pythonds')
Example #5
0
def build(options):
    sh('cp %s/index.rst %s' % (options.build.confdir,options.build.sourcedir))

    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    bi = sh('git describe --long',capture=True)[:-1]
    bi = bi.split('-')[0]
    options.build.template_args["build_info"] = bi

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options,'build')

    if updateProgressTables:
        print 'Creating Chapter Information'
        populateChapterInfo(project_name, "%s/toc.rst" % options.build.sourcedir)
Example #6
0
def build(options):
    sh("cp %s/index.rst %s" % (options.build.confdir, options.build.sourcedir))

    if "all" in options.build:
        options["force_all"] = True
        options["freshenv"] = True

    bi = sh("git describe --long", capture=True)[:-1]
    bi = bi.split("-")[0]
    options.build.template_args["build_info"] = bi

    if "outputdir" in options.build:
        options.build.outdir = options.build.outputdir

    if "masterurl" in options.build:
        options.build.template_args["course_url"] = options.build.masterurl

    if "masterapp" in options.build:
        options.build.template_args["appname"] = options.build.masterapp

    print "Building into ", options.build.outdir
    paverutils.run_sphinx(options, "build")

    if updateProgressTables:
        print "Creating Chapter Information"
        populateChapterInfo(project_name, "%s/toc.rst" % options.build.sourcedir)
Example #7
0
def text(options):
    "Generate text files from rst input."
    if paverutils is None:
        raise RuntimeError(
            'Could not find sphinxcontrib.paverutils, will not be able to build text output.'
        )
    paverutils.run_sphinx(options, 'text')
    return
Example #8
0
def devcourse(options):
    sh('cp %s/index.rst %s' % (options.devcourse.confdir,options.devcourse.sourcedir))

    if 'all' in options.devcourse:
      options['force_all'] = True
      options['freshenv'] = True

    paverutils.run_sphinx(options,'devcourse')
Example #9
0
def webhtml(options):
    """Generate HTML files for website.
    """
    set_templates(options.website.templates)
    if paverutils is None:
        raise RuntimeError('Could not find sphinxcontrib.paverutils, will not be able to build HTML output.')
    paverutils.run_sphinx(options, 'website')
    sitemap_gen()
    return
Example #10
0
def webhtml(options):
    """Generate HTML files for website.
    """
    set_templates(options.website.templates)
    if paverutils is None:
        raise RuntimeError('Could not find sphinxcontrib.paverutils, will not be able to build HTML output.')
    paverutils.run_sphinx(options, 'website')
    sh('rsync --archive --verbose "%s" "%s"' % (options.website.css_source, options.website.css_dest))
    sh('rsync --archive --verbose "%s" "%s"' % (options.website.images_source, options.website.images_dest))
    return
Example #11
0
def webhtml(options):
    """Generate HTML files for website.
    """
    set_templates(options.website.templates)
    if paverutils is None:
        raise RuntimeError('Could not find sphinxcontrib.paverutils, will not be able to build HTML output.')
    paverutils.run_sphinx(options, 'website')
    #sh('rsync --archive --verbose "%s" "%s"' % (options.website.css_source, options.website.css_dest))
    #sh('rsync --archive --verbose "%s" "%s"' % (options.website.images_source, options.website.images_dest))
    return
Example #12
0
def webhtml(options):
    """Generate HTML files for website.
    """
    set_templates(options.website.templates)
    if paverutils is None:
        raise RuntimeError(
            'Could not find sphinxcontrib.paverutils, will not be able to build HTML output.'
        )
    paverutils.run_sphinx(options, 'website')
    sitemap_gen()
    return
Example #13
0
def build(options):
    if 'all' in options.build:
        options['force_all'] = True
        options['freshenv'] = True

    bi = sh('git describe --long', capture=True)[:-1]
    bi = bi.split('-')[0]
    options.build.template_args["build_info"] = bi

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir
    print 'Building into ', options.build.outdir
    paverutils.run_sphinx(options, 'build')
Example #14
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    bi = sh('git describe --long',capture=True)[:-1]
    bi = bi.split('-')[0]
    options.build.template_args["build_info"] = bi

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir
    print 'Building into ', options.build.outdir
    paverutils.run_sphinx(options,'build')
Example #15
0
def gettext(options):
    "Collect all translatable strings from rst input."
    # Clean and recreate output directory
    remake_directories(options.gettext.outdir)
    set_templates(options.gettext.templates)
    if paverutils is None:
        raise RuntimeError('Could not find sphinxcontrib.paverutils, will not be able to build text output.')
    # Extract messages (POT)
    paverutils.run_sphinx(options, "gettext")    
    # Update translations PO: TODO: read conf["locale_dirs"][0] & language (es)
    sh('sphinx-intl update -p "%s" --locale-dir locale -l es' % (options.gettext.build_dir, ))
    # Remember to build the MO files once translated:
    sh('sphinx-intl build -p "%s" --locale-dir locale' % (options.gettext.build_dir, ))
    return
Example #16
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options,'build')
Example #17
0
def build(options):
    if "all" in options.build:
        options["force_all"] = True
        options["freshenv"] = True

    try:
        bi = sh("git describe --long", capture=True)[:-1]
        bnum = bi.split("-")[0]
        options.build.template_args["build_info"] = bnum
    except:
        bi = "unknown-0-0"
        options.build.template_args["build_info"] = "unknown"

    with open("build_info", "w") as bif:
        bif.write(bi)
        bif.write("\n")

    if "outputdir" in options.build:
        options.build.outdir = options.build.outputdir

    if "masterurl" in options.build:
        options.build.template_args["course_url"] = options.build.masterurl

    if "masterapp" in options.build:
        options.build.template_args["appname"] = options.build.masterapp

    print("Building into ", options.build.outdir)
    rc = paverutils.run_sphinx(options, "build")

    if rc == 0 or rc is None:
        print("Done, build successful")
    else:
        print("Error in building code {}".format(rc))

    return rc
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    try:
        bi = sh('git describe --long',capture=True)[:-1]
        bnum = bi.split('-')[0]
        options.build.template_args["build_info"] = bnum
    except:
        bi = "unknown-0-0"
        options.build.template_args["build_info"] = 'unknown'

    with open('build_info','w') as bif:
        bif.write(bi)
        bif.write("\n")

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print('Building into ', options.build.outdir)
    rc = paverutils.run_sphinx(options,'build')

    if rc == 0 or rc is None:
        print("Done, build successful")
    else:
        print("Error in building code {}".format(rc))

    return rc
Example #19
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options,'build')
Example #20
0
def build(options):
    if 'all' in options.build:
        options['force_all'] = True
        options['freshenv'] = True

    try:
        bi = sh('git describe --long', capture=True)[:-1]
        bnum = bi.split('-')[0]
        options.build.template_args["build_info"] = bnum
    except:
        bi = "unknown-0-0"
        options.build.template_args["build_info"] = 'unknown'

    with open('build_info', 'w') as bif:
        bif.write(bi)
        bif.write("\n")

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print('Building into ', options.build.outdir)
    rc = paverutils.run_sphinx(options, 'build')

    if rc == 0:
        print("Done, {} build successful".format(options.build.project_name))
    else:
        print("Error in building {}".format(options.build.project_name))
Example #21
0
def blog(options):
    """Generate the blog post version of the HTML for the current module.
    
    The default behavior generates the post for the current module using 
    its index.html file as input.
    
    To use a different file within the module directory, use the 
    --in-file or -b option::
    
      paver blog -b communication.html
      
    To run against a directory other than a module, use the 
    -s or --sourcedir option::
    
      paver blog -s PyMOTW/articles -b text_processing.html
    """
    # Clean and recreate output directory
    remake_directories(options.blog.outdir)

    # Generate html from sphinx
    if paverutils is None:
        raise RuntimeError(
            'Could not find sphinxcontrib.paverutils, will not be able to build HTML output.'
        )
    paverutils.run_sphinx(options, 'blog')

    blog_file = path(options.blog.outdir) / options.blog.out_file
    dry(
        "Write blog post body to %s" % blog_file,
        gen_blog_post,
        outdir=options.blog.outdir,
        input_base=options.blog.in_file,
        blog_base=options.blog.out_file,
        url_base=options.blog.sourcedir,
    )

    title = get_post_title(path(options.blog.outdir) / options.blog.in_file)

    if not options.no_edit:
        if os.path.exists('bin/SendToMarsEdit.applescript'):
            sh('osascript bin/SendToMarsEdit.applescript "%s" "%s"' %
               (blog_file, "PyMOTW: %s" % title))

        elif 'EDITOR' in os.environ:
            sh('$EDITOR %s' % blog_file)
    return
Example #22
0
def gettext(options):
    "Collect all translatable strings from rst input."
    # Create output directory & separate doctree directory
    for dir in (options.gettext.outdir,
                os.path.dirname(options.gettext.doctrees)):
        if not os.path.exists(dir):
            os.makedirs(dir)
    # Extract messages (POT)
    options.order('gettext', 'sphinx', add_rest=True)
    from sphinxcontrib import paverutils
    paverutils.run_sphinx(options, "gettext")
    # Update translations PO: TODO: read conf["locale_dirs"][0] & language (es)
    sh('sphinx-intl update -p "%s" --locale-dir locale -l es' %
       (options.gettext.outdir, ))
    # Remember to build the MO files once translated:
    sh('sphinx-intl build --locale-dir locale')
    return
Example #23
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    options.build.template_args["build_info"] = sh('git describe --long',capture=True)[:-1]

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options,'build')
Example #24
0
def gettext(options):
    "Collect all translatable strings from rst input."
    # Clean and recreate output directory
    remake_directories(options.gettext.outdir)
    set_templates(options.gettext.templates)
    if paverutils is None:
        raise RuntimeError(
            'Could not find sphinxcontrib.paverutils, will not be able to build text output.'
        )
    # Extract messages (POT)
    paverutils.run_sphinx(options, "gettext")
    # Update translations PO: TODO: read conf["locale_dirs"][0] & language (es)
    sh('sphinx-intl update -p "%s" --locale-dir locale -l es' %
       (options.gettext.build_dir, ))
    # Remember to build the MO files once translated:
    sh('sphinx-intl build -p "%s" --locale-dir locale' %
       (options.gettext.build_dir, ))
    return
Example #25
0
def blog(options):
    """Generate the blog post version of the HTML for the current module.
    
    The default behavior generates the post for the current module using 
    its index.html file as input.
    
    To use a different file within the module directory, use the 
    --in-file or -b option::
    
      paver blog -b communication.html
      
    To run against a directory other than a module, use the 
    -s or --sourcedir option::
    
      paver blog -s PyMOTW/articles -b text_processing.html
    """    
    # Clean and recreate output directory
    remake_directories(options.blog.outdir)
    
    # Generate html from sphinx
    if paverutils is None:
        raise RuntimeError('Could not find sphinxcontrib.paverutils, will not be able to build HTML output.')
    paverutils.run_sphinx(options, 'blog')
    
    blog_file = path(options.blog.outdir) / options.blog.out_file
    dry("Write blog post body to %s" % blog_file, 
        gen_blog_post, 
        outdir=options.blog.outdir, 
        input_base=options.blog.in_file, 
        blog_base=options.blog.out_file,
        url_base=options.blog.sourcedir,
        )

    title = get_post_title(path(options.blog.outdir) / options.blog.in_file)
    
    if not options.no_edit:
        if os.path.exists('bin/SendToMarsEdit.applescript'):
            sh('osascript bin/SendToMarsEdit.applescript "%s" "%s"' % 
                (blog_file, "PyMOTW: %s" % title)
                )

        elif 'EDITOR' in os.environ:
            sh('$EDITOR %s' % blog_file)
    return
Example #26
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir    
    paverutils.run_sphinx(options,'build')

    if updateProgressTables:
        print 'Creating Chapter Information'
        populateChapterInfo(project_name, "%s/index.rst" % options.build.sourcedir)
Example #27
0
def build(options):
    sh('cp %s/index.rst %s' % (options.build.confdir, options.build.sourcedir))

    if 'all' in options.build:
        options['force_all'] = True
        options['freshenv'] = True

    bi = sh('git describe --long', capture=True)[:-1]
    bi = bi.split('-')[0]
    options.build.template_args["build_info"] = bi

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print 'Building into ', options.build.outdir
    paverutils.run_sphinx(options, 'build')
Example #28
0
def gettext(options):
    "Collect all translatable strings from rst input."
    # Clean and recreate output directory
    remake_directories(options.gettext.outdir)
    # Choosing another doctree directory
    remake_directories(os.path.dirname(options.gettext.doctrees))
    # Set templates environment variable, used by sphinx/conf.py
    ##os.environ['TEMPLATES'] = options.gettext.templates
    if paverutils is None:
        raise RuntimeError(
            'Could not find sphinxcontrib.paverutils, will not be able to build text output.'
        )
    # Extract messages (POT)
    ##import dbg; dbg.set_trace()
    options.order('gettext', 'sphinx', add_rest=True)
    paverutils.run_sphinx(options, "gettext")
    # Update translations PO: TODO: read conf["locale_dirs"][0] & language (es)
    sh('sphinx-intl update -p "%s" --locale-dir locale -l es' %
       (options.gettext.outdir, ))
    # Remember to build the MO files once translated:
    sh('sphinx-intl build --locale-dir locale')
    return
Example #29
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    try:
        bi = sh('git describe --long',capture=True)[:-1]
        bnum = bi.split('-')[0]
        options.build.template_args["build_info"] = bnum
    except:
        bi = "unknown-0-0"
        options.build.template_args["build_info"] = 'unknown'

    with open('build_info','w') as bif:
        bif.write(bi)
        bif.write("\n")

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print('Building into ', options.build.outdir)
    rc = paverutils.run_sphinx(options,'build')


    try:
        sys.path.insert(0,os.path.join('..','..','modules'))
        if os.path.exists(os.path.join(options.build.sourcedir,'toc.rst')):
            idxfile = os.path.join(options.build.sourcedir,'toc.rst')
        else:
            idxfile = os.path.join(options.build.sourcedir,'index.rst')
        from chapternames import populateChapterInfo
        populateChapterInfo(options.build.project_name, idxfile)
        print('Creating Chapter Information')
    except ImportError as e:
        print('Chapter information database population skipped, This is OK for a standalone build.',e)
    except Exception as e:
        print('Chapter Information Creation Failed with', e)

    if rc == 0:
        print("Done, {} build successful".format(options.build.project_name))
    else:
        print("Error in building {}".format(options.build.project_name) )
Example #30
0
def build(options):
    if 'all' in options.build:
        options['force_all'] = True
        options['freshenv'] = True

    try:
        bi = sh('git describe --long', capture=True)[:-1]
        bnum = bi.split('-')[0]
        options.build.template_args["build_info"] = bnum
    except:
        bi = "unknown-0-0"
        options.build.template_args["build_info"] = 'unknown'

    with open('build_info', 'w') as bif:
        bif.write(bi)
        bif.write("\n")

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print('Building into ', options.build.outdir)
    rc = paverutils.run_sphinx(options, 'build')

    try:
        if os.path.exists(os.path.join(options.build.sourcedir, 'toc.rst')):
            idxfile = os.path.join(options.build.sourcedir, 'toc.rst')
        else:
            idxfile = os.path.join(options.build.sourcedir, 'index.rst')

        populateChapterInfo(options.build.project_name, idxfile)
        print('Creating Chapter Information')
    except ImportError as e:
        print(
            'Chapter information database population skipped, This is OK for a standalone build.',
            e)
    except Exception as e:
        print('Chapter Information Creation Failed with', e)

    if rc == 0:
        print("Done, {} build successful".format(options.build.project_name))
    else:
        print("Error in building {}".format(options.build.project_name))
Example #31
0
def build(options):
    if "all" in options.build:
        options["force_all"] = True
        options["freshenv"] = True

    try:
        bi = sh("git describe --long", capture=True)[:-1]
        bnum = bi.split("-")[0]
        options.build.template_args["build_info"] = bnum
    except:
        bi = "unknown-0-0"
        options.build.template_args["build_info"] = "unknown"

    with open("build_info", "w") as bif:
        bif.write(bi)
        bif.write("\n")

    if "outputdir" in options.build:
        options.build.outdir = options.build.outputdir

    if "masterurl" in options.build:
        options.build.template_args["course_url"] = options.build.masterurl

    if "masterapp" in options.build:
        options.build.template_args["appname"] = options.build.masterapp

    print("Building into ", options.build.outdir)
    rc = paverutils.run_sphinx(options, "build")

    try:
        if os.path.exists(os.path.join(options.build.sourcedir, "toc.rst")):
            idxfile = os.path.join(options.build.sourcedir, "toc.rst")
        else:
            idxfile = os.path.join(options.build.sourcedir, "index.rst")

        populateChapterInfo(options.build.project_name, idxfile)
        print("Creating Chapter Information for {}".format(idxfile))
    except ImportError as e:
        print("Chapter information database population skipped, This is OK for a standalone build.", e)
    except Exception as e:
        print("Chapter Information Creation Failed with", e)

    if rc == 0:
        print("Done, {} build successful".format(options.build.project_name))
    else:
        print("Error in building {}".format(options.build.project_name))
Example #32
0
def build(options):
    if 'all' in options.build:
      options['force_all'] = True
      options['freshenv'] = True

    try:
        bi = sh('git describe --long',capture=True)[:-1]
        bi = bi.split('-')[0]
        options.build.template_args["build_info"] = bi
    except:
        options.build.template_args["build_info"] = 'unknown'

    if 'outputdir' in options.build:
        options.build.outdir = options.build.outputdir

    if 'masterurl' in options.build:
        options.build.template_args['course_url'] = options.build.masterurl

    if 'masterapp' in options.build:
        options.build.template_args['appname'] = options.build.masterapp

    print('Building into ', options.build.outdir)
    rc = paverutils.run_sphinx(options,'build')


    try:
        from chapternames import populateChapterInfo
        populateChapterInfo(options.build.project_name, "%s/index.rst" % options.build.sourcedir)
        print('Creating Chapter Information')
    except ImportError:
        print('Chapter information database population skipped, This is OK for a standalone build.')

    if rc == 0:
        print("Done, {} build successful".format(options.build.project_name))
    else:
        print("Error in building {}".format(options.build.project_name) )
Example #33
0
def overview(options):
    if 'all' in options.overview:
      options['force_all'] = True
      options['freshenv'] = True

    paverutils.run_sphinx(options,'overview')
Example #34
0
def text(options):
    "Generate text files from rst input."
    if paverutils is None:
        raise RuntimeError('Could not find sphinxcontrib.paverutils, will not be able to build text output.')
    paverutils.run_sphinx(options, 'text')
    return
Example #35
0
def overview(options):
    paverutils.run_sphinx(options,'overview')
Example #36
0
def devcourse(options):
    sh('cp %s/index.rst %s' % (options.devcourse.confdir,options.devcourse.sourcedir))

    paverutils.run_sphinx(options,'devcourse')
Example #37
0
def everyday(options):
    paverutils.run_sphinx(options,'everyday')
Example #38
0
def thinkcspy(options):
    sh('cp %s/index.rst %s' % (options.thinkcspy.confdir,options.thinkcspy.sourcedir))

    paverutils.run_sphinx(options,'thinkcspy')
Example #39
0
def pythonds(options):
    sh('cp %s/index.rst %s' % (options.pythonds.confdir,options.pythonds.sourcedir))

    paverutils.run_sphinx(options,'pythonds')
Example #40
0
def spelling(options):
    "Check spelling."
    rc = paverutils.run_sphinx(options, 'spelling')
    if rc:
        raise ValueError('Found spelling mistake')
def linkcheck():
    """Check outgoing links
    """
    options.order('linkcheck', 'sphinx', add_rest=True)
    paverutils.run_sphinx(options, 'linkcheck')
    return