mediacurator/docs/usage/quickstart.html
Fabrice Quenneville 5ba0f84d12 **Summary:**
This release introduces a major overhaul of the `mediacurator` command-line interface (CLI) and comprehensive updates to the documentation. The CLI has transitioned from a custom argument parsing system to utilizing Python's `argparse` and `argcomplete` libraries, greatly enhancing usability and flexibility. Due to these significant changes, the version is incremented from **0.0.13** to **1.0.1**.

- **Refactored** `tools.py` for standardized command-line argument handling using `argparse` and `argcomplete`.
- **Improved** user interaction with structured arguments and built-in help, error handling, and validation.
- **Consolidated** video detail printing logic into a reusable method within the `Video` class.
- **Enhanced** `MediaLibrary` class with better clarity, functionality, and expanded support for video formats.
- **Reorganized** `main.py` to streamline argument handling and improve error feedback.
- **Updated** `setup.py` for release preparation, including new classifiers and dependencies.

- **Revised** README.md for clarity, including structured command usage and improved descriptions.
- **Moved** and improved old documentation, removing outdated content and adding new screenshots.
- **Maintained** legacy commands for backward compatibility while enhancing usability with clear examples.

- **Removed** non-existent `bcolors` from the public API.
- **Upgraded** requirements.txt to include `argcomplete` for command-line completion.
- **Updated** docstrings and function documentation for clarity on functionality and parameters.
2024-10-20 23:19:42 -04:00

