2022-04-24 13:17:38 +02:00
<!DOCTYPE html>
2022-06-22 20:22:26 +02:00
< html lang = "en" >
2022-04-24 13:17:38 +02:00
< head >
< meta charset = "utf-8" / >
2022-07-27 11:10:29 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / > < meta name = "generator" content = "Docutils 0.19: https://docutils.sourceforge.io/" / >
2022-04-24 13:17:38 +02:00
2023-05-29 14:35:09 +02:00
< title > Command line interface — FitTrackee 0.7.16
2022-04-24 13:17:38 +02:00
documentation< / title >
< link rel = "stylesheet" type = "text/css" href = "_static/pygments.css" / >
< link rel = "stylesheet" type = "text/css" href = "_static/bootstrap-sphinx.css" / >
2022-11-27 12:06:42 +01:00
< link rel = "stylesheet" type = "text/css" href = "_static/css/fork-awesome.min.css" / >
< link rel = "stylesheet" type = "text/css" href = "_static/css/custom.css" / >
2022-04-24 13:17:38 +02:00
< script data-url_root = "./" id = "documentation_options" src = "_static/documentation_options.js" > < / script >
< script src = "_static/jquery.js" > < / script >
< script src = "_static/underscore.js" > < / script >
2022-06-22 20:22:26 +02:00
< script src = "_static/_sphinx_javascript_frameworks_compat.js" > < / script >
2022-04-24 13:17:38 +02:00
< script src = "_static/doctools.js" > < / script >
2022-11-01 19:58:12 +01:00
< script src = "_static/sphinx_highlight.js" > < / script >
2022-04-24 13:17:38 +02:00
< link rel = "index" title = "Index" href = "genindex.html" / >
< link rel = "search" title = "Search" href = "search.html" / >
2023-04-12 17:32:08 +02:00
< link rel = "next" title = "Third-party tools" href = "third_party_tools.html" / >
2022-04-24 13:17:38 +02:00
< link rel = "prev" title = "Installation" href = "installation.html" / >
< meta charset = 'utf-8' >
< meta http-equiv = 'X-UA-Compatible' content = 'IE=edge,chrome=1' >
< meta name = 'viewport' content = 'width=device-width, initial-scale=1.0, maximum-scale=1' >
< meta name = "apple-mobile-web-app-capable" content = "yes" >
< script type = "text/javascript" src = "_static/js/jquery-1.12.4.min.js" > < / script >
< script type = "text/javascript" src = "_static/js/jquery-fix.js" > < / script >
< script type = "text/javascript" src = "_static/bootstrap-3.4.1/js/bootstrap.min.js" > < / script >
< script type = "text/javascript" src = "_static/bootstrap-sphinx.js" > < / script >
< / head > < body >
< div id = "navbar" class = "navbar navbar-default navbar-fixed-top" >
< div class = "container" >
< div class = "navbar-header" >
<!-- .btn - navbar is used as the toggle for collapsed navbar content -->
< button type = "button" class = "navbar-toggle" data-toggle = "collapse" data-target = ".nav-collapse" >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< / button >
< a class = "navbar-brand" href = "index.html" >
FitTrackee< / a >
2023-05-29 14:35:09 +02:00
< span class = "navbar-text navbar-version pull-left" > < b > 0.7.16
2022-04-24 13:17:38 +02:00
< / b > < / span >
< / div >
< div class = "collapse navbar-collapse nav-collapse" >
< ul class = "nav navbar-nav" >
< li > < a href = "https://github.com/SamR1/FitTrackee" > GitHub< / a > < / li >
< li class = "dropdown globaltoc-container" >
< a role = "button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="index.html">Docs < b class = "caret" > < / b > < / a >
< ul class = "dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc">< ul class = "current" >
< li class = "toctree-l1" > < a class = "reference internal" href = "features.html" > Features< / a > < / li >
2023-04-12 17:32:08 +02:00
< li class = "toctree-l1" > < a class = "reference internal" href = "oauth.html" > OAuth 2.0< / a > < / li >
2022-04-24 13:17:38 +02:00
< li class = "toctree-l1" > < a class = "reference internal" href = "installation.html" > Installation< / a > < / li >
< li class = "toctree-l1 current" > < a class = "current reference internal" href = "#" > Command line interface< / a > < / li >
2023-04-12 17:32:08 +02:00
< li class = "toctree-l1" > < a class = "reference internal" href = "third_party_tools.html" > Third-party tools< / a > < / li >
2022-04-24 13:17:38 +02:00
< li class = "toctree-l1" > < a class = "reference internal" href = "api/index.html" > API documentation< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "troubleshooting/index.html" > Troubleshooting< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "changelog.html" > Change log< / a > < / li >
< / ul >
< / ul >
< / li >
< li class = "dropdown" >
< a role = "button"
id="dLabelLocalToc"
data-toggle="dropdown"
data-target="#"
href="#">Page < b class = "caret" > < / b > < / a >
< ul class = "dropdown-menu localtoc"
role="menu"
aria-labelledby="dLabelLocalToc">< ul >
< li > < a class = "reference internal" href = "#" > Command line interface< / a > < ul >
< li > < a class = "reference internal" href = "#database" > Database< / a > < ul >
< li > < a class = "reference internal" href = "#ftcli-db-drop" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > db< / span > < span class = "pre" > drop< / span > < / code > < / a > < / li >
2023-03-05 14:26:31 +01:00
< li > < a class = "reference internal" href = "#ftcli-db-upgrade" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > db< / span > < span class = "pre" > upgrade< / span > < / code > < / a > < / li >
2022-04-24 13:17:38 +02:00
< / ul >
< / li >
2022-08-27 16:50:29 +02:00
< li > < a class = "reference internal" href = "#oauth2" > OAuth2< / a > < ul >
< li > < a class = "reference internal" href = "#ftcli-oauth2-clean" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > oauth2< / span > < span class = "pre" > clean< / span > < / code > < / a > < / li >
< / ul >
< / li >
2022-04-24 13:17:38 +02:00
< li > < a class = "reference internal" href = "#users" > Users< / a > < ul >
2023-03-05 14:26:31 +01:00
< li > < a class = "reference internal" href = "#ftcli-users-clean-archives" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > clean_archives< / span > < / code > < / a > < / li >
2022-09-15 16:11:13 +02:00
< li > < a class = "reference internal" href = "#ftcli-users-clean-tokens" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > clean_tokens< / span > < / code > < / a > < / li >
2023-04-12 17:32:08 +02:00
< li > < a class = "reference internal" href = "#ftcli-users-create" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > create< / span > < / code > < / a > < / li >
2023-03-05 14:26:31 +01:00
< li > < a class = "reference internal" href = "#ftcli-users-export-archives" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > export_archives< / span > < / code > < / a > < / li >
2022-04-24 13:17:38 +02:00
< li > < a class = "reference internal" href = "#ftcli-users-update" > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > update< / span > < / code > < / a > < / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / ul >
< / li >
< li >
< a href = "installation.html" title = "Previous Chapter: Installation" > < span class = "glyphicon glyphicon-chevron-left visible-sm" > < / span > < span class = "hidden-sm hidden-tablet" > « Installation< / span >
< / a >
< / li >
< li >
2023-04-12 17:32:08 +02:00
< a href = "third_party_tools.html" title = "Next Chapter: Third-party tools" > < span class = "glyphicon glyphicon-chevron-right visible-sm" > < / span > < span class = "hidden-sm hidden-tablet" > Third-party tools » < / span >
2022-04-24 13:17:38 +02:00
< / a >
< / li >
< li class = "hidden-sm" >
< div id = "sourcelink" >
< a href = "_sources/cli.rst.txt"
rel="nofollow">Source< / a >
< / div > < / li >
< / ul >
< form class = "navbar-form navbar-right" action = "search.html" method = "get" >
< div class = "form-group" >
< input type = "text" name = "q" class = "form-control" placeholder = "Search" / >
< / div >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div >
< / div >
< div class = "container" >
< div class = "row" >
< div class = "body col-md-12 content" role = "main" >
< section id = "command-line-interface" >
2022-06-22 20:22:26 +02:00
< h1 > Command line interface< a class = "headerlink" href = "#command-line-interface" title = "Permalink to this heading" > ¶< / a > < / h1 >
2022-09-19 18:49:25 +02:00
< p > A command line interface (CLI) is available to manage database, OAuth2 tokens and users.< / p >
2023-02-16 11:18:50 +01:00
< div class = "highlight-bash notranslate" > < div class = "highlight" > < pre > < span > < / span > $< span class = "w" > < / span > ftcli
Usage:< span class = "w" > < / span > ftcli< span class = "w" > < / span > < span class = "o" > [< / span > OPTIONS< span class = "o" > ]< / span > < span class = "w" > < / span > COMMAND< span class = "w" > < / span > < span class = "o" > [< / span > ARGS< span class = "o" > ]< / span > ...
2022-04-24 13:17:38 +02:00
2023-02-16 11:18:50 +01:00
< span class = "w" > < / span > FitTrackee< span class = "w" > < / span > Command< span class = "w" > < / span > Line< span class = "w" > < / span > Interface
2022-04-24 13:17:38 +02:00
Options:
2023-02-16 11:18:50 +01:00
< span class = "w" > < / span > --help< span class = "w" > < / span > Show< span class = "w" > < / span > this< span class = "w" > < / span > message< span class = "w" > < / span > and< span class = "w" > < / span > exit.
2022-04-24 13:17:38 +02:00
Commands:
2023-02-16 11:18:50 +01:00
< span class = "w" > < / span > db< span class = "w" > < / span > Manage< span class = "w" > < / span > database.
< span class = "w" > < / span > oauth2< span class = "w" > < / span > Manage< span class = "w" > < / span > OAuth2< span class = "w" > < / span > tokens.
< span class = "w" > < / span > users< span class = "w" > < / span > Manage< span class = "w" > < / span > users.
2022-04-24 13:17:38 +02:00
< / pre > < / div >
< / div >
< div class = "admonition warning" >
< p class = "admonition-title" > Warning< / p >
< div class = "line-block" >
< div class = "line" > The following commands are now deprecated and will be removed in a next version:< / div >
< div class = "line" > - < code class = "docutils literal notranslate" > < span class = "pre" > fittrackee_set_admin< / span > < / code > < / div >
< div class = "line" > - < code class = "docutils literal notranslate" > < span class = "pre" > fittrackee_upgrade_db< / span > < / code > < / div >
2022-11-27 12:06:42 +01:00
< div class = "line" > - < code class = "docutils literal notranslate" > < span class = "pre" > fittrackee_worker< / span > < / code > (disabled)< / div >
2022-04-24 13:17:38 +02:00
< / div >
< / div >
< section id = "database" >
2022-06-22 20:22:26 +02:00
< h2 > Database< a class = "headerlink" href = "#database" title = "Permalink to this heading" > ¶< / a > < / h2 >
2023-03-05 14:26:31 +01:00
< section id = "ftcli-db-drop" >
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > db< / span > < span class = "pre" > drop< / span > < / code > < a class = "headerlink" href = "#ftcli-db-drop" title = "Permalink to this heading" > ¶< / a > < / h3 >
2022-04-24 13:17:38 +02:00
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.6.5.< / span > < / p >
< / div >
2023-03-05 14:26:31 +01:00
< p > Empty database and delete uploaded files, only on development environments.< / p >
2022-04-24 13:17:38 +02:00
< / section >
2023-03-05 14:26:31 +01:00
< section id = "ftcli-db-upgrade" >
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > db< / span > < span class = "pre" > upgrade< / span > < / code > < a class = "headerlink" href = "#ftcli-db-upgrade" title = "Permalink to this heading" > ¶< / a > < / h3 >
2022-04-24 13:17:38 +02:00
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.6.5.< / span > < / p >
< / div >
2023-03-05 14:26:31 +01:00
< p > Apply migrations.< / p >
2022-04-24 13:17:38 +02:00
< / section >
< / section >
2022-08-27 16:50:29 +02:00
< section id = "oauth2" >
< h2 > OAuth2< a class = "headerlink" href = "#oauth2" title = "Permalink to this heading" > ¶< / a > < / h2 >
< section id = "ftcli-oauth2-clean" >
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > oauth2< / span > < span class = "pre" > clean< / span > < / code > < a class = "headerlink" href = "#ftcli-oauth2-clean" title = "Permalink to this heading" > ¶< / a > < / h3 >
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.7.0.< / span > < / p >
< / div >
< p > Remove tokens expired for more than provided number of days< / p >
< table class = "table-bordered docutils align-default" >
< colgroup >
< col style = "width: 33.3%" / >
< col style = "width: 66.7%" / >
< / colgroup >
< thead >
< tr class = "row-odd" > < th class = "head" > < p > Options< / p > < / th >
< th class = "head" > < p > Description< / p > < / th >
< / tr >
< / thead >
< tbody >
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --days< / span > < / code > < / p > < / td >
< td > < p > Number of days.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / section >
< / section >
2022-04-24 13:17:38 +02:00
< section id = "users" >
2022-06-22 20:22:26 +02:00
< h2 > Users< a class = "headerlink" href = "#users" title = "Permalink to this heading" > ¶< / a > < / h2 >
2023-03-05 14:26:31 +01:00
< section id = "ftcli-users-clean-archives" >
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > clean_archives< / span > < / code > < a class = "headerlink" href = "#ftcli-users-clean-archives" title = "Permalink to this heading" > ¶< / a > < / h3 >
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.7.13.< / span > < / p >
< / div >
< p > Delete export requests and related archives created more than provided number of days.< / p >
< table class = "table-bordered docutils align-default" >
< colgroup >
< col style = "width: 33.3%" / >
< col style = "width: 66.7%" / >
< / colgroup >
< thead >
< tr class = "row-odd" > < th class = "head" > < p > Options< / p > < / th >
< th class = "head" > < p > Description< / p > < / th >
< / tr >
< / thead >
< tbody >
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --days< / span > < / code > < / p > < / td >
< td > < p > Number of days.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / section >
2022-09-15 16:11:13 +02:00
< section id = "ftcli-users-clean-tokens" >
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > clean_tokens< / span > < / code > < a class = "headerlink" href = "#ftcli-users-clean-tokens" title = "Permalink to this heading" > ¶< / a > < / h3 >
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.7.0.< / span > < / p >
< / div >
< p > Remove blacklisted tokens expired for more than provided number of days.< / p >
< table class = "table-bordered docutils align-default" >
< colgroup >
< col style = "width: 33.3%" / >
< col style = "width: 66.7%" / >
< / colgroup >
< thead >
< tr class = "row-odd" > < th class = "head" > < p > Options< / p > < / th >
< th class = "head" > < p > Description< / p > < / th >
< / tr >
< / thead >
< tbody >
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --days< / span > < / code > < / p > < / td >
< td > < p > Number of days.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / section >
2023-04-12 17:32:08 +02:00
< section id = "ftcli-users-create" >
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > create< / span > < / code > < a class = "headerlink" href = "#ftcli-users-create" title = "Permalink to this heading" > ¶< / a > < / h3 >
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.7.15.< / span > < / p >
< / div >
< p > Create a user account.< / p >
< div class = "admonition note" >
< p class = "admonition-title" > Note< / p >
< ul class = "simple" >
< li > < p > the newly created account is already active.< / p > < / li >
< li > < p > the CLI allows to create users when registration is disabled.< / p > < / li >
< / ul >
< / div >
< table class = "table-bordered docutils align-default" >
< colgroup >
< col style = "width: 33.3%" / >
< col style = "width: 66.7%" / >
< / colgroup >
< thead >
< tr class = "row-odd" > < th class = "head" > < p > Arguments/options< / p > < / th >
< th class = "head" > < p > Description< / p > < / th >
< / tr >
< / thead >
< tbody >
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > USERNAME< / span > < / code > < / p > < / td >
< td > < p > Username.< / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --email< / span > < span class = "pre" > EMAIL< / span > < / code > < / p > < / td >
< td > < p > User email (mandatory).< / p > < / td >
< / tr >
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --password< / span > < span class = "pre" > PASSWORD< / span > < / code > < / p > < / td >
< td > < p > User password (if not provided, a random password is generated).< / p > < / td >
< / tr >
< / tbody >
< / table >
< / section >
2023-03-05 14:26:31 +01:00
< section id = "ftcli-users-export-archives" >
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > export_archives< / span > < / code > < a class = "headerlink" href = "#ftcli-users-export-archives" title = "Permalink to this heading" > ¶< / a > < / h3 >
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.7.13.< / span > < / p >
< / div >
< p > Process incomplete user export requests.
Can be used if redis is not set (no dramatiq workers running).< / p >
< table class = "table-bordered docutils align-default" >
< colgroup >
< col style = "width: 33.3%" / >
< col style = "width: 66.7%" / >
< / colgroup >
< thead >
< tr class = "row-odd" > < th class = "head" > < p > Options< / p > < / th >
< th class = "head" > < p > Description< / p > < / th >
< / tr >
< / thead >
< tbody >
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --max< / span > < / code > < / p > < / td >
< td > < p > Maximum number of export requests to process.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / section >
2022-04-24 13:17:38 +02:00
< section id = "ftcli-users-update" >
2022-06-22 20:22:26 +02:00
< h3 > < code class = "docutils literal notranslate" > < span class = "pre" > ftcli< / span > < span class = "pre" > users< / span > < span class = "pre" > update< / span > < / code > < a class = "headerlink" href = "#ftcli-users-update" title = "Permalink to this heading" > ¶< / a > < / h3 >
2022-04-24 13:17:38 +02:00
< div class = "versionadded" >
< p > < span class = "versionmodified added" > New in version 0.6.5.< / span > < / p >
< / div >
< p > Modify a user account (admin rights, active status, email and password).< / p >
2022-06-22 20:22:26 +02:00
< table class = "table-bordered docutils align-default" >
2022-04-24 13:17:38 +02:00
< colgroup >
2022-07-27 11:10:29 +02:00
< col style = "width: 33.3%" / >
< col style = "width: 66.7%" / >
2022-04-24 13:17:38 +02:00
< / colgroup >
< thead >
2023-04-12 17:32:08 +02:00
< tr class = "row-odd" > < th class = "head" > < p > Arguments/options< / p > < / th >
2022-04-24 13:17:38 +02:00
< th class = "head" > < p > Description< / p > < / th >
< / tr >
< / thead >
< tbody >
2023-04-12 17:32:08 +02:00
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > USERNAME< / span > < / code > < / p > < / td >
< td > < p > Username.< / p > < / td >
< / tr >
< tr class = "row-odd" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --set-admin< / span > < span class = "pre" > BOOLEAN< / span > < / code > < / p > < / td >
2022-04-24 13:17:38 +02:00
< td > < p > Add/remove admin rights (when adding admin rights, it also activates user account if not active).< / p > < / td >
< / tr >
2023-04-12 17:32:08 +02:00
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --activate< / span > < / code > < / p > < / td >
2022-04-24 13:17:38 +02:00
< td > < p > Activate user account.< / p > < / td >
< / tr >
2023-04-12 17:32:08 +02:00
< tr class = "row-odd" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --reset-password< / span > < / code > < / p > < / td >
2022-04-24 13:17:38 +02:00
< td > < p > Reset user password (a new password will be displayed).< / p > < / td >
< / tr >
2023-04-12 17:32:08 +02:00
< tr class = "row-even" > < td > < p > < code class = "docutils literal notranslate" > < span class = "pre" > --update-email< / span > < span class = "pre" > EMAIL< / span > < / code > < / p > < / td >
2022-04-24 13:17:38 +02:00
< td > < p > Update user email.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / section >
< / section >
< / section >
< / div >
< / div >
< / div >
< footer class = "footer" >
< div class = "container" >
< p class = "pull-right" >
< a href = "#" > Back to top< / a >
< / p >
< p >
2023-04-12 17:32:08 +02:00
© Copyright 2018 - 2023, SamR1 < a rel = "me" href = "https://fosstodon.org/@FitTrackee" > < i class = "fa fa-mastodon" aria-hidden = "true" > < / i > < / a > .
2023-05-29 14:35:09 +02:00
Last updated on May 29, 2023.< br / >
2022-11-01 19:58:12 +01:00
Created using < a href = "http://sphinx-doc.org/" > Sphinx< / a > 5.3.0.< br / >
2022-04-24 13:17:38 +02:00
< / p >
< / div >
< / footer >
2022-11-27 12:06:42 +01:00
2022-04-24 13:17:38 +02:00
< / body >
< / html >