Exemplo n.º 1
0
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)


outdir = get_docs_javascriptbuild_dir()

if args.clean:
    clean(outdir)
if not args.nobuild:
    build(outdir, args.openbrowser)
Exemplo n.º 2
0

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:
    print "--num_students --num_examiners --duckburghusers --deliverycountrange"
    exit(0)


require_djangoproject()
depends(Command('init_exampledb'),
        Command('load_grandmauser'))
if args.duckburghusers:
    depends(Command('load_duckburghusers'))

logging.basicConfig(level=logging.INFO, format='%(levelname)7s: %(message)s')