191 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Quickstart &#8212; mediacurator documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d1102ebc" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=12dfc556" />
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=d9b65b63" />
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Manual" href="manual.html" />
<link rel="prev" title="Installation" href="installation.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="quickstart">
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1>
<p>To use <cite>mediacurator</cite>, execute the following command structure:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>&lt;command&gt;<span class="w"> </span><span class="o">[</span>options<span class="o">]</span>
mediacurator<span class="w"> </span><span class="o">[</span>list<span class="w"> </span>convert<span class="o">]</span><span class="w"> </span><span class="o">[</span>-del/--delete<span class="o">]</span>
<span class="w"> </span><span class="o">[</span>-i/--inputs<span class="w"> </span>any<span class="w"> </span>3gp<span class="w"> </span>asf<span class="w"> </span>avi<span class="w"> </span>divx<span class="w"> </span>dv<span class="w"> </span>f4v<span class="w"> </span>flv<span class="w"> </span>gif<span class="w"> </span>m2ts<span class="w"> </span>m4v<span class="w"> </span>mkv<span class="w"> </span>mov<span class="w"> </span>mp4<span class="w"> </span>mpeg<span class="w"> </span>mpg<span class="w"> </span>mts<span class="w"> </span>ogm<span class="w"> </span>ogv<span class="w"> </span>rm<span class="w"> </span>swf<span class="w"> </span>ts<span class="w"> </span>vid<span class="w"> </span>vob<span class="w"> </span>webm<span class="w"> </span>wmv<span class="o">]</span>
<span class="w"> </span><span class="o">[</span>-fl/--filters<span class="w"> </span>fferror<span class="w"> </span>old<span class="w"> </span>lowres<span class="w"> </span>hd<span class="w"> </span>720p<span class="w"> </span>1080p<span class="w"> </span>uhd<span class="w"> </span>mpeg<span class="w"> </span>mpeg4<span class="w"> </span>x264<span class="w"> </span>wmv3<span class="w"> </span>wmv<span class="o">]</span>
<span class="w"> </span><span class="o">[</span>-o/--outputs<span class="w"> </span>mkv/mp4<span class="w"> </span>x265/av1<span class="o">]</span>
<span class="w"> </span><span class="o">[</span>-p/--printop<span class="w"> </span>list<span class="w"> </span>formatted<span class="w"> </span>verbose<span class="o">]</span>
<span class="w"> </span><span class="o">[</span>-d/--dirs<span class="w"> </span><span class="s2">&quot;/mnt/media/&quot;</span><span class="w"> </span><span class="s2">&quot;/mnt/media2/&quot;</span><span class="o">]</span>
<span class="w"> </span><span class="o">[</span>-f/--files<span class="w"> </span><span class="s2">&quot;file1.ext&quot;</span><span class="w"> </span><span class="s2">&quot;file2.ext&quot;</span><span class="o">]</span>
</pre></div>
</div>
<p><strong>Available commands:</strong>
- <cite>list</cite>: List all videos with specified filters.
- <cite>convert</cite>: Convert videos to specified formats.</p>
<p><strong>Options:</strong></p>
<ul class="simple">
<li><p><cite>-del</cite> or <cite>delete</cite>: Delete found results after successful operations.</p></li>
<li><p><cite>-i &lt;input&gt;</cite> or <cite>inputs &lt;input&gt;</cite>: Specify input file formats (default: <cite>any</cite>).</p></li>
<li><p><cite>-fl &lt;filter&gt;</cite> or <cite>filters &lt;filter&gt;</cite>: Apply filters to the selection of videos.</p></li>
<li><p><cite>-o &lt;output&gt;</cite> or <cite>outputs &lt;output&gt;</cite>: Specify output formats (default: <cite>mkv</cite>, <cite>x265</cite>).</p></li>
<li><p><cite>-p &lt;print_option&gt;</cite> or <cite>printop &lt;print_option&gt;</cite>: Set print options (default: <cite>list</cite>).</p></li>
<li><p><cite>-f &lt;file&gt;</cite> or <cite>files &lt;file&gt;</cite>: Specify files to process.</p></li>
<li><p><cite>-d &lt;directory&gt;</cite> or <cite>dirs &lt;directory&gt;</cite>: Specify directories to process.</p></li>
</ul>
<p><strong>For multiple files or filenames, use space-separated values ( ).</strong></p>
<p><strong>Default options:</strong></p>
<ul class="simple">
<li><p><cite>-i/inputs any</cite></p></li>
<li><p><cite>-fl/filters</cite></p></li>
<li><p><cite>-o/outputs mkv x265</cite></p></li>
<li><p><cite>-p/printop list</cite></p></li>
</ul>
<p><strong>Examples:</strong></p>
<p>The following examples demonstrate how to use <cite>mediacurator</cite> with the options listed above:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># List all videos with an old codec in formatted format</span>
mediacurator<span class="w"> </span>list<span class="w"> </span>--filters<span class="w"> </span>old<span class="w"> </span>--printop<span class="w"> </span>formatted<span class="w"> </span>--dirs<span class="w"> </span>/mnt/media/<span class="w"> </span>&gt;&gt;<span class="w"> </span>../medlist.txt
<span class="c1"># Convert all videos with the MPEG4 codec to MP4 using the AV1 codec and delete the originals</span>
mediacurator<span class="w"> </span>convert<span class="w"> </span>--delete<span class="w"> </span>--filters<span class="w"> </span>mpeg4<span class="w"> </span>--outputs<span class="w"> </span>av1,mp4<span class="w"> </span>--dirs<span class="w"> </span><span class="s2">&quot;/mnt/media/Movies/&quot;</span>
<span class="c1"># Convert any video with AVI or MPG extensions, print formatted text including FFmpeg&#39;s output, and then delete the originals</span>
mediacurator<span class="w"> </span>convert<span class="w"> </span>--delete<span class="w"> </span>--inputs<span class="w"> </span>avi,mpg<span class="w"> </span>--printop<span class="w"> </span>formatted,verbose<span class="w"> </span>--dirs<span class="w"> </span>/mnt/media/
</pre></div>
</div>
<p>For more examples, see <a class="reference internal" href="use_cases.html"><span class="doc">Use cases</span></a>.</p>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/mclogo4x.png" alt="Logo of mediacurator"/>
</a></p>
<h1 class="logo"><a href="../index.html">mediacurator</a></h1>
<h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">Usage:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="warnings.html">Warnings</a></li>
<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="#">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="manual.html">Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="use_cases.html">Use cases</a></li>
<li class="toctree-l1"><a class="reference internal" href="errors.html">Errors</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Release Notes:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/1.0.1-changelog.html">mediacurator 1.0.1 Release Notes</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Legacy Usage:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../legacy_usage/warnings.html">Warnings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../legacy_usage/installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../legacy_usage/quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../legacy_usage/manual.html">Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../legacy_usage/use_cases.html">Use cases</a></li>
<li class="toctree-l1"><a class="reference internal" href="../legacy_usage/errors.html">Errors</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Legacy Release Notes:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.13-changelog.html">MediaCurator 0.0.13 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.12-changelog.html">MediaCurator 0.0.12 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.11-changelog.html">MediaCurator 0.0.11 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.10-changelog.html">MediaCurator 0.0.10 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.9-changelog.html">MediaCurator 0.0.9 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.8-changelog.html">MediaCurator 0.0.8 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.7-changelog.html">MediaCurator 0.0.7 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.6-changelog.html">MediaCurator 0.0.6 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.5-changelog.html">MediaCurator 0.0.5 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.4-changelog.html">MediaCurator 0.0.4 Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.1-changelog.html">MediaCurator 0.0.1 Release Notes</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li>Previous: <a href="installation.html" title="previous chapter">Installation</a></li>
<li>Next: <a href="manual.html" title="next chapter">Manual</a></li>
</ul></li>
</ul>
</div>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2020, Fabrice Quenneville.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.4.7</a>
&amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
<a href="../_sources/usage/quickstart.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>