def main(): global _plain_logger, _plain_error_logger app = FeedlyApp() parser, args = parse_args(app, sys.argv[1:]) loggingutil.setup_logger(_log, debug=args.debug) if not args.debug: # suppress noisy modules _log.getChild("requests").setLevel(logging.WARN) _plain_logger = loggingutil.create_plain_logger( "PLAIN", debug=args.debug, ) _plain_error_logger = loggingutil.create_plain_logger( "PLAIN_ERROR", debug=args.debug, stdout=False, ) app.process_args(parser, args) code = args.func(args) if code is not None: sys.exit(code)
def main(): global _PLAIN_LOGGER, _PLAIN_ERROR_LOGGER args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_LOG, debug=args.debug) _PLAIN_LOGGER = loggingutil.create_plain_logger("PLAIN") _PLAIN_ERROR_LOGGER = loggingutil.create_plain_logger( "PLAIN_ERROR", stdout=False, ) app = App(args.wishlist_id) app.run()
def main(): global _plain_error_logger args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_log, debug=args.debug) if not args.debug: # tone down the verbosity of some modules verbose_modules = [ "googleapiclient.discovery", "oauth2client.client", "requests", ] for mod in verbose_modules: logging.getLogger(mod).setLevel( logging.WARNING ) _plain_error_logger = loggingutil.create_plain_logger( "PLAIN_ERROR", debug=args.debug, stdout=False, ) app = MoveFast(args) sys.exit(app.run())
def main(): global _plain_logger, _plain_error_logger app = GoogleTasksConsoleApp() args = parse_args(app, sys.argv[1:]) loggingutil.setup_logger(_log, debug=args.debug) _plain_logger = loggingutil.create_plain_logger( "PLAIN", debug=args.debug, ) _plain_error_logger = loggingutil.create_plain_logger( "PLAIN_ERROR", debug=args.debug, stdout=False, ) args.func(args)
def main(): global _plain_logger, _plain_error_logger args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_log, debug=args.debug) _plain_logger = loggingutil.create_plain_logger( "PLAIN", debug=args.debug, ) _plain_error_logger = loggingutil.create_plain_logger( "PLAIN_ERROR", debug=args.debug, stdout=False, ) app = App(args) sys.exit(app.run())
def main(): global _PLAIN_LOGGER args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_LOG, debug=args.debug) _PLAIN_LOGGER = loggingutil.create_plain_logger("PLAIN") app = App() app.run()
def main(): global _PLAIN_LOGGER, _PLAIN_ERROR_LOGGER args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_LOG, debug=args.debug) _PLAIN_LOGGER = loggingutil.create_plain_logger("PLAIN") _PLAIN_ERROR_LOGGER = loggingutil.create_plain_logger("PLAIN_ERROR", stdout=False) for stock_symbol in args.stock_symbol: app = StockApp( stock_symbol, print_history=args.history, print_price_quote=not args.no_price_quote, print_fundamentals=args.fundamentals, num_of_days_for_history=args.num_of_days, print_insider_purchases=args.insider_purchases, ) app.run()
def main(): global _plain_logger, _plain_error_logger app = App() args = parse_args(app, sys.argv[1:]) loggingutil.setup_logger(_log, debug=args.debug) _plain_logger = loggingutil.create_plain_logger( "PLAIN", debug=args.debug, ) _plain_error_logger = loggingutil.create_plain_logger( "PLAIN_ERROR", debug=args.debug, stdout=False, ) code = args.func(args) if code is not None: sys.exit(code)
def main(): global _plain_logger args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_log, debug=args.debug) _plain_logger = loggingutil.create_plain_logger("PLAIN") app = App(args.url, stop_at=args.stop_at) app.run()
def main(): global _PLAIN_LOGGER args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_LOG, debug=args.debug) _PLAIN_LOGGER = loggingutil.create_plain_logger("PLAIN") app = PodcastDownloader(args.feed_url, out_dir=args.out_dir) app.run()
def main(): global _PLAIN_LOGGER args = parse_args(sys.argv[1:]) loggingutil.setup_logger(_LOG, debug=args.debug) _PLAIN_LOGGER = loggingutil.create_plain_logger("PLAIN") app = DownloadAllApp( args.url, args.regex, args.out_dir, dry_run=args.dry_run, ) app.run()
def main(): global _PLAIN_LOGGER app = DropboxApp( DROPBOX_APP_KEY or os.getenv('DROPBOX_APP_KEY'), DROPBOX_APP_SECRET or os.getenv('DROPBOX_APP_SECRET'), ) args = parse_args(app, sys.argv[1:]) loggingutil.setup_logger(_LOG, debug=args.debug) _PLAIN_LOGGER = loggingutil.create_plain_logger( "PLAIN", debug=args.debug, ) return args.func(args)