1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00
filebot/website/cli.html
Reinhard Pointner 0752527e30 * update website
2015-06-14 13:00:32 +00:00

339 lines
14 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="rename tv shows, rename movies, download subtitles, check sfv files" />
<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="http://www.filebot.net/icon.png" />
<link rel="stylesheet" href="base.css" type="text/css" />
<link rel="stylesheet" href="code.css" type="text/css" />
<link rel="icon" href="favicon.png" />
<!-- google +1 -->
<script type="text/javascript">
window.___gcfg = {lang: 'en-GB'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<!-- twitter -->
<script type="text/javascript">
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
</head>
<body>
<!-- Facebook Like Button-->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<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&amp;t=7">FAQ</a></li>
<li><a href="http://www.filebot.net/#download">Download</a></li>
</ul>
</div>
</div>
<div class="social">
<div class="twitter">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.filebot.net/" data-text="FileBot - The ultimate tv renamer and subtitle downloader" data-via="filebot_renamer" data-lang="en"></a>
</div>
<div class="facebook">
<div class="fb-like" data-href="https://www.facebook.com/filebot" data-send="false" data-layout="button_count" data-width="80" data-show-faces="false"></div>
</div>
<div class="plusone">
<g:plusone href="http://www.filebot.net/"></g:plusone>
</div>
</div>
<div class="header">
<a href="http://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-missing-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>
<h2 class="reference" id="arguments">
Argument Reference
<a href="https://sourceforge.net/p/filebot/code/HEAD/tree/trunk/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>media database</td>
<td>
<table>
<tr>
<td>TV Series mode: TheTVDB, TVRage, AniDB</td>
</tr>
<tr>
<td>Movie mode: TheMovieDB, OMDb</td>
</tr>
<tr>
<td>Music mode: AcoustID, ID3 Tags</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">movie or episode format expression</a></td>
</tr>
<tr>
<td>--action</td>
<td>rename action</td>
<td>move | copy | keeplink | symlink | hardlink</td>
</tr>
<tr>
<td>--conflict</td>
<td>conflict resolution</td>
<td>override | skip | fail</td>
</tr>
<tr>
<td>--filter</td>
<td>episode include rules</td>
<td>filter expression (e.g. &quot;y > 2000&quot;)</td>
</tr>
<tr>
<td>-get-subtitles</td>
<td>fetch subtitles</td>
<td>media folder or media file</td>
</tr>
<tr>
<td>-get-missing-subtitles</td>
<td>fetch missing subtitles</td>
<td>media folder or media file</td>
</tr>
<tr>
<td>--q</td>
<td>search query</td>
<td>tv series or movie title</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, etc</td>
</tr>
<tr>
<td>-non-strict</td>
<td>use advanced matching</td>
<td>
<table>
<tr>
<td>Rename mode: match multiple tv shows</td>
</tr>
<tr>
<td>Subtitle mode: match subtitles by name</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>-r</td>
<td>handle folders recursively</td>
<td></td>
</tr>
<tr>
<td>-check</td>
<td>create/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">(re-encode subtitles)</small></td>
</tr>
<tr>
<td>Checksum mode: sfv, md5, sha1</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>--encoding</td>
<td>output charset</td>
<td>UTF-8, windows-1252, GB18030, etc</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>--log</td>
<td>log level</td>
<td>all, config, 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>-help</td>
<td>print help message</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="http://sourceforge.net/projects/filebot/">sourceforge.net</a> | Creative Commons License: Attribution-NonCommercial-ShareAlike © 2015
</p>
</div>
</div>
</div>
</body>
</html>