def options(cls): group = OptionGroup("Strava API") return compose_decorators( group.option('--client-id', 'strava_client_id', type=str, envvar='STRAVA_CLIENT_ID', show_envvar=True, default=cls.strava_client_id, help="Strava OAuth 2 client id"), group.option('--client-secret', 'strava_client_secret', type=str, envvar='STRAVA_CLIENT_SECRET', show_envvar=True, default=cls.strava_client_secret, help="Strava OAuth 2 client secret"), group.option('--token-file', 'strava_token_filename', type=PathType(dir_okay=False), default=cls.strava_token_filename, show_default=True, help="Strava OAuth 2 token store"), group.option('--http-host', type=str, default=cls.http_host, show_default=True, help="OAuth 2 HTTP server host"), group.option('--http-port', type=int, default=cls.http_port, show_default=True, help="OAuth 2 HTTP server port"), super().options())
def options(cls): group = OptionGroup("GPX storage") return compose_decorators( group.option( '--dir-activities', type=PathType(file_okay=False), default=cls.dir_activities, show_default=True, help="Directory to store gpx files indexed by activity id"), group.option( '--dir-activities-backup', type=PathType(file_okay=False), help= "Optional path to activities in Strava backup (no need to redownload these)" ), super().options())
def options(cls): group = OptionGroup("Sync options") return compose_decorators( group.option('--full / --no-full', default=cls.full, show_default=True, help="Perform full sync instead of incremental"), super().options())
def options(cls): group = OptionGroup("Database") return compose_decorators( group.option('--database', 'strava_sqlite_database', type=PathType(dir_okay=False), default=cls.strava_sqlite_database, show_default=True, help="Sqlite database file"), super().options())
def options(cls): group = OptionGroup("Strava web") return compose_decorators( group.option('--strava4-session', 'strava_cookie_strava4_session', type=str, envvar='STRAVA_COOKIE_STRAVA4_SESSION', show_envvar=True, required=True, help="'_strava4_session' cookie value"), super().options())