Re: [Rest2web-develop] Recent Issues
Brought to you by:
mjfoord
From: Michael F. <fuz...@vo...> - 2006-08-06 15:20:12
|
martin f krafft wrote: > also sprach Michael Foord <mi...@pc...> [2006.08.03.2322 +0100]: > >> make_dist.py now takes a 'nopause' option as a command line argument. >> > > Can r2w also get an option like this, to override the r2w.ini > setting? The following patch implements -n/--nopause > This patch is applied, but not yet committed. I will fix the unicode bug first. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Index: rest2web/command_line.py > =================================================================== > --- rest2web/command_line.py (revision 194) > +++ rest2web/command_line.py (working copy) > @@ -49,6 +49,7 @@ > 'template': None, > 'uservalues': [], > 'force': False, > + 'nopause': False, > } > > usage = "%prog [options] config_file" > @@ -88,6 +89,10 @@ > parser.add_option("-f", '--force', action="store_true", dest="force", > help="Force site without indexes, restindexes or template.") > # > + # No pause > + parser.add_option("-n", '--nopause', action="store_true", dest="nopause", > + help="Do not pause after processing (overrides setting in config file).") > + # > parser.set_defaults(**DEFAULTS) > # > (option_obj, args) = parser.parse_args() > @@ -107,6 +112,7 @@ > # > options['uservalues'] = get_uservalues(option_obj.uservalues, enc) > options['force'] = option_obj.force > + options['nopause'] = option_obj.nopause > # > # Sort the arguments > if args: > Index: r2w.py > =================================================================== > --- r2w.py (revision 194) > +++ r2w.py (working copy) > @@ -134,6 +134,7 @@ > pass > # > options, config = get_config() > + print options > if os.path.isfile('__dist__'): > print 'Won\'t run from distribution directory.' > print "Run 'make_dist.py' and use the distribution it creates." > @@ -202,7 +203,8 @@ > if standerr: > standerr.close() > # > - if istrue(config.get('pause', 'False')): > + if not options.get('nopause', False) \ > + and istrue(config.get('pause', 'False')): > raw_input('Hit return to continue >>> ') > > """ > > > > > Thanks, > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > |