organize/main.py
def main():
    """ entry point for the command line interface """
    args = docopt(__doc__, version=__version__, help=True)
    # > organize config
    if args['config']:
        if args['--open-folder']:
            open_in_filemanager(config_dir)
        elif args['--path']:
            puts(str(config_path))
        elif args['--debug']:
            config_debug()
        else:
            config_edit()
    # > organize list
    elif args['list']:
        list_actions_and_filters()
    # > organize sim / run
    else:
        try:
            config = Config.from_file(config_path)
            execute_rules(config.rules, simulate=args['sim'])
        except Config.Error as e:
            logger.exception(e)
            print_error(e)
            puts("Try 'organize config --debug' for easier debugging.")
            puts('Full traceback at: %s' % log_path)
            sys.exit(1)
        except Exception as e:
            logger.exception(e)
            print_error(e)
            puts('Full traceback at: %s' % log_path)
            sys.exit(1)
 entry point for the command line interface 
entry point for the command line interface
entry point for the command line interface
def main():
    args = docopt(__doc__, version=__version__, help=True)
    if args['config']:
        if args['--open-folder']:
            open_in_filemanager(config_dir)
        elif args['--path']:
            puts(str(config_path))
        elif args['--debug']:
            config_debug()
        else:
            config_edit()
    elif args['list']:
        list_actions_and_filters()
    else:
        try:
            config = Config.from_file(config_path)
            execute_rules(config.rules, simulate=args['sim'])
        except Config.Error as e:
            logger.exception(e)
            print_error(e)
            puts("Try 'organize config --debug' for easier debugging.")
            puts('Full traceback at: %s' % log_path)
            sys.exit(1)
        except Exception as e:
            logger.exception(e)
            print_error(e)
            puts('Full traceback at: %s' % log_path)
            sys.exit(1)
def main ( ) : args = docopt ( __doc__ , version = __version__ , help = True ) if args [ 'config' ] : if args [ '--open-folder' ] : open_in_filemanager ( config_dir ) elif args [ '--path' ] : puts ( str ( config_path ) ) elif args [ '--debug' ] : config_debug ( ) else : config_edit ( ) elif args [ 'list' ] : list_actions_and_filters ( ) else : try : config = Config . from_file ( config_path ) execute_rules ( config . rules , simulate = args [ 'sim' ] ) except Config . Error as e : logger . exception ( e ) print_error ( e ) puts ( "Try 'organize config --debug' for easier debugging." ) puts ( 'Full traceback at: %s' % log_path ) sys . exit ( 1 ) except Exception as e : logger . exception ( e ) print_error ( e ) puts ( 'Full traceback at: %s' % log_path ) sys . exit ( 1 )
entry point for the command line interface
entry point for the command line interface
""" entry point for the command line interface """ # > organize config # > organize list # > organize sim / run