()
Main function of the script, setting up the shell manager.
Main function of the script, setting up the shell manager.
Main function of the script setting up the shell manager .
def main():
    """Main function of the script, setting up the shell manager."""
    # Setup Flask-script command manager and register commands.
    shell_manager = Manager(create_app)
    shell_manager.add_command('grant_user', GrantUser())
    shell_manager.add_command('add_user', AddUser())
    shell_manager.add_command('make_admin', MakeUserAdmin())
    shell_manager.add_command('list_users', ListUsers())
    shell_manager.add_command('add_group', AddGroup())
    shell_manager.add_command('list_groups', ListGroups)
    shell_manager.add_command('manage_group', GroupManager())
    shell_manager.add_command('add_index', AddSearchIndex())
    shell_manager.add_command('db', MigrateCommand)
    shell_manager.add_command('drop_db', DropDataBaseTables())
    shell_manager.add_command('list_sketches', ListSketches())
    shell_manager.add_command('purge', PurgeTimeline())
    shell_manager.add_command('search_template', SearchTemplateManager())
    shell_manager.add_command('import', ImportTimeline())
    shell_manager.add_command('version', GetVersion())
    shell_manager.add_command('disable_user', DisableUser())
    shell_manager.add_command("enable_user", EnableUser())
    shell_manager.add_command('runserver',
                              Server(host='127.0.0.1', port=5000))
    shell_manager.add_option(
        '-c',
        '--config',
        dest='config',
        default='/etc/timesketch/timesketch.conf',
        required=False)
    shell_manager.run()
def main ( ) : # Setup Flask-script command manager and register commands. shell_manager = Manager ( create_app ) shell_manager . add_command ( 'grant_user' , GrantUser ( ) ) shell_manager . add_command ( 'add_user' , AddUser ( ) ) shell_manager . add_command ( 'make_admin' , MakeUserAdmin ( ) ) shell_manager . add_command ( 'list_users' , ListUsers ( ) ) shell_manager . add_command ( 'add_group' , AddGroup ( ) ) shell_manager . add_command ( 'list_groups' , ListGroups ) shell_manager . add_command ( 'manage_group' , GroupManager ( ) ) shell_manager . add_command ( 'add_index' , AddSearchIndex ( ) ) shell_manager . add_command ( 'db' , MigrateCommand ) shell_manager . add_command ( 'drop_db' , DropDataBaseTables ( ) ) shell_manager . add_command ( 'list_sketches' , ListSketches ( ) ) shell_manager . add_command ( 'purge' , PurgeTimeline ( ) ) shell_manager . add_command ( 'search_template' , SearchTemplateManager ( ) ) shell_manager . add_command ( 'import' , ImportTimeline ( ) ) shell_manager . add_command ( 'version' , GetVersion ( ) ) shell_manager . add_command ( 'disable_user' , DisableUser ( ) ) shell_manager . add_command ( "enable_user" , EnableUser ( ) ) shell_manager . add_command ( 'runserver' , Server ( host = '127.0.0.1' , port = 5000 ) ) shell_manager . add_option ( '-c' , '--config' , dest = 'config' , default = '/etc/timesketch/timesketch.conf' , required = False ) shell_manager . run ( )