1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

Update site to include help

- Add sphinx documentation generated from build to help
- Add link to help (in english) in header
- Add link to github in header
This commit is contained in:
2018-04-08 11:25:34 -05:00
parent 10f06999ed
commit bacba3f0a5
431 changed files with 117335 additions and 0 deletions

View File

@@ -0,0 +1,363 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core.app &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="core.fs" href="fs.html" />
<link rel="prev" title="core" href="index.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core.app</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="index.html">core</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="fs.html">core.fs</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="module-core.app">
<span id="core-app"></span><h1>core.app<a class="headerlink" href="#module-core.app" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="core.app.DupeGuru">
<em class="property">class </em><code class="descclassname">core.app.</code><code class="descname">DupeGuru</code><span class="sig-paren">(</span><em>view</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru" title="Permalink to this definition"></a></dt>
<dd><p>Holds everything together.</p>
<p>Instantiated once per running application, it holds a reference to every high-level object
whose reference needs to be held: <a class="reference internal" href="results.html#core.results.Results" title="core.results.Results"><code class="xref py py-class docutils literal notranslate"><span class="pre">Results</span></code></a>,
<a class="reference internal" href="directories.html#core.directories.Directories" title="core.directories.Directories"><code class="xref py py-class docutils literal notranslate"><span class="pre">Directories</span></code></a>, <a class="reference internal" href="gui/index.html#module-core.gui" title="core.gui"><code class="xref py py-mod docutils literal notranslate"><span class="pre">core.gui</span></code></a> instances, etc..</p>
<p>It also hosts high level methods and acts as a coordinator for all those elements. This is why
some of its methods seem a bit shallow, like for example <a class="reference internal" href="#core.app.DupeGuru.mark_all" title="core.app.DupeGuru.mark_all"><code class="xref py py-meth docutils literal notranslate"><span class="pre">mark_all()</span></code></a> and
<a class="reference internal" href="#core.app.DupeGuru.remove_duplicates" title="core.app.DupeGuru.remove_duplicates"><code class="xref py py-meth docutils literal notranslate"><span class="pre">remove_duplicates()</span></code></a>. These methos are just proxies for a method in <a class="reference internal" href="#core.app.DupeGuru.results" title="core.app.DupeGuru.results"><code class="xref py py-attr docutils literal notranslate"><span class="pre">results</span></code></a>, but
they are also followed by a notification call which is very important if we want GUI elements
to be correctly notified of a change in the data theyre presenting.</p>
<dl class="attribute">
<dt id="core.app.DupeGuru.directories">
<code class="descname">directories</code><a class="headerlink" href="#core.app.DupeGuru.directories" title="Permalink to this definition"></a></dt>
<dd><p>Instance of <a class="reference internal" href="directories.html#core.directories.Directories" title="core.directories.Directories"><code class="xref py py-class docutils literal notranslate"><span class="pre">Directories</span></code></a>. It holds the current folder selection.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.app.DupeGuru.results">
<code class="descname">results</code><a class="headerlink" href="#core.app.DupeGuru.results" title="Permalink to this definition"></a></dt>
<dd><p>Instance of <a class="reference internal" href="results.html#core.results.Results" title="core.results.Results"><code class="xref py py-class docutils literal notranslate"><span class="pre">core.results.Results</span></code></a>. Holds the results of the latest scan.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.app.DupeGuru.selected_dupes">
<code class="descname">selected_dupes</code><a class="headerlink" href="#core.app.DupeGuru.selected_dupes" title="Permalink to this definition"></a></dt>
<dd><p>List of currently selected dupes from our <a class="reference internal" href="#core.app.DupeGuru.results" title="core.app.DupeGuru.results"><code class="xref py py-attr docutils literal notranslate"><span class="pre">results</span></code></a>. Whenever the user changes its
selection at the UI level, <a class="reference internal" href="#core.app.DupeGuru.result_table" title="core.app.DupeGuru.result_table"><code class="xref py py-attr docutils literal notranslate"><span class="pre">result_table</span></code></a> takes care of updating this attribute, so
you can trust that its always up-to-date.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.app.DupeGuru.result_table">
<code class="descname">result_table</code><a class="headerlink" href="#core.app.DupeGuru.result_table" title="Permalink to this definition"></a></dt>
<dd><p>Instance of <a class="reference internal" href="gui/index.html#module-core.gui" title="core.gui"><code class="xref py py-mod docutils literal notranslate"><span class="pre">meta-gui</span></code></a> table listing the results from <a class="reference internal" href="#core.app.DupeGuru.results" title="core.app.DupeGuru.results"><code class="xref py py-attr docutils literal notranslate"><span class="pre">results</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.add_directory">
<code class="descname">add_directory</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.add_directory" title="Permalink to this definition"></a></dt>
<dd><p>Adds folder <code class="docutils literal notranslate"><span class="pre">d</span></code> to <a class="reference internal" href="#core.app.DupeGuru.directories" title="core.app.DupeGuru.directories"><code class="xref py py-attr docutils literal notranslate"><span class="pre">directories</span></code></a>.</p>
<p>Shows an error message dialog if something bad happens.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>d</strong> (<em>str</em>) path of folder to add</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.add_selected_to_ignore_list">
<code class="descname">add_selected_to_ignore_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.add_selected_to_ignore_list" title="Permalink to this definition"></a></dt>
<dd><p>Adds <a class="reference internal" href="#core.app.DupeGuru.selected_dupes" title="core.app.DupeGuru.selected_dupes"><code class="xref py py-attr docutils literal notranslate"><span class="pre">selected_dupes</span></code></a> to <code class="xref py py-attr docutils literal notranslate"><span class="pre">ignore_list</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.apply_filter">
<code class="descname">apply_filter</code><span class="sig-paren">(</span><em>filter</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.apply_filter" title="Permalink to this definition"></a></dt>
<dd><p>Apply a filter <code class="docutils literal notranslate"><span class="pre">filter</span></code> to the results so that it shows only dupe groups that match it.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filter</strong> (<em>str</em>) filter to apply</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.copy_or_move_marked">
<code class="descname">copy_or_move_marked</code><span class="sig-paren">(</span><em>copy</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.copy_or_move_marked" title="Permalink to this definition"></a></dt>
<dd><p>Start an async move (or copy) job on marked duplicates.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>copy</strong> (<em>bool</em>) If True, duplicates will be copied instead of moved</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.delete_marked">
<code class="descname">delete_marked</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.delete_marked" title="Permalink to this definition"></a></dt>
<dd><p>Start an async job to send marked duplicates to the trash.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.export_to_csv">
<code class="descname">export_to_csv</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.export_to_csv" title="Permalink to this definition"></a></dt>
<dd><p>Export current results to CSV.</p>
<p>The columns and their order in the resulting CSV file is determined in the same way as in
<a class="reference internal" href="#core.app.DupeGuru.export_to_xhtml" title="core.app.DupeGuru.export_to_xhtml"><code class="xref py py-meth docutils literal notranslate"><span class="pre">export_to_xhtml()</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.export_to_xhtml">
<code class="descname">export_to_xhtml</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.export_to_xhtml" title="Permalink to this definition"></a></dt>
<dd><p>Export current results to XHTML.</p>
<p>The configuration of the <a class="reference internal" href="#core.app.DupeGuru.result_table" title="core.app.DupeGuru.result_table"><code class="xref py py-attr docutils literal notranslate"><span class="pre">result_table</span></code></a> (columns order and visibility) is used to
determine how the data is presented in the export. In other words, the exported table in
the resulting XHTML will look just like the results table.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.invoke_custom_command">
<code class="descname">invoke_custom_command</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.invoke_custom_command" title="Permalink to this definition"></a></dt>
<dd><p>Calls command in <code class="docutils literal notranslate"><span class="pre">CustomCommand</span></code> pref with <code class="docutils literal notranslate"><span class="pre">%d</span></code> and <code class="docutils literal notranslate"><span class="pre">%r</span></code> placeholders replaced.</p>
<p>Using the current selection, <code class="docutils literal notranslate"><span class="pre">%d</span></code> is replaced with the currently selected dupe and <code class="docutils literal notranslate"><span class="pre">%r</span></code>
is replaced with that dupes ref file. If theres no selection, the command is not invoked.
If the dupe is a ref, <code class="docutils literal notranslate"><span class="pre">%d</span></code> and <code class="docutils literal notranslate"><span class="pre">%r</span></code> will be the same.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.load">
<code class="descname">load</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.load" title="Permalink to this definition"></a></dt>
<dd><p>Load directory selection and ignore list from files in appdata.</p>
<p>This method is called during startup so that directory selection and ignore list, which
is persistent data, is the same as when the last session was closed (when <code class="xref py py-meth docutils literal notranslate"><span class="pre">save()</span></code> was
called).</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.load_from">
<code class="descname">load_from</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.load_from" title="Permalink to this definition"></a></dt>
<dd><p>Start an async job to load results from <code class="docutils literal notranslate"><span class="pre">filename</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) path of the XML file (created with <a class="reference internal" href="#core.app.DupeGuru.save_as" title="core.app.DupeGuru.save_as"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_as()</span></code></a>) to load</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.make_selected_reference">
<code class="descname">make_selected_reference</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.make_selected_reference" title="Permalink to this definition"></a></dt>
<dd><p>Promote <a class="reference internal" href="#core.app.DupeGuru.selected_dupes" title="core.app.DupeGuru.selected_dupes"><code class="xref py py-attr docutils literal notranslate"><span class="pre">selected_dupes</span></code></a> to reference position within their respective groups.</p>
<p>Each selected dupe will become the <a class="reference internal" href="engine.html#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a> of its group. If theres
more than one dupe selected for the same group, only the first (in the order currently shown
in <a class="reference internal" href="#core.app.DupeGuru.result_table" title="core.app.DupeGuru.result_table"><code class="xref py py-attr docutils literal notranslate"><span class="pre">result_table</span></code></a>) dupe will be promoted.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.mark_all">
<code class="descname">mark_all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.mark_all" title="Permalink to this definition"></a></dt>
<dd><p>Set all dupes in the results as marked.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.mark_dupe">
<code class="descname">mark_dupe</code><span class="sig-paren">(</span><em>dupe</em>, <em>marked</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.mark_dupe" title="Permalink to this definition"></a></dt>
<dd><p>Change marked status of <code class="docutils literal notranslate"><span class="pre">dupe</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>dupe</strong> (<a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a>) dupe to mark/unmark</li>
<li><strong>marked</strong> (<em>bool</em>) True = mark, False = unmark</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.mark_invert">
<code class="descname">mark_invert</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.mark_invert" title="Permalink to this definition"></a></dt>
<dd><p>Invert the marked state of all dupes in the results.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.mark_none">
<code class="descname">mark_none</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.mark_none" title="Permalink to this definition"></a></dt>
<dd><p>Set all dupes in the results as unmarked.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.open_selected">
<code class="descname">open_selected</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.open_selected" title="Permalink to this definition"></a></dt>
<dd><p>Open <a class="reference internal" href="#core.app.DupeGuru.selected_dupes" title="core.app.DupeGuru.selected_dupes"><code class="xref py py-attr docutils literal notranslate"><span class="pre">selected_dupes</span></code></a> with their associated application.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.purge_ignore_list">
<code class="descname">purge_ignore_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.purge_ignore_list" title="Permalink to this definition"></a></dt>
<dd><p>Remove files that dont exist from <code class="xref py py-attr docutils literal notranslate"><span class="pre">ignore_list</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.remove_directories">
<code class="descname">remove_directories</code><span class="sig-paren">(</span><em>indexes</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.remove_directories" title="Permalink to this definition"></a></dt>
<dd><p>Remove root directories at <code class="docutils literal notranslate"><span class="pre">indexes</span></code> from <a class="reference internal" href="#core.app.DupeGuru.directories" title="core.app.DupeGuru.directories"><code class="xref py py-attr docutils literal notranslate"><span class="pre">directories</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>indexes</strong> (<em>list of int</em>) Indexes of the directories to remove.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.remove_duplicates">
<code class="descname">remove_duplicates</code><span class="sig-paren">(</span><em>duplicates</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.remove_duplicates" title="Permalink to this definition"></a></dt>
<dd><p>Remove <code class="docutils literal notranslate"><span class="pre">duplicates</span></code> from <a class="reference internal" href="#core.app.DupeGuru.results" title="core.app.DupeGuru.results"><code class="xref py py-attr docutils literal notranslate"><span class="pre">results</span></code></a>.</p>
<p>Calls <a class="reference internal" href="results.html#core.results.Results.remove_duplicates" title="core.results.Results.remove_duplicates"><code class="xref py py-meth docutils literal notranslate"><span class="pre">remove_duplicates()</span></code></a> and send appropriate notifications.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>duplicates</strong> (list of <a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a>) duplicates to remove.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.remove_marked">
<code class="descname">remove_marked</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.remove_marked" title="Permalink to this definition"></a></dt>
<dd><p>Removed marked duplicates from the results (without touching the files themselves).</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.remove_selected">
<code class="descname">remove_selected</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.remove_selected" title="Permalink to this definition"></a></dt>
<dd><p>Removed <a class="reference internal" href="#core.app.DupeGuru.selected_dupes" title="core.app.DupeGuru.selected_dupes"><code class="xref py py-attr docutils literal notranslate"><span class="pre">selected_dupes</span></code></a> from the results (without touching the files themselves).</p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.rename_selected">
<code class="descname">rename_selected</code><span class="sig-paren">(</span><em>newname</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.rename_selected" title="Permalink to this definition"></a></dt>
<dd><p>Renames the selected dupess file to <code class="docutils literal notranslate"><span class="pre">newname</span></code>.</p>
<p>If theres more than one selected dupes, the first one is used.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>newname</strong> (<em>str</em>) The filename to rename the dupes file to.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.reprioritize_groups">
<code class="descname">reprioritize_groups</code><span class="sig-paren">(</span><em>sort_key</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.reprioritize_groups" title="Permalink to this definition"></a></dt>
<dd><p>Sort dupes in each group (in <a class="reference internal" href="#core.app.DupeGuru.results" title="core.app.DupeGuru.results"><code class="xref py py-attr docutils literal notranslate"><span class="pre">results</span></code></a>) according to <code class="docutils literal notranslate"><span class="pre">sort_key</span></code>.</p>
<p>Called by the re-prioritize dialog. Calls <a class="reference internal" href="engine.html#core.engine.Group.prioritize" title="core.engine.Group.prioritize"><code class="xref py py-meth docutils literal notranslate"><span class="pre">prioritize()</span></code></a> and, once
the sorting is done, show a message that confirms the action.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sort_key</strong> (<em>f</em><em>(</em><em>dupe</em><em>)</em>) The key being sent to <a class="reference internal" href="engine.html#core.engine.Group.prioritize" title="core.engine.Group.prioritize"><code class="xref py py-meth docutils literal notranslate"><span class="pre">prioritize()</span></code></a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.save_as">
<code class="descname">save_as</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.save_as" title="Permalink to this definition"></a></dt>
<dd><p>Save results in <code class="docutils literal notranslate"><span class="pre">filename</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> (<em>str</em>) path of the file to save results (as XML) to.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.start_scanning">
<code class="descname">start_scanning</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.start_scanning" title="Permalink to this definition"></a></dt>
<dd><p>Starts an async job to scan for duplicates.</p>
<p>Scans folders selected in <a class="reference internal" href="#core.app.DupeGuru.directories" title="core.app.DupeGuru.directories"><code class="xref py py-attr docutils literal notranslate"><span class="pre">directories</span></code></a> and put the results in <a class="reference internal" href="#core.app.DupeGuru.results" title="core.app.DupeGuru.results"><code class="xref py py-attr docutils literal notranslate"><span class="pre">results</span></code></a></p>
</dd></dl>
<dl class="method">
<dt id="core.app.DupeGuru.without_ref">
<code class="descname">without_ref</code><span class="sig-paren">(</span><em>dupes</em><span class="sig-paren">)</span><a class="headerlink" href="#core.app.DupeGuru.without_ref" title="Permalink to this definition"></a></dt>
<dd><p>Returns <code class="docutils literal notranslate"><span class="pre">dupes</span></code> with all reference elements removed.</p>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="index.html">core</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="fs.html">core.fs</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>

View File

@@ -0,0 +1,219 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core.directories &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="core.results" href="results.html" />
<link rel="prev" title="core.engine" href="engine.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core.directories</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="engine.html">core.engine</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="results.html">core.results</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="module-core.directories">
<span id="core-directories"></span><h1>core.directories<a class="headerlink" href="#module-core.directories" title="Permalink to this headline"></a></h1>
<dl class="exception">
<dt id="core.directories.AlreadyThereError">
<em class="property">exception </em><code class="descclassname">core.directories.</code><code class="descname">AlreadyThereError</code><a class="headerlink" href="#core.directories.AlreadyThereError" title="Permalink to this definition"></a></dt>
<dd><p>The path being added is already in the directory list</p>
</dd></dl>
<dl class="exception">
<dt id="core.directories.InvalidPathError">
<em class="property">exception </em><code class="descclassname">core.directories.</code><code class="descname">InvalidPathError</code><a class="headerlink" href="#core.directories.InvalidPathError" title="Permalink to this definition"></a></dt>
<dd><p>The path being added is invalid</p>
</dd></dl>
<dl class="class">
<dt id="core.directories.Directories">
<em class="property">class </em><code class="descclassname">core.directories.</code><code class="descname">Directories</code><a class="headerlink" href="#core.directories.Directories" title="Permalink to this definition"></a></dt>
<dd><p>Holds user folder selection.</p>
<p>Manages the selection that the user make through the folder selection dialog. It also manages
folder states, and how recursion applies to them.</p>
<p>Then, when the user starts the scan, <a class="reference internal" href="#core.directories.Directories.get_files" title="core.directories.Directories.get_files"><code class="xref py py-meth docutils literal notranslate"><span class="pre">get_files()</span></code></a> is called to retrieve all files (wrapped
in <a class="reference internal" href="fs.html#module-core.fs" title="core.fs"><code class="xref py py-mod docutils literal notranslate"><span class="pre">core.fs</span></code></a>) that have to be scanned according to the chosen folders/states.</p>
<dl class="method">
<dt id="core.directories.Directories.add_path">
<code class="descname">add_path</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.add_path" title="Permalink to this definition"></a></dt>
<dd><p>Adds <code class="docutils literal notranslate"><span class="pre">path</span></code> to self, if not already there.</p>
<p>Raises <a class="reference internal" href="#core.directories.AlreadyThereError" title="core.directories.AlreadyThereError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">AlreadyThereError</span></code></a> if <code class="docutils literal notranslate"><span class="pre">path</span></code> is already in self. If path is a directory
containing some of the directories already present in self, <code class="docutils literal notranslate"><span class="pre">path</span></code> will be added, but all
directories under it will be removed. Can also raise <a class="reference internal" href="#core.directories.InvalidPathError" title="core.directories.InvalidPathError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">InvalidPathError</span></code></a> if <code class="docutils literal notranslate"><span class="pre">path</span></code>
does not exist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<a class="reference internal" href="../hscommon/path.html#hscommon.path.Path" title="hscommon.path.Path"><em>Path</em></a>) path to add</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.directories.Directories.get_files">
<code class="descname">get_files</code><span class="sig-paren">(</span><em>fileclasses=None</em>, <em>j=&lt;hscommon.jobprogress.job.NullJob object&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.get_files" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of all files that are not excluded.</p>
<p>Returned files also have their <code class="docutils literal notranslate"><span class="pre">is_ref</span></code> attr set if applicable.</p>
</dd></dl>
<dl class="method">
<dt id="core.directories.Directories.get_folders">
<code class="descname">get_folders</code><span class="sig-paren">(</span><em>folderclass=None</em>, <em>j=&lt;hscommon.jobprogress.job.NullJob object&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.get_folders" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of all folders that are not excluded.</p>
<p>Returned folders also have their <code class="docutils literal notranslate"><span class="pre">is_ref</span></code> attr set if applicable.</p>
</dd></dl>
<dl class="method">
<dt id="core.directories.Directories.get_state">
<code class="descname">get_state</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.get_state" title="Permalink to this definition"></a></dt>
<dd><p>Returns the state of <code class="docutils literal notranslate"><span class="pre">path</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#core.directories.DirectoryState" title="core.directories.DirectoryState"><code class="xref py py-class docutils literal notranslate"><span class="pre">DirectoryState</span></code></a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="core.directories.Directories.get_subfolders">
<em class="property">static </em><code class="descname">get_subfolders</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.get_subfolders" title="Permalink to this definition"></a></dt>
<dd><p>Returns a sorted list of paths corresponding to subfolders in <code class="docutils literal notranslate"><span class="pre">path</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<a class="reference internal" href="../hscommon/path.html#hscommon.path.Path" title="hscommon.path.Path"><em>Path</em></a>) get subfolders from there</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list of Path</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.directories.Directories.has_any_file">
<code class="descname">has_any_file</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.has_any_file" title="Permalink to this definition"></a></dt>
<dd><p>Returns whether selected folders contain any file.</p>
<p>Because it stops at the first file it finds, its much faster than get_files().</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.directories.Directories.load_from_file">
<code class="descname">load_from_file</code><span class="sig-paren">(</span><em>infile</em><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.load_from_file" title="Permalink to this definition"></a></dt>
<dd><p>Load folder selection from <code class="docutils literal notranslate"><span class="pre">infile</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>infile</strong> (<em>file</em>) path or file pointer to XML generated through <a class="reference internal" href="#core.directories.Directories.save_to_file" title="core.directories.Directories.save_to_file"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_to_file()</span></code></a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.directories.Directories.save_to_file">
<code class="descname">save_to_file</code><span class="sig-paren">(</span><em>outfile</em><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.save_to_file" title="Permalink to this definition"></a></dt>
<dd><p>Save folder selection as XML to <code class="docutils literal notranslate"><span class="pre">outfile</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>outfile</strong> (<em>file</em>) path or file pointer to XML file to save to.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.directories.Directories.set_state">
<code class="descname">set_state</code><span class="sig-paren">(</span><em>path</em>, <em>state</em><span class="sig-paren">)</span><a class="headerlink" href="#core.directories.Directories.set_state" title="Permalink to this definition"></a></dt>
<dd><p>Set the state of folder at <code class="docutils literal notranslate"><span class="pre">path</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>path</strong> (<a class="reference internal" href="../hscommon/path.html#hscommon.path.Path" title="hscommon.path.Path"><em>Path</em></a>) path of the target folder</li>
<li><strong>state</strong> (<a class="reference internal" href="#core.directories.DirectoryState" title="core.directories.DirectoryState"><code class="xref py py-class docutils literal notranslate"><span class="pre">DirectoryState</span></code></a>) state to set folder to</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="core.directories.DirectoryState">
<em class="property">class </em><code class="descclassname">core.directories.</code><code class="descname">DirectoryState</code><a class="headerlink" href="#core.directories.DirectoryState" title="Permalink to this definition"></a></dt>
<dd><p>Enum describing how a folder should be considered.</p>
<ul class="simple">
<li>DirectoryState.Normal: Scan all files normally</li>
<li>DirectoryState.Reference: Scan files, but make sure never to delete any of them</li>
<li>DirectoryState.Excluded: Dont scan this folder</li>
</ul>
</dd></dl>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="engine.html">core.engine</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="results.html">core.results</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>

View File

@@ -0,0 +1,284 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core.engine &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="core.directories" href="directories.html" />
<link rel="prev" title="core.fs" href="fs.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core.engine</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="fs.html">core.fs</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="directories.html">core.directories</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="module-core.engine">
<span id="core-engine"></span><h1>core.engine<a class="headerlink" href="#module-core.engine" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="core.engine.Match">
<em class="property">class </em><code class="descclassname">core.engine.</code><code class="descname">Match</code><a class="headerlink" href="#core.engine.Match" title="Permalink to this definition"></a></dt>
<dd><p>Represents a match between two <a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a>.</p>
<p>Regarless of the matching method, when two files are determined to match, a Match pair is created,
which holds, of course, the two matched files, but also their match “level”.</p>
<dl class="attribute">
<dt id="core.engine.Match.first">
<code class="descname">first</code><a class="headerlink" href="#core.engine.Match.first" title="Permalink to this definition"></a></dt>
<dd><p>first file of the pair.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.engine.Match.second">
<code class="descname">second</code><a class="headerlink" href="#core.engine.Match.second" title="Permalink to this definition"></a></dt>
<dd><p>second file of the pair.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.engine.Match.percentage">
<code class="descname">percentage</code><a class="headerlink" href="#core.engine.Match.percentage" title="Permalink to this definition"></a></dt>
<dd><p>their match level according to the scan method which found the match. int from 1 to 100. For
exact scan methods, such as Contents scans, this will always be 100.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="core.engine.Group">
<em class="property">class </em><code class="descclassname">core.engine.</code><code class="descname">Group</code><a class="headerlink" href="#core.engine.Group" title="Permalink to this definition"></a></dt>
<dd><p>A group of <a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> that match together.</p>
<p>This manages match pairs into groups and ensures that all files in the group match to each
other.</p>
<dl class="attribute">
<dt id="core.engine.Group.ref">
<code class="descname">ref</code><a class="headerlink" href="#core.engine.Group.ref" title="Permalink to this definition"></a></dt>
<dd><p>The “reference” file, which is the file among the group that isnt going to be deleted.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.engine.Group.ordered">
<code class="descname">ordered</code><a class="headerlink" href="#core.engine.Group.ordered" title="Permalink to this definition"></a></dt>
<dd><p>Ordered list of duplicates in the group (including the <a class="reference internal" href="#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a>).</p>
</dd></dl>
<dl class="attribute">
<dt id="core.engine.Group.unordered">
<code class="descname">unordered</code><a class="headerlink" href="#core.engine.Group.unordered" title="Permalink to this definition"></a></dt>
<dd><p>Set duplicates in the group (including the <a class="reference internal" href="#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a>).</p>
</dd></dl>
<dl class="attribute">
<dt id="core.engine.Group.dupes">
<code class="descname">dupes</code><a class="headerlink" href="#core.engine.Group.dupes" title="Permalink to this definition"></a></dt>
<dd><p>An ordered list of the groups duplicate, without <a class="reference internal" href="#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a>. Equivalent to
<code class="docutils literal notranslate"><span class="pre">ordered[1:]</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="core.engine.Group.percentage">
<code class="descname">percentage</code><a class="headerlink" href="#core.engine.Group.percentage" title="Permalink to this definition"></a></dt>
<dd><p>Average match percentage of match pairs containing <a class="reference internal" href="#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="core.engine.Group.add_match">
<code class="descname">add_match</code><span class="sig-paren">(</span><em>match</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.Group.add_match" title="Permalink to this definition"></a></dt>
<dd><p>Adds <code class="docutils literal notranslate"><span class="pre">match</span></code> to internal match list and possibly add duplicates to the group.</p>
<p>A duplicate can only be considered as such if it matches all other duplicates in the group.
This method registers that pair (A, B) represented in <code class="docutils literal notranslate"><span class="pre">match</span></code> as possible candidates and,
if A and/or B end up matching every other duplicates in the group, add these duplicates to
the group.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>match</strong> (<em>tuple</em>) pair of <a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> to add</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.engine.Group.discard_matches">
<code class="descname">discard_matches</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.Group.discard_matches" title="Permalink to this definition"></a></dt>
<dd><p>Remove all recorded matches that didnt result in a duplicate being added to the group.</p>
<p>You can call this after the duplicate scanning process to free a bit of memory.</p>
</dd></dl>
<dl class="method">
<dt id="core.engine.Group.get_match_of">
<code class="descname">get_match_of</code><span class="sig-paren">(</span><em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.Group.get_match_of" title="Permalink to this definition"></a></dt>
<dd><p>Returns the match pair between <code class="docutils literal notranslate"><span class="pre">item</span></code> and <a class="reference internal" href="#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="core.engine.Group.prioritize">
<code class="descname">prioritize</code><span class="sig-paren">(</span><em>key_func</em>, <em>tie_breaker=None</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.Group.prioritize" title="Permalink to this definition"></a></dt>
<dd><p>Reorders <a class="reference internal" href="#core.engine.Group.ordered" title="core.engine.Group.ordered"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ordered</span></code></a> according to <code class="docutils literal notranslate"><span class="pre">key_func</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>key_func</strong> Key (f(x)) to be used for sorting</li>
<li><strong>tie_breaker</strong> function to be used to select the reference position in case the top
duplicates have the same key_func() result.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.engine.Group.switch_ref">
<code class="descname">switch_ref</code><span class="sig-paren">(</span><em>with_dupe</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.Group.switch_ref" title="Permalink to this definition"></a></dt>
<dd><p>Make the <a class="reference internal" href="#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a> dupe of the group switch position with <code class="docutils literal notranslate"><span class="pre">with_dupe</span></code>.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="core.engine.build_word_dict">
<code class="descclassname">core.engine.</code><code class="descname">build_word_dict</code><span class="sig-paren">(</span><em>objects</em>, <em>j=&lt;hscommon.jobprogress.job.NullJob object&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.build_word_dict" title="Permalink to this definition"></a></dt>
<dd><p>Returns a dict of objects mapped by their words.</p>
<p>objects must have a <code class="docutils literal notranslate"><span class="pre">words</span></code> attribute being a list of strings or a list of lists of strings
(<a class="reference internal" href="#fields"><span class="std std-ref">Fields</span></a>).</p>
<p>The result will be a dict with words as keys, lists of objects as values.</p>
</dd></dl>
<dl class="function">
<dt id="core.engine.compare">
<code class="descclassname">core.engine.</code><code class="descname">compare</code><span class="sig-paren">(</span><em>first</em>, <em>second</em>, <em>flags=()</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.compare" title="Permalink to this definition"></a></dt>
<dd><p>Returns the % of words that match between <code class="docutils literal notranslate"><span class="pre">first</span></code> and <code class="docutils literal notranslate"><span class="pre">second</span></code></p>
<p>The result is a <code class="docutils literal notranslate"><span class="pre">int</span></code> in the range 0..100.
<code class="docutils literal notranslate"><span class="pre">first</span></code> and <code class="docutils literal notranslate"><span class="pre">second</span></code> can be either a string or a list (of words).</p>
</dd></dl>
<dl class="function">
<dt id="core.engine.compare_fields">
<code class="descclassname">core.engine.</code><code class="descname">compare_fields</code><span class="sig-paren">(</span><em>first</em>, <em>second</em>, <em>flags=()</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.compare_fields" title="Permalink to this definition"></a></dt>
<dd><p>Returns the score for the lowest matching <a class="reference internal" href="#fields"><span class="std std-ref">Fields</span></a>.</p>
<p><code class="docutils literal notranslate"><span class="pre">first</span></code> and <code class="docutils literal notranslate"><span class="pre">second</span></code> must be lists of lists of string. Each sub-list is then compared with
<a class="reference internal" href="#core.engine.compare" title="core.engine.compare"><code class="xref py py-func docutils literal notranslate"><span class="pre">compare()</span></code></a>.</p>
</dd></dl>
<dl class="function">
<dt id="core.engine.getmatches">
<code class="descclassname">core.engine.</code><code class="descname">getmatches</code><span class="sig-paren">(</span><em>objects</em>, <em>min_match_percentage=0</em>, <em>match_similar_words=False</em>, <em>weight_words=False</em>, <em>no_field_order=False</em>, <em>j=&lt;hscommon.jobprogress.job.NullJob object&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.getmatches" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of <a class="reference internal" href="#core.engine.Match" title="core.engine.Match"><code class="xref py py-class docutils literal notranslate"><span class="pre">Match</span></code></a> within <code class="docutils literal notranslate"><span class="pre">objects</span></code> after fuzzily matching their words.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>objects</strong> List of <a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> to match.</li>
<li><strong>min_match_percentage</strong> (<em>int</em>) minimum % of words that have to match.</li>
<li><strong>match_similar_words</strong> (<em>bool</em>) make similar words (see <a class="reference internal" href="#core.engine.merge_similar_words" title="core.engine.merge_similar_words"><code class="xref py py-func docutils literal notranslate"><span class="pre">merge_similar_words()</span></code></a>) match.</li>
<li><strong>weight_words</strong> (<em>bool</em>) longer words are worth more in match % computations.</li>
<li><strong>no_field_order</strong> (<em>bool</em>) match <a class="reference internal" href="#fields"><span class="std std-ref">Fields</span></a> regardless of their order.</li>
<li><strong>j</strong> A <a class="reference internal" href="../index.html#jobs"><span class="std std-ref">job progress instance</span></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="core.engine.getmatches_by_contents">
<code class="descclassname">core.engine.</code><code class="descname">getmatches_by_contents</code><span class="sig-paren">(</span><em>files</em>, <em>j=&lt;hscommon.jobprogress.job.NullJob object&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.getmatches_by_contents" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of <a class="reference internal" href="#core.engine.Match" title="core.engine.Match"><code class="xref py py-class docutils literal notranslate"><span class="pre">Match</span></code></a> within <code class="docutils literal notranslate"><span class="pre">files</span></code> if their contents is the same.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>j</strong> A <a class="reference internal" href="../index.html#jobs"><span class="std std-ref">job progress instance</span></a>.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="core.engine.get_groups">
<code class="descclassname">core.engine.</code><code class="descname">get_groups</code><span class="sig-paren">(</span><em>matches</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.get_groups" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of <a class="reference internal" href="#core.engine.Group" title="core.engine.Group"><code class="xref py py-class docutils literal notranslate"><span class="pre">Group</span></code></a> from <code class="docutils literal notranslate"><span class="pre">matches</span></code>.</p>
<p>Create groups out of match pairs in the smartest way possible.</p>
</dd></dl>
<dl class="function">
<dt id="core.engine.merge_similar_words">
<code class="descclassname">core.engine.</code><code class="descname">merge_similar_words</code><span class="sig-paren">(</span><em>word_dict</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.merge_similar_words" title="Permalink to this definition"></a></dt>
<dd><p>Take all keys in <code class="docutils literal notranslate"><span class="pre">word_dict</span></code> that are similar, and merge them together.</p>
<p><code class="docutils literal notranslate"><span class="pre">word_dict</span></code> has been built with <a class="reference internal" href="#core.engine.build_word_dict" title="core.engine.build_word_dict"><code class="xref py py-func docutils literal notranslate"><span class="pre">build_word_dict()</span></code></a>. Similarity is computed with Pythons
<code class="docutils literal notranslate"><span class="pre">difflib.get_close_matches()</span></code>, which computes the number of edits that are necessary to make
a word equal to the other.</p>
</dd></dl>
<dl class="function">
<dt id="core.engine.reduce_common_words">
<code class="descclassname">core.engine.</code><code class="descname">reduce_common_words</code><span class="sig-paren">(</span><em>word_dict</em>, <em>threshold</em><span class="sig-paren">)</span><a class="headerlink" href="#core.engine.reduce_common_words" title="Permalink to this definition"></a></dt>
<dd><p>Remove all objects from <code class="docutils literal notranslate"><span class="pre">word_dict</span></code> values where the object count &gt;= <code class="docutils literal notranslate"><span class="pre">threshold</span></code></p>
<p><code class="docutils literal notranslate"><span class="pre">word_dict</span></code> has been built with <a class="reference internal" href="#core.engine.build_word_dict" title="core.engine.build_word_dict"><code class="xref py py-func docutils literal notranslate"><span class="pre">build_word_dict()</span></code></a>.</p>
<p>The exception to this removal are the objects where all the words of the object are common.
Because if we remove them, we will miss some duplicates!</p>
</dd></dl>
<div class="section" id="fields">
<span id="id1"></span><h2>Fields<a class="headerlink" href="#fields" title="Permalink to this headline"></a></h2>
<p>Fields are groups of words which each represent a significant part of the whole name. This concept
is sifnificant in music file names, where we often have names like “My Artist - a very long title
with many many words”.</p>
<p>This title has 10 words. If you run as scan with a bit of tolerance, lets say 90%, youll be able
to find a dupe that has only one “many” in the song title. However, you would also get false
duplicates from a title like “My Giraffe - a very long title with many many words”, which is of
course a very different song and it doesnt make sense to match them.</p>
<p>When matching by fields, each field (separated by “-“) is considered as a separate string to match
independently. After all fields are matched, the lowest result is kept. In the “Giraffe” example we
gave, the result would be 50% instead of 90% in normal mode.</p>
</div>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="fs.html">core.fs</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="directories.html">core.directories</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>

View File

@@ -0,0 +1,161 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core.fs &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="core.engine" href="engine.html" />
<link rel="prev" title="core.app" href="app.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core.fs</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="app.html">core.app</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="engine.html">core.engine</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="module-core.fs">
<span id="core-fs"></span><h1>core.fs<a class="headerlink" href="#module-core.fs" title="Permalink to this headline"></a></h1>
<dl class="exception">
<dt id="core.fs.FSError">
<em class="property">exception </em><code class="descclassname">core.fs.</code><code class="descname">FSError</code><span class="sig-paren">(</span><em>fsobject</em>, <em>parent=None</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.FSError" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="exception">
<dt id="core.fs.AlreadyExistsError">
<em class="property">exception </em><code class="descclassname">core.fs.</code><code class="descname">AlreadyExistsError</code><span class="sig-paren">(</span><em>fsobject</em>, <em>parent=None</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.AlreadyExistsError" title="Permalink to this definition"></a></dt>
<dd><p>The directory or file name were trying to add already exists</p>
</dd></dl>
<dl class="exception">
<dt id="core.fs.InvalidPath">
<em class="property">exception </em><code class="descclassname">core.fs.</code><code class="descname">InvalidPath</code><span class="sig-paren">(</span><em>fsobject</em>, <em>parent=None</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.InvalidPath" title="Permalink to this definition"></a></dt>
<dd><p>The path of self is invalid, and cannot be worked with.</p>
</dd></dl>
<dl class="exception">
<dt id="core.fs.InvalidDestinationError">
<em class="property">exception </em><code class="descclassname">core.fs.</code><code class="descname">InvalidDestinationError</code><span class="sig-paren">(</span><em>fsobject</em>, <em>parent=None</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.InvalidDestinationError" title="Permalink to this definition"></a></dt>
<dd><p>A copy/move operation has been called, but the destination is invalid.</p>
</dd></dl>
<dl class="exception">
<dt id="core.fs.OperationError">
<em class="property">exception </em><code class="descclassname">core.fs.</code><code class="descname">OperationError</code><span class="sig-paren">(</span><em>fsobject</em>, <em>parent=None</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.OperationError" title="Permalink to this definition"></a></dt>
<dd><p>A copy/move/delete operation has been called, but the checkup after the
operation shows that it didnt work.</p>
</dd></dl>
<dl class="class">
<dt id="core.fs.File">
<em class="property">class </em><code class="descclassname">core.fs.</code><code class="descname">File</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.File" title="Permalink to this definition"></a></dt>
<dd><p>Represents a file and holds metadata to be used for scanning.</p>
<dl class="classmethod">
<dt id="core.fs.File.can_handle">
<em class="property">classmethod </em><code class="descname">can_handle</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.File.can_handle" title="Permalink to this definition"></a></dt>
<dd><p>Returns whether this file wrapper class can handle <code class="docutils literal notranslate"><span class="pre">path</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="core.fs.File.get_display_info">
<code class="descname">get_display_info</code><span class="sig-paren">(</span><em>group</em>, <em>delta</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.File.get_display_info" title="Permalink to this definition"></a></dt>
<dd><p>Returns a display-ready dict of dupes data.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="core.fs.Folder">
<em class="property">class </em><code class="descclassname">core.fs.</code><code class="descname">Folder</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.Folder" title="Permalink to this definition"></a></dt>
<dd><p>A wrapper around a folder path.</p>
<p>It has the size/md5 info of a File, but its value are the sum of its subitems.</p>
<dl class="classmethod">
<dt id="core.fs.Folder.can_handle">
<em class="property">classmethod </em><code class="descname">can_handle</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.Folder.can_handle" title="Permalink to this definition"></a></dt>
<dd><p>Returns whether this file wrapper class can handle <code class="docutils literal notranslate"><span class="pre">path</span></code>.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="core.fs.get_file">
<code class="descclassname">core.fs.</code><code class="descname">get_file</code><span class="sig-paren">(</span><em>path, fileclasses=[&lt;class 'core.fs.File'&gt;]</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.get_file" title="Permalink to this definition"></a></dt>
<dd><p>Wraps <code class="docutils literal notranslate"><span class="pre">path</span></code> around its appropriate <a class="reference internal" href="#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> class.</p>
<p>Whether a class is “appropriate” is decided by <a class="reference internal" href="#core.fs.File.can_handle" title="core.fs.File.can_handle"><code class="xref py py-meth docutils literal notranslate"><span class="pre">File.can_handle()</span></code></a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>path</strong> (<a class="reference internal" href="../hscommon/path.html#hscommon.path.Path" title="hscommon.path.Path"><em>Path</em></a>) path to wrap</li>
<li><strong>fileclasses</strong> List of candidate <a class="reference internal" href="#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> classes</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="core.fs.get_files">
<code class="descclassname">core.fs.</code><code class="descname">get_files</code><span class="sig-paren">(</span><em>path, fileclasses=[&lt;class 'core.fs.File'&gt;]</em><span class="sig-paren">)</span><a class="headerlink" href="#core.fs.get_files" title="Permalink to this definition"></a></dt>
<dd><p>Returns a list of <a class="reference internal" href="#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> for each file contained in <code class="docutils literal notranslate"><span class="pre">path</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>path</strong> (<a class="reference internal" href="../hscommon/path.html#hscommon.path.Path" title="hscommon.path.Path"><em>Path</em></a>) path to scan</li>
<li><strong>fileclasses</strong> List of candidate <a class="reference internal" href="#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> classes</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="app.html">core.app</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="engine.html">core.engine</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>

View File

@@ -0,0 +1,151 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core.gui.deletion_options &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="hscommon" href="../../hscommon/index.html" />
<link rel="prev" title="core.gui" href="index.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core.gui.deletion_options</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="index.html">core.gui</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="../../hscommon/index.html">hscommon</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="module-core.gui.deletion_options">
<span id="core-gui-deletion-options"></span><h1>core.gui.deletion_options<a class="headerlink" href="#module-core.gui.deletion_options" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="core.gui.deletion_options.DeletionOptions">
<em class="property">class </em><code class="descclassname">core.gui.deletion_options.</code><code class="descname">DeletionOptions</code><a class="headerlink" href="#core.gui.deletion_options.DeletionOptions" title="Permalink to this definition"></a></dt>
<dd><p>Present the user with deletion options before proceeding.</p>
<p>When the user activates “Send to trash”, we present him with a couple of options that changes
the behavior of that deletion operation.</p>
<dl class="method">
<dt id="core.gui.deletion_options.DeletionOptions.show">
<code class="descname">show</code><span class="sig-paren">(</span><em>mark_count</em><span class="sig-paren">)</span><a class="headerlink" href="#core.gui.deletion_options.DeletionOptions.show" title="Permalink to this definition"></a></dt>
<dd><p>Prompt the user with a modal dialog offering our deletion options.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mark_count</strong> (<em>int</em>) Number of dupes marked for deletion.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Whether the user accepted the dialog (we cancel deletion if false).</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.gui.deletion_options.DeletionOptions.supports_links">
<code class="descname">supports_links</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.gui.deletion_options.DeletionOptions.supports_links" title="Permalink to this definition"></a></dt>
<dd><p>Returns whether our platform supports symlinks.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.gui.deletion_options.DeletionOptions.direct">
<code class="descname">direct</code><em class="property"> = None</em><a class="headerlink" href="#core.gui.deletion_options.DeletionOptions.direct" title="Permalink to this definition"></a></dt>
<dd><p>Delete dupes directly and dont send to trash.
<em>bool</em>. <em>get/set</em></p>
</dd></dl>
<dl class="attribute">
<dt id="core.gui.deletion_options.DeletionOptions.link_deleted">
<code class="descname">link_deleted</code><a class="headerlink" href="#core.gui.deletion_options.DeletionOptions.link_deleted" title="Permalink to this definition"></a></dt>
<dd><p>Replace deleted dupes with symlinks (or hardlinks) to the dupe group reference.</p>
<p><em>bool</em>. <em>get/set</em></p>
<p>Whether the link is a symlink or hardlink is decided by <a class="reference internal" href="#core.gui.deletion_options.DeletionOptions.use_hardlinks" title="core.gui.deletion_options.DeletionOptions.use_hardlinks"><code class="xref py py-attr docutils literal notranslate"><span class="pre">use_hardlinks</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.gui.deletion_options.DeletionOptions.use_hardlinks">
<code class="descname">use_hardlinks</code><em class="property"> = None</em><a class="headerlink" href="#core.gui.deletion_options.DeletionOptions.use_hardlinks" title="Permalink to this definition"></a></dt>
<dd><p>Whether symlinks or hardlinks are used when doing <a class="reference internal" href="#core.gui.deletion_options.DeletionOptions.link_deleted" title="core.gui.deletion_options.DeletionOptions.link_deleted"><code class="xref py py-attr docutils literal notranslate"><span class="pre">link_deleted</span></code></a>.
<em>bool</em>. <em>get/set</em></p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="core.gui.deletion_options.DeletionOptionsView">
<em class="property">class </em><code class="descclassname">core.gui.deletion_options.</code><code class="descname">DeletionOptionsView</code><a class="headerlink" href="#core.gui.deletion_options.DeletionOptionsView" title="Permalink to this definition"></a></dt>
<dd><p>Expected interface for <a class="reference internal" href="#core.gui.deletion_options.DeletionOptions" title="core.gui.deletion_options.DeletionOptions"><code class="xref py py-class docutils literal notranslate"><span class="pre">DeletionOptions</span></code></a>s view.</p>
<p><em>Not actually used in the code. For documentation purposes only.</em></p>
<p>Our view presents the user with an appropriate way (probably a mix of checkboxes and radio
buttons) to set the different flags in <a class="reference internal" href="#core.gui.deletion_options.DeletionOptions" title="core.gui.deletion_options.DeletionOptions"><code class="xref py py-class docutils literal notranslate"><span class="pre">DeletionOptions</span></code></a>. Note that
<a class="reference internal" href="#core.gui.deletion_options.DeletionOptions.use_hardlinks" title="core.gui.deletion_options.DeletionOptions.use_hardlinks"><code class="xref py py-attr docutils literal notranslate"><span class="pre">DeletionOptions.use_hardlinks</span></code></a> is only relevant if <a class="reference internal" href="#core.gui.deletion_options.DeletionOptions.link_deleted" title="core.gui.deletion_options.DeletionOptions.link_deleted"><code class="xref py py-attr docutils literal notranslate"><span class="pre">DeletionOptions.link_deleted</span></code></a>
is true. This is why we toggle the “enabled” state of that flag.</p>
<p>We expect the view to set <a class="reference internal" href="#core.gui.deletion_options.DeletionOptions.link_deleted" title="core.gui.deletion_options.DeletionOptions.link_deleted"><code class="xref py py-attr docutils literal notranslate"><span class="pre">DeletionOptions.link_deleted</span></code></a> immediately as the user changes
its value because it will toggle <a class="reference internal" href="#core.gui.deletion_options.DeletionOptionsView.set_hardlink_option_enabled" title="core.gui.deletion_options.DeletionOptionsView.set_hardlink_option_enabled"><code class="xref py py-meth docutils literal notranslate"><span class="pre">set_hardlink_option_enabled()</span></code></a></p>
<p>Other than the flags, theres also a prompt message which has a dynamic content, defined by
<a class="reference internal" href="#core.gui.deletion_options.DeletionOptionsView.update_msg" title="core.gui.deletion_options.DeletionOptionsView.update_msg"><code class="xref py py-meth docutils literal notranslate"><span class="pre">update_msg()</span></code></a>.</p>
<dl class="method">
<dt id="core.gui.deletion_options.DeletionOptionsView.set_hardlink_option_enabled">
<code class="descname">set_hardlink_option_enabled</code><span class="sig-paren">(</span><em>is_enabled: bool</em><span class="sig-paren">)</span><a class="headerlink" href="#core.gui.deletion_options.DeletionOptionsView.set_hardlink_option_enabled" title="Permalink to this definition"></a></dt>
<dd><p>Enable or disable the widget controlling <a class="reference internal" href="#core.gui.deletion_options.DeletionOptions.use_hardlinks" title="core.gui.deletion_options.DeletionOptions.use_hardlinks"><code class="xref py py-attr docutils literal notranslate"><span class="pre">DeletionOptions.use_hardlinks</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="core.gui.deletion_options.DeletionOptionsView.show">
<code class="descname">show</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#core.gui.deletion_options.DeletionOptionsView.show" title="Permalink to this definition"></a></dt>
<dd><p>Show the dialog in a modal fashion.</p>
<p>Returns whether the dialog was “accepted” (the user pressed OK).</p>
</dd></dl>
<dl class="method">
<dt id="core.gui.deletion_options.DeletionOptionsView.update_msg">
<code class="descname">update_msg</code><span class="sig-paren">(</span><em>msg: str</em><span class="sig-paren">)</span><a class="headerlink" href="#core.gui.deletion_options.DeletionOptionsView.update_msg" title="Permalink to this definition"></a></dt>
<dd><p>Update the dialogs prompt with <code class="docutils literal notranslate"><span class="pre">str</span></code>.</p>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="index.html">core.gui</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="../../hscommon/index.html">hscommon</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>

View File

@@ -0,0 +1,78 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core.gui &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="core.gui.deletion_options" href="deletion_options.html" />
<link rel="prev" title="core.results" href="../results.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core.gui</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="../results.html">core.results</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="deletion_options.html">core.gui.deletion_options</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="module-core.gui">
<span id="core-gui"></span><h1>core.gui<a class="headerlink" href="#module-core.gui" title="Permalink to this headline"></a></h1>
<div class="section" id="meta-gui-elements-in-dupeguru">
<h2>Meta GUI elements in dupeGuru<a class="headerlink" href="#meta-gui-elements-in-dupeguru" title="Permalink to this headline"></a></h2>
<p>dupeGuru is designed with a <a class="reference external" href="http://www.hardcoded.net/articles/cross-toolkit-software">cross-toolkit</a> approach in mind. It means that its core code
(which doesnt depend on any GUI toolkit) has elements which preformat core information in a way
that makes it easy for a UI layer to consume.</p>
<p>For example, we have <code class="xref py py-class docutils literal notranslate"><span class="pre">ResultTable</span></code> which takes information from
<a class="reference internal" href="../results.html#core.results.Results" title="core.results.Results"><code class="xref py py-class docutils literal notranslate"><span class="pre">Results</span></code></a> and mashes it in rows and columns which are ready to be fetched by
either Cocoas <code class="docutils literal notranslate"><span class="pre">NSTableView</span></code> or Qts <code class="docutils literal notranslate"><span class="pre">QTableView</span></code>. It tells them which cell is supposed to be
blue, which is supposed to be orange, does the sorting logic, holds selection, etc..</p>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="deletion_options.html">core.gui.deletion_options</a></li>
</ul>
</div>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="../results.html">core.results</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="deletion_options.html">core.gui.deletion_options</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>

View File

@@ -0,0 +1,80 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="core.app" href="app.html" />
<link rel="prev" title="Developer Guide" href="../index.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="../index.html">Developer Guide</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="app.html">core.app</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="core">
<h1>core<a class="headerlink" href="#core" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="app.html">core.app</a></li>
<li class="toctree-l1"><a class="reference internal" href="fs.html">core.fs</a></li>
<li class="toctree-l1"><a class="reference internal" href="engine.html">core.engine</a><ul>
<li class="toctree-l2"><a class="reference internal" href="engine.html#fields">Fields</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="directories.html">core.directories</a></li>
<li class="toctree-l1"><a class="reference internal" href="results.html">core.results</a></li>
<li class="toctree-l1"><a class="reference internal" href="gui/index.html">core.gui</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gui/index.html#meta-gui-elements-in-dupeguru">Meta GUI elements in dupeGuru</a></li>
<li class="toctree-l2"><a class="reference internal" href="gui/deletion_options.html">core.gui.deletion_options</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="../index.html">Developer Guide</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="app.html">core.app</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>

View File

@@ -0,0 +1,209 @@
<!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" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>core.results &#8212; dupeGuru 4.0.3 documentation</title>
<link rel="stylesheet" href="../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" src="../../_static/documentation_options.js"></script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/translations.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="core.gui" href="gui/index.html" />
<link rel="prev" title="core.directories" href="directories.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="../../index.html">
<span>dupeGuru 4.0.3 documentation</span></a></h1>
<h2 class="heading"><span>core.results</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="directories.html">core.directories</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="gui/index.html">core.gui</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="section" id="module-core.results">
<span id="core-results"></span><h1>core.results<a class="headerlink" href="#module-core.results" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="core.results.Results">
<em class="property">class </em><code class="descclassname">core.results.</code><code class="descname">Results</code><span class="sig-paren">(</span><em>app</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results" title="Permalink to this definition"></a></dt>
<dd><p>Manages a collection of duplicate <a class="reference internal" href="engine.html#core.engine.Group" title="core.engine.Group"><code class="xref py py-class docutils literal notranslate"><span class="pre">Group</span></code></a>.</p>
<p>This class takes care or marking, sorting and filtering duplicate groups.</p>
<dl class="attribute">
<dt id="core.results.Results.groups">
<code class="descname">groups</code><a class="headerlink" href="#core.results.Results.groups" title="Permalink to this definition"></a></dt>
<dd><p>The list of <a class="reference internal" href="engine.html#core.engine.Group" title="core.engine.Group"><code class="xref py py-class docutils literal notranslate"><span class="pre">Group</span></code></a> contained managed by this instance.</p>
</dd></dl>
<dl class="attribute">
<dt id="core.results.Results.dupes">
<code class="descname">dupes</code><a class="headerlink" href="#core.results.Results.dupes" title="Permalink to this definition"></a></dt>
<dd><p>A list of all duplicates (<a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> instances), without ref, contained in the
currently managed <a class="reference internal" href="#core.results.Results.groups" title="core.results.Results.groups"><code class="xref py py-attr docutils literal notranslate"><span class="pre">groups</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.apply_filter">
<code class="descname">apply_filter</code><span class="sig-paren">(</span><em>filter_str</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.apply_filter" title="Permalink to this definition"></a></dt>
<dd><p>Applies a filter <code class="docutils literal notranslate"><span class="pre">filter_str</span></code> to <a class="reference internal" href="#core.results.Results.groups" title="core.results.Results.groups"><code class="xref py py-attr docutils literal notranslate"><span class="pre">groups</span></code></a></p>
<p>When you apply the filter, only dupes with the filename matching <code class="docutils literal notranslate"><span class="pre">filter_str</span></code> will be in
in the results. To cancel the filter, just call apply_filter with <code class="docutils literal notranslate"><span class="pre">filter_str</span></code> to None,
and the results will go back to normal.</p>
<p>If call apply_filter on a filtered results, the filter will be applied
<em>on the filtered results</em>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filter_str</strong> (<em>str</em>) a string containing a regexp to filter dupes with.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.get_group_of_duplicate">
<code class="descname">get_group_of_duplicate</code><span class="sig-paren">(</span><em>dupe</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.get_group_of_duplicate" title="Permalink to this definition"></a></dt>
<dd><p>Returns <a class="reference internal" href="engine.html#core.engine.Group" title="core.engine.Group"><code class="xref py py-class docutils literal notranslate"><span class="pre">Group</span></code></a> in which <code class="docutils literal notranslate"><span class="pre">dupe</span></code> belongs.</p>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.load_from_xml">
<code class="descname">load_from_xml</code><span class="sig-paren">(</span><em>infile</em>, <em>get_file</em>, <em>j=&lt;hscommon.jobprogress.job.NullJob object&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.load_from_xml" title="Permalink to this definition"></a></dt>
<dd><p>Load results from <code class="docutils literal notranslate"><span class="pre">infile</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>infile</strong> a file or path pointing to an XML file created with <a class="reference internal" href="#core.results.Results.save_to_xml" title="core.results.Results.save_to_xml"><code class="xref py py-meth docutils literal notranslate"><span class="pre">save_to_xml()</span></code></a>.</li>
<li><strong>get_file</strong> a function f(path) returning a <a class="reference internal" href="fs.html#core.fs.File" title="core.fs.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">File</span></code></a> wrapping the path.</li>
<li><strong>j</strong> A <a class="reference internal" href="../index.html#jobs"><span class="std std-ref">job progress instance</span></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.make_ref">
<code class="descname">make_ref</code><span class="sig-paren">(</span><em>dupe</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.make_ref" title="Permalink to this definition"></a></dt>
<dd><p>Make <code class="docutils literal notranslate"><span class="pre">dupe</span></code> take the <a class="reference internal" href="engine.html#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a> position of its group.</p>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.perform_on_marked">
<code class="descname">perform_on_marked</code><span class="sig-paren">(</span><em>func</em>, <em>remove_from_results</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.perform_on_marked" title="Permalink to this definition"></a></dt>
<dd><p>Performs <code class="docutils literal notranslate"><span class="pre">func</span></code> on all marked dupes.</p>
<p>If an <code class="docutils literal notranslate"><span class="pre">EnvironmentError</span></code> is raised during the call, the problematic dupe is added to
self.problems.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>remove_from_results</strong> (<em>bool</em>) If true, dupes which had <code class="docutils literal notranslate"><span class="pre">func</span></code> applied and didnt cause
any problem.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.remove_duplicates">
<code class="descname">remove_duplicates</code><span class="sig-paren">(</span><em>dupes</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.remove_duplicates" title="Permalink to this definition"></a></dt>
<dd><p>Remove <code class="docutils literal notranslate"><span class="pre">dupes</span></code> from their respective <a class="reference internal" href="engine.html#core.engine.Group" title="core.engine.Group"><code class="xref py py-class docutils literal notranslate"><span class="pre">Group</span></code></a>.</p>
<p>Also, remove the group from <a class="reference internal" href="#core.results.Results.groups" title="core.results.Results.groups"><code class="xref py py-attr docutils literal notranslate"><span class="pre">groups</span></code></a> if it ends up empty.</p>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.save_to_xml">
<code class="descname">save_to_xml</code><span class="sig-paren">(</span><em>outfile</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.save_to_xml" title="Permalink to this definition"></a></dt>
<dd><p>Save results to <code class="docutils literal notranslate"><span class="pre">outfile</span></code> in XML.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>outfile</strong> file object or path.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.sort_dupes">
<code class="descname">sort_dupes</code><span class="sig-paren">(</span><em>key</em>, <em>asc=True</em>, <em>delta=False</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.sort_dupes" title="Permalink to this definition"></a></dt>
<dd><p>Sort <a class="reference internal" href="#core.results.Results.dupes" title="core.results.Results.dupes"><code class="xref py py-attr docutils literal notranslate"><span class="pre">dupes</span></code></a> according to <code class="docutils literal notranslate"><span class="pre">key</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>key</strong> (<em>str</em>) key attribute name to sort with.</li>
<li><strong>asc</strong> (<em>bool</em>) If false, sorting is reversed.</li>
<li><strong>delta</strong> (<em>bool</em>) If true, sorting occurs using <a class="reference internal" href="../../results.html#deltavalues"><span class="std std-ref">delta values</span></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="core.results.Results.sort_groups">
<code class="descname">sort_groups</code><span class="sig-paren">(</span><em>key</em>, <em>asc=True</em><span class="sig-paren">)</span><a class="headerlink" href="#core.results.Results.sort_groups" title="Permalink to this definition"></a></dt>
<dd><p>Sort <a class="reference internal" href="#core.results.Results.groups" title="core.results.Results.groups"><code class="xref py py-attr docutils literal notranslate"><span class="pre">groups</span></code></a> according to <code class="docutils literal notranslate"><span class="pre">key</span></code>.</p>
<p>The <a class="reference internal" href="engine.html#core.engine.Group.ref" title="core.engine.Group.ref"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ref</span></code></a> of each group is used to extract values for sorting.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>key</strong> (<em>str</em>) key attribute name to sort with.</li>
<li><strong>asc</strong> (<em>bool</em>) If false, sorting is reversed.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="directories.html">core.directories</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="../../index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="gui/index.html">core.gui</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016, Hardcoded Software.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.1.
</div>
</body>
</html>