mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-14 05:15:03 -05:00
312 lines
13 KiB
HTML
312 lines
13 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" itemscope itemtype="http://schema.org/Product">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
<meta name="keywords" content="@{package.tags}" />
|
|
|
|
<title>FileBot Command-line Interface</title>
|
|
<meta name="description" content="The FileBot command-line interface will allow you to rename tv shows, download subtitles and do lots of other nifty things directly directly from the console. Running on an headless server is fully supported. Make sure to check out FileBot scripting as well for a new level of automation." />
|
|
|
|
<meta itemprop="name" content="FileBot Command-line Interface" />
|
|
<meta itemprop="description" content="The FileBot command-line interface will allow you to rename tv shows, download subtitles and do lots of other nifty things directly directly from the console. Running on an headless server is fully supported. Make sure to check out FileBot scripting as well for a new level of automation." />
|
|
<meta itemprop="image" content="@{link.image.logo}" />
|
|
|
|
<link rel="stylesheet" href="base.css" type="text/css" />
|
|
<link rel="stylesheet" href="code.css" type="text/css" />
|
|
<link rel="icon" href="favicon.png" />
|
|
</head>
|
|
<body>
|
|
<div class="page">
|
|
<div class="navigation">
|
|
<div>
|
|
<ul>
|
|
<li><a href="https://www.filebot.net/forums/">Forums</a></li>
|
|
<li><a href="https://www.filebot.net/forums/viewtopic.php?f=3&t=7">FAQ</a></li>
|
|
<li><a href="https://www.filebot.net/#download">Download</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<a href="https://www.filebot.net/"><img class="logo" alt="logo" src="images/filebot.logo.svg" width="64" height="64" /></a>
|
|
<h1>
|
|
FileBot CLI
|
|
<span class="description">Command-line interface usage manual</span>
|
|
</h1>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="main-section-screenshot">
|
|
<a target="_blank" href="screenshots/cli.png"><img alt="FileBot command-line tools" width="330" height="221" src="screenshots/cli.png" /></a>
|
|
</div>
|
|
<div class="section about">
|
|
<h2>About</h2>
|
|
<p style="width: 420px">
|
|
FileBot can be called with a set of command-line arguments directly from the console
|
|
or in scripts for automation running tasks like renaming TV shows and movies, fetching subtitles or checking SFV files.
|
|
</p>
|
|
<p style="width: 420px">
|
|
The CLI is designed for simple tasks. Please have a look at <a href="script.html">Scripts and Automation</a> for something more powerful and find scripts for many common tasks <a href="https://www.filebot.net/forums/viewtopic.php?f=4&t=5#p5">here</a>.
|
|
</p>
|
|
<h2 id="examples">Examples</h2>
|
|
<h3 id="rename">Rename</h3>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-rename</span> <span class="argument">path/to/episodes</span></code>
|
|
Rename given episodes or movies.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-rename</span> <span class="argument">"One Piece"</span> <span class="option">--db</span> <span class="argument">anidb</span> <span class="option">-non-strict</span></code>
|
|
Rename given episodes using AniDB episode info. Enable comprehensive Episode/File matching.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-rename</span> <span class="argument">"Generation Kill"</span> <span class="option">--format</span> <span class="argument">"{n} E{e} [{t}]"</span> <span class="option">-non-strict</span></code>
|
|
Rename given episodes according to the given format. Enable comprehensive Episode/File matching.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-rename</span> <span class="argument">"1x01.avi"</span> <span class="option">--q</span> <span class="argument">"Dexter"</span> <span class="option">--db</span> <span class="argument">TheTVDB</span> <span class="option">--lang</span> <span class="argument">de</span></code>
|
|
Rename a single episode forcing the series name. Use German language episode info.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-rename</span> <span class="argument">"movie.avi"</span> <span class="option">--q</span> <span class="argument">"Avatar"</span> <span class="option">--db</span> <span class="argument">TheMovieDB</span></code>
|
|
Rename a single movie looking up movie info via file hash or using the given movie title.
|
|
</p>
|
|
<p class="suggestion">
|
|
Keep in mind that the CLI is <strong>strict by default</strong> so it will never mess up your files. In some cases you may need to enable <strong>-non-strict</strong> for more opportunistic matching like the GUI does.
|
|
</p>
|
|
<h3 id="subtitles">Fetch Subtitles</h3>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-get-subtitles</span> <span class="argument">path/to/episodes</span></code>
|
|
Fetch subtitles that are missing for the given files. Lookup matching subtitles via file hash only.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-get-subtitles</span> <span class="argument">path/to/movie</span> <span class="option">--q</span> <span class="argument">"Avatar"</span> <span class="option">--lang</span> <span class="argument">zh</span> <span class="option">--output</span> <span class="argument">srt</span> <span class="option">--encoding</span> <span class="argument">utf8</span> <span class="option">-non-strict</span></code>
|
|
Fetch subtitles and force output format. Lookup subtitles via file hash or given search query.
|
|
</p>
|
|
<h3 id="verification">File Verification</h3>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-check</span> <span class="argument">path/to/files</span></code>
|
|
Compute SFV file and automatically determine output file.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-check</span> <span class="argument">path/to/files</span> <span class="option">--output</span> <span class="argument">checksum.md5</span></code>
|
|
Compute checksums and write to the given output file.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-check</span> <span class="argument">path/to/checksum.md5</span></code>
|
|
Check file integrity using the given checksum file.
|
|
</p>
|
|
<h3 id="scripting">Scripting</h3>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-extract</span> <span class="argument">"300.part01.rar"</span> <span class="option">--output</span> <span class="argument">path/to/folder</span></code></code>
|
|
Extract files from single-volume or multi-volume archives (e.g. rar).
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-list</span> <span class="option">--db</span> <span class="argument">thetvdb</span> <span class="option">--q</span> <span class="argument">Dexter</span> <span class="option">--format</span> <span class="argument">"{s}x{e.pad(2)} {t}"</span></code>
|
|
Fetch episode list and print to console.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-mediainfo</span> <span class="argument">path/to/files</span> <span class="option">--format</span> <span class="argument">"{fn} {resolution} {vc} {af}"</span></code>
|
|
Read media info and print to console.
|
|
</p>
|
|
<p>
|
|
<code><span class="cmd">filebot</span> <span class="option">-script</span> <span class="argument">"path/to/script.groovy"</span> <span class="argument">args...</span></code>
|
|
Execute a given Groovy script. Find the manual on scripting <a href="script.html">here</a>.
|
|
</p>
|
|
<h3 id="advanced">Advanced Usage</h3>
|
|
<p>
|
|
Check out the <a href="https://www.filebot.net/forums/viewtopic.php?f=4&t=4788">FileBot Command-Line Examples</a>
|
|
on how to use <span class="cmd">find</span> and <span class="cmd">xargs</span> in combination with <span class="cmd">filebot</span> and advanced options such as <span class="option">--db xattr</span> and <span class="option">--filter</span> for querying and processing media files and photos.
|
|
</p>
|
|
|
|
|
|
<h2 class="reference" id="arguments">
|
|
Argument Reference
|
|
<a href="https://github.com/filebot/filebot/tree/master/source/net/filebot/cli/ArgumentBean.java" class="source" target="_blank">source</a>
|
|
</h2>
|
|
<table class="reference cli">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
<th>Usage</th>
|
|
</tr>
|
|
<tr>
|
|
<td>-rename</td>
|
|
<td>rename media files</td>
|
|
<td>media folder or media file</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--db</td>
|
|
<td>database</td>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<td>Series mode: TheTVDB, AniDB</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Movie mode: TheMovieDB, OMDb</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Music mode: AcoustID, ID3</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--order</td>
|
|
<td>episode numbering</td>
|
|
<td>airdate | absolute | dvd</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--format</td>
|
|
<td><a href="naming.html">naming scheme</a></td>
|
|
<td><a href="naming.html">format expression</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>--action</td>
|
|
<td>rename action</td>
|
|
<td>move | copy | keeplink | symlink | hardlink | test</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--conflict</td>
|
|
<td>conflict resolution</td>
|
|
<td>override | skip | auto | index | fail</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--filter</td>
|
|
<td><a href="https://www.filebot.net/forums/viewtopic.php?f=3&t=2127" target="_blank">match filter rules</a></td>
|
|
<td>filter expression (e.g. <span style="font-family: monospace; color: #008800">y > 2000</span>)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>-get-subtitles</td>
|
|
<td>fetch missing subtitles</td>
|
|
<td>media folder or video file</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--q</td>
|
|
<td>search query</td>
|
|
<td>force movie or series name</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--lang</td>
|
|
<td><a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes" target="_blank">2-letter language code</a></td>
|
|
<td>en, de, fr, es, ja, zh, ...</td>
|
|
</tr>
|
|
<tr>
|
|
<td>-non-strict</td>
|
|
<td>opportunistic match mode</td>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<td>Rename mode: required for tricky filenames</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Subtitle mode: <a href="https://www.filebot.net/forums/viewtopic.php?f=3&t=2615" target="_blank">enable fuzzy search</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>-r</td>
|
|
<td>traverse folders recursively</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>-check</td>
|
|
<td>create or check sfv file</td>
|
|
<td>folder or sfv file</td>
|
|
</tr>
|
|
<tr>
|
|
<td>-extract</td>
|
|
<td>extract archives</td>
|
|
<td>folder or archive file</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--output</td>
|
|
<td>output format or path</td>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<td>Rename mode: output folder</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Subtitle mode: srt <small class="comment">(enable transcode non-srt subtitles)</small></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Checksum mode: sfv, md5, sha256</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>--encoding</td>
|
|
<td>output charset</td>
|
|
<td>UTF-8, Windows-1252, GB18030, ...</td>
|
|
</tr>
|
|
<tr>
|
|
<td>-list</td>
|
|
<td>print episode list</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>-mediainfo</td>
|
|
<td>print media info</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>-script</td>
|
|
<td><a href="script.html">execute script</a></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>--mode</td>
|
|
<td><a href="https://www.filebot.net/forums/viewtopic.php?f=3&t=4398">interactive</a></td>
|
|
<td><a href="https://www.filebot.net/forums/viewtopic.php?f=3&t=4398">enable console-interactive mode</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td>--log</td>
|
|
<td>log level</td>
|
|
<td>ALL | FINE | INFO | WARNING</td>
|
|
</tr>
|
|
<tr>
|
|
<td>-clear-cache</td>
|
|
<td>clear cache</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>-clear-prefs</td>
|
|
<td>reset application settings</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>-no-xattr</td>
|
|
<td>disable <a href="https://en.wikipedia.org/wiki/Extended_file_attributes" target="_blank">extended attributes</a></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>-version</td>
|
|
<td>print version</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>-help</td>
|
|
<td>print usage</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<p class="suggestion">
|
|
Need some help getting started? Check the <a href="https://www.filebot.net/forums/viewforum.php?f=4">forums</a>.
|
|
</p>
|
|
|
|
<div class="metrics">
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Hosted on <a href="https://www.filebot.net/">filebot.net</a> | Creative Commons License: Attribution-NonCommercial-ShareAlike © @{tstamp.year}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|