FitTrackee/docs/cli.html

298 lines
13 KiB
HTML
Raw Normal View History

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
2022-11-27 12:06:42 +01:00
<title>Command line interface &#8212; FitTrackee 0.7.7
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" />
<link rel="next" title="API documentation" href="api/index.html" />
<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>
2022-11-27 12:06:42 +01:00
<span class="navbar-text navbar-version pull-left"><b>0.7.7
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>
2022-08-27 16:50:29 +02:00
<li class="toctree-l1"><a class="reference internal" href="apps.html">Third-party applications</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>
<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-upgrade"><code class="docutils literal notranslate"><span class="pre">ftcli</span> <span class="pre">db</span> <span class="pre">upgrade</span></code></a></li>
<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>
</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>
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>
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">&laquo; Installation</span>
</a>
</li>
<li>
<a href="api/index.html" title="Next Chapter: API documentation"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">API documentation &raquo;</span>
</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>
2022-04-24 13:17:38 +02:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ftcli
Usage: ftcli <span class="o">[</span>OPTIONS<span class="o">]</span> COMMAND <span class="o">[</span>ARGS<span class="o">]</span>...
FitTrackee Command Line Interface
Options:
--help Show this message and exit.
Commands:
2022-08-27 16:50:29 +02:00
db Manage database.
oauth2 Manage OAuth2 tokens.
users Manage 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>
2022-04-24 13:17:38 +02:00
<section id="ftcli-db-upgrade">
2022-06-22 20:22:26 +02:00
<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>
<p>Apply migrations.</p>
</section>
<section id="ftcli-db-drop">
2022-06-22 20:22:26 +02:00
<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>
<p>Empty database and delete uploaded files, only on development environments.</p>
</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>
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>
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>
<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">--set-admin</span> <span class="pre">BOOLEAN</span></code></p></td>
<td><p>Add/remove admin rights (when adding admin rights, it also activates user account if not active).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--activate</span></code></p></td>
<td><p>Activate user account.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--reset-password</span></code></p></td>
<td><p>Reset user password (a new password will be displayed).</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--update-email</span> <span class="pre">EMAIL</span></code></p></td>
<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>
2022-11-27 12:06:42 +01:00
&copy; Copyright 2018 - 2022, SamR1 <a rel="me" href="https://fosstodon.org/@FitTrackee"><i class="fa fa-mastodon" aria-hidden="true"></i></a>.
Last updated on Nov 27, 2022.<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>