epilog = 'Example: {prog} --clean'.format(prog=getprogname()) description = """{currenthelp} Requires JSDuck: https://github.com/nene/jsduck Make sure you install with (notice --pre): $ [sudo] gem install --pre jsduck To get the latest version of jsduck. If you get docs with the same look and feel as the official ExtJS docs, you have the correct version of JSDuck. """ parser = DevilryAdmArgumentParser(description=description, epilog=epilog, formatter_class=RawDescriptionHelpFormatter) parser.add_argument('--nobuild', action='store_true', help='Do not build javascript docs. (Use this with --clean to only clean).') parser.add_argument('--clean', action='store_true', help='Remove the generated javascript docs.') parser.add_argument('-b', '--openbrowser', action='store_true', help='Open the docs in your default browser after building.') parser.add_argument('--completionlist', action='store_true', help='Print completionlist for bash completion.') args = parser.parse_args() if args.completionlist: print "--nobuild --clean --openbrowser" exit(0)
################################################################# from sys import exit from os.path import join import logging from common import (getscriptsdir, require_djangoproject, depends, Command, DevilryAdmArgumentParser) from django.contrib.auth.models import User from create_random_exampledata import create_example_assignment from devilry.apps.core.testhelper import TestHelper from devilry.apps.core import models parser = DevilryAdmArgumentParser(description='Process some integers.') parser.add_argument('-s', '--num_students', type=int, default=2, help='Number of students on each assignment (defaults to 2).') parser.add_argument('-e', '--num_examiners', type=int, default=1, help='Number of examiners on each assignment (defaults to 1).') parser.add_argument('-d', '--duckburghusers', action='store_true', help='Load duckburgh users.') parser.add_argument("--deliverycountrange", default='0-4', help=("Number of deliveries. If it is a range separated by '-', " "a random number of deliveries in this range is used. Defaults " "to '0-4'")) parser.add_argument('--completionlist', action='store_true', help='Print completionlist for bash completion.') args = parser.parse_args() if args.completionlist:
# database is used to generate the simplifed fixture, # which is used in many tests. ################################################################# from sys import exit from os.path import join import logging from common import getscriptsdir, require_djangoproject, depends, Command, DevilryAdmArgumentParser from django.contrib.auth.models import User from create_random_exampledata import create_example_assignment from devilry.apps.core.testhelper import TestHelper from devilry.apps.core import models parser = DevilryAdmArgumentParser(description="Process some integers.") parser.add_argument( "-s", "--num_students", type=int, default=2, help="Number of students on each assignment (defaults to 2)." ) parser.add_argument( "-e", "--num_examiners", type=int, default=1, help="Number of examiners on each assignment (defaults to 1)." ) parser.add_argument("-d", "--duckburghusers", action="store_true", help="Load duckburgh users.") parser.add_argument( "--deliverycountrange", default="0-4", help=( "Number of deliveries. If it is a range separated by '-', " "a random number of deliveries in this range is used. Defaults " "to '0-4'" ),
#!/usr/bin/env python # Build the docs as HTML using sphinx (using make html from docs/) from common import get_docsdir, get_docs_buildhtml_dir, DevilryAdmArgumentParser import os from os.path import join from subprocess import call import webbrowser from sys import exit parser = DevilryAdmArgumentParser() parser.add_argument('-b', '--openbrowser', action='store_true', help='Open the docs in your default browser after building.') parser.add_argument('--completionlist', action='store_true', help='Print completionlist for bash completion.') args = parser.parse_args() if args.completionlist: print "--openbrowser" exit(0) os.chdir(get_docsdir()) call(['make', 'html']) indexpath = join(get_docs_buildhtml_dir(), 'index.html') print '********************************************************************' print 'HTML documentation for python code built successfully. View it here:' print
epilog = 'Example: {prog} --clean'.format(prog=getprogname()) description = """{currenthelp} Requires JSDuck: https://github.com/nene/jsduck Make sure you install with (notice --pre): $ [sudo] gem install --pre jsduck To get the latest version of jsduck. If you get docs with the same look and feel as the official ExtJS docs, you have the correct version of JSDuck. """ parser = DevilryAdmArgumentParser(description=description, epilog=epilog, formatter_class=RawDescriptionHelpFormatter) parser.add_argument( '--nobuild', action='store_true', help='Do not build javascript docs. (Use this with --clean to only clean).' ) parser.add_argument('--clean', action='store_true', help='Remove the generated javascript docs.') parser.add_argument( '-b', '--openbrowser', action='store_true', help='Open the docs in your default browser after building.') parser.add_argument('--completionlist',