filebot/website/cli.html

312 lines
13 KiB
HTML
Raw Normal View History

2011-11-27 05:32:06 +00:00
<!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">
2011-09-14 23:44:52 +00:00
<head>
2011-11-27 05:32:06 +00:00
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
2016-11-05 14:04:50 +00:00
<meta name="keywords" content="@{package.tags}" />
2016-03-26 08:37:55 +00:00
2011-12-27 18:57:11 +00:00
<title>FileBot Command-line Interface</title>
2011-12-25 17:17:49 +00:00
<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." />
2016-03-26 08:37:55 +00:00
2011-12-25 17:17:49 +00:00
<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." />
2016-11-05 14:04:50 +00:00
<meta itemprop="image" content="@{link.image.logo}" />
2016-03-26 08:37:55 +00:00
2011-09-14 23:44:52 +00:00
<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">
2011-12-10 09:59:27 +00:00
<div class="navigation">
2011-11-22 16:12:20 +00:00
<div>
<ul>
2016-11-26 05:17:57 +00:00
<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>
2017-06-03 09:10:43 +00:00
<li><a href="https://www.filebot.net/#download">Download</a></li>
2011-11-22 16:12:20 +00:00
</ul>
</div>
</div>
2011-09-14 23:44:52 +00:00
<div class="header">
2017-06-03 09:10:43 +00:00
<a href="https://www.filebot.net/"><img class="logo" alt="logo" src="images/filebot.logo.svg" width="64" height="64" /></a>
2011-09-14 23:44:52 +00:00
<h1>
FileBot CLI
<span class="description">Command-line interface usage manual</span>
</h1>
</div>
2016-03-26 08:37:55 +00:00
2011-09-14 23:44:52 +00:00
<div class="content">
2014-12-21 18:00:44 +00:00
<div class="main-section-screenshot">
2015-06-14 13:00:32 +00:00
<a target="_blank" href="screenshots/cli.png"><img alt="FileBot command-line tools" width="330" height="221" src="screenshots/cli.png" /></a>
</div>
2011-09-14 23:44:52 +00:00
<div class="section about">
<h2>About</h2>
<p style="width: 420px">
2011-12-07 05:41:44 +00:00
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">
2016-11-26 05:17:57 +00:00
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>.
2011-09-14 23:44:52 +00:00
</p>
2011-09-22 16:11:00 +00:00
<h2 id="examples">Examples</h2>
<h3 id="rename">Rename</h3>
2011-09-14 23:44:52 +00:00
<p>
<code><span class="cmd">filebot</span> <span class="option">-rename</span> <span class="argument">path/to/episodes</span></code>
2011-09-15 12:46:07 +00:00
Rename given episodes or movies.
2011-09-14 23:44:52 +00:00
</p>
<p>
2013-08-08 02:59:27 +00:00
<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.
2011-09-14 23:44:52 +00:00
</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>
2011-09-15 12:46:07 +00:00
Rename given episodes according to the given format. Enable comprehensive Episode/File matching.
2011-09-14 23:44:52 +00:00
</p>
<p>
2014-12-21 16:41:33 +00:00
<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>
2011-09-15 12:46:07 +00:00
Rename a single episode forcing the series name. Use German language episode info.
2011-09-14 23:44:52 +00:00
</p>
<p>
2014-12-21 16:41:33 +00:00
<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>
2011-09-15 12:46:07 +00:00
Rename a single movie looking up movie info via file hash or using the given movie title.
2011-09-14 23:44:52 +00:00
</p>
2012-02-22 08:19:49 +00:00
<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>
2011-09-14 23:44:52 +00:00
<p>
2016-05-09 07:42:38 +00:00
<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.
2011-09-14 23:44:52 +00:00
</p>
<p>
2011-12-13 12:38:25 +00:00
<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.
2011-09-14 23:44:52 +00:00
</p>
<h3 id="verification">File Verification</h3>
2011-09-14 23:44:52 +00:00
<p>
<code><span class="cmd">filebot</span> <span class="option">-check</span> <span class="argument">path/to/files</span></code>
2011-09-15 12:46:07 +00:00
Compute SFV file and automatically determine output file.
2011-09-14 23:44:52 +00:00
</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>
2011-12-13 12:38:25 +00:00
Compute checksums and write to the given output file.
2011-09-14 23:44:52 +00:00
</p>
<p>
<code><span class="cmd">filebot</span> <span class="option">-check</span> <span class="argument">path/to/checksum.md5</span></code>
2011-10-16 14:41:58 +00:00
Check file integrity using the given checksum file.
2011-09-14 23:44:52 +00:00
</p>
<h3 id="scripting">Scripting</h3>
2011-10-16 14:21:38 +00:00
<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>
2011-10-16 14:21:38 +00:00
<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>
2011-11-05 00:43:37 +00:00
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>
2016-03-26 08:37:55 +00:00
2011-09-22 16:11:00 +00:00
<h2 class="reference" id="arguments">
2011-09-15 12:46:07 +00:00
Argument Reference
2016-04-21 13:56:54 +00:00
<a href="https://github.com/filebot/filebot/tree/master/source/net/filebot/cli/ArgumentBean.java" class="source" target="_blank">source</a>
2011-09-15 12:46:07 +00:00
</h2>
2011-09-15 09:51:22 +00:00
<table class="reference cli">
2011-09-17 12:56:49 +00:00
<tr>
<th>Name</th>
<th>Description</th>
<th>Usage</th>
</tr>
<tr>
<td>-rename</td>
2014-12-21 16:41:33 +00:00
<td>rename media files</td>
<td>media folder or media file</td>
</tr>
2011-09-17 12:56:49 +00:00
<tr>
<td>--db</td>
2016-03-26 08:37:55 +00:00
<td>database</td>
2011-09-17 12:56:49 +00:00
<td>
<table>
<tr>
2016-03-26 08:37:55 +00:00
<td>Series mode: TheTVDB, AniDB</td>
2014-12-21 16:41:33 +00:00
</tr>
<tr>
<td>Movie mode: TheMovieDB, OMDb</td>
2011-09-17 12:56:49 +00:00
</tr>
<tr>
2016-03-28 20:45:43 +00:00
<td>Music mode: AcoustID, ID3</td>
2011-09-17 12:56:49 +00:00
</tr>
</table>
</td>
</tr>
2012-02-20 15:40:49 +00:00
<tr>
<td>--order</td>
<td>episode numbering</td>
<td>airdate | absolute | dvd</td>
2012-02-20 15:40:49 +00:00
</tr>
2011-09-17 12:56:49 +00:00
<tr>
<td>--format</td>
<td><a href="naming.html">naming scheme</a></td>
2016-03-26 08:37:55 +00:00
<td><a href="naming.html">format expression</a></td>
2011-09-17 12:56:49 +00:00
</tr>
<tr>
<td>--action</td>
<td>rename action</td>
2016-05-20 15:27:39 +00:00
<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>
2016-11-26 05:17:57 +00:00
<td><a href="https://www.filebot.net/forums/viewtopic.php?f=3&amp;t=2127" target="_blank">match filter rules</a></td>
2016-03-26 08:37:55 +00:00
<td>filter expression (e.g. <span style="font-family: monospace; color: #008800">y &gt; 2000</span>)</td>
</tr>
2011-09-17 12:56:49 +00:00
<tr>
<td>-get-subtitles</td>
<td>fetch missing subtitles</td>
2016-03-26 08:37:55 +00:00
<td>media folder or video file</td>
2011-09-17 12:56:49 +00:00
</tr>
<tr>
<td>--q</td>
<td>search query</td>
2016-03-26 08:37:55 +00:00
<td>force movie or series name</td>
2011-09-17 12:56:49 +00:00
</tr>
<tr>
<td>--lang</td>
2011-09-22 12:24:10 +00:00
<td><a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes" target="_blank">2-letter language code</a></td>
2016-03-26 08:37:55 +00:00
<td>en, de, fr, es, ja, zh, ...</td>
2011-09-17 12:56:49 +00:00
</tr>
2011-11-25 19:43:24 +00:00
<tr>
<td>-non-strict</td>
2016-03-26 08:37:55 +00:00
<td>opportunistic match mode</td>
2011-11-25 19:43:24 +00:00
<td>
<table>
<tr>
2016-03-26 08:37:55 +00:00
<td>Rename mode: required for tricky filenames</td>
2011-11-25 19:43:24 +00:00
</tr>
<tr>
2016-11-26 05:17:57 +00:00
<td>Subtitle mode: <a href="https://www.filebot.net/forums/viewtopic.php?f=3&amp;t=2615" target="_blank">enable fuzzy search</a></td>
2011-11-25 19:43:24 +00:00
</tr>
</table>
</td>
</tr>
2012-07-20 07:38:50 +00:00
<tr>
<td>-r</td>
2016-03-26 08:37:55 +00:00
<td>traverse folders recursively</td>
2012-07-20 07:38:50 +00:00
<td></td>
</tr>
2011-09-17 12:56:49 +00:00
<tr>
<td>-check</td>
2016-03-26 08:37:55 +00:00
<td>create or check sfv file</td>
2011-09-17 12:56:49 +00:00
<td>folder or sfv file</td>
</tr>
<tr>
<td>-extract</td>
<td>extract archives</td>
<td>folder or archive file</td>
</tr>
2011-09-17 12:56:49 +00:00
<tr>
<td>--output</td>
2014-12-21 16:41:33 +00:00
<td>output format or path</td>
2011-09-17 12:56:49 +00:00
<td>
<table>
<tr>
<td>Rename mode: output folder</td>
2011-09-17 12:56:49 +00:00
</tr>
<tr>
2016-03-26 08:37:55 +00:00
<td>Subtitle mode: srt <small class="comment">(enable transcode non-srt subtitles)</small></td>
2011-09-17 12:56:49 +00:00
</tr>
<tr>
2016-03-26 08:37:55 +00:00
<td>Checksum mode: sfv, md5, sha256</td>
</tr>
2011-09-17 12:56:49 +00:00
</table>
</td>
</tr>
<tr>
<td>--encoding</td>
<td>output charset</td>
2016-03-26 08:37:55 +00:00
<td>UTF-8, Windows-1252, GB18030, ...</td>
2011-09-17 12:56:49 +00:00
</tr>
2011-10-16 14:41:58 +00:00
<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>
2017-03-09 11:39:25 +00:00
<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>
2011-09-17 12:56:49 +00:00
<tr>
<td>--log</td>
<td>log level</td>
2016-10-19 17:01:47 +00:00
<td>ALL | FINE | INFO | WARNING</td>
2011-09-17 12:56:49 +00:00
</tr>
<tr>
<td>-clear-cache</td>
<td>clear cache</td>
2011-09-22 12:24:10 +00:00
<td></td>
</tr>
<tr>
<td>-clear-prefs</td>
<td>reset application settings</td>
<td></td>
</tr>
2016-03-26 08:37:55 +00:00
<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>
2011-09-17 12:56:49 +00:00
<tr>
2011-10-16 14:21:38 +00:00
<td>-help</td>
2016-03-26 08:37:55 +00:00
<td>print usage</td>
2011-09-17 12:56:49 +00:00
<td></td>
</tr>
</table>
</div>
2016-03-26 08:37:55 +00:00
<p class="suggestion">
2016-11-26 05:17:57 +00:00
Need some help getting started? Check the <a href="https://www.filebot.net/forums/viewforum.php?f=4">forums</a>.
2011-11-16 17:24:14 +00:00
</p>
2016-03-26 08:37:55 +00:00
<div class="metrics">
</div>
2016-03-26 08:37:55 +00:00
<div class="footer">
2017-06-08 09:07:14 +00:00
<p>Hosted on <a href="https://www.filebot.net/">filebot.net</a> | Creative Commons License: Attribution-NonCommercial-ShareAlike © @{tstamp.year}</p>
2011-09-14 23:44:52 +00:00
</div>
</div>
</div>
</body>
</html>