rbackup/doc/build/html/rbackup.html

274 lines
13 KiB
HTML
Raw Normal View History

2019-04-14 22:19:34 -07:00
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>rbackup package &#8212; rbackup 0.3.1 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" 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/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="rbackup.package_managers package" href="rbackup.package_managers.html" />
<link rel="prev" title="Welcome to rbackups documentation!" href="index.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="rbackup-package">
<h1>rbackup package<a class="headerlink" href="#rbackup-package" title="Permalink to this headline"></a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="rbackup.package_managers.html">rbackup.package_managers package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="rbackup.package_managers.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="rbackup.package_managers.html#module-rbackup.package_managers.packagemanager">rbackup.package_managers.packagemanager module</a></li>
<li class="toctree-l2"><a class="reference internal" href="rbackup.package_managers.html#module-rbackup.package_managers.pacman">rbackup.package_managers.pacman module</a></li>
<li class="toctree-l2"><a class="reference internal" href="rbackup.package_managers.html#module-rbackup.package_managers">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="rbackup.struct.html">rbackup.struct package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="rbackup.struct.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="rbackup.struct.html#module-rbackup.struct.hierarchy">rbackup.struct.hierarchy module</a></li>
<li class="toctree-l2"><a class="reference internal" href="rbackup.struct.html#module-rbackup.struct.repository">rbackup.struct.repository module</a></li>
<li class="toctree-l2"><a class="reference internal" href="rbackup.struct.html#module-rbackup.struct.snapshot">rbackup.struct.snapshot module</a></li>
<li class="toctree-l2"><a class="reference internal" href="rbackup.struct.html#module-rbackup.struct">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-rbackup.config">
<span id="rbackup-config-module"></span><h2>rbackup.config module<a class="headerlink" href="#module-rbackup.config" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="rbackup.config.get_files_by_suffix">
<code class="descclassname">rbackup.config.</code><code class="descname">get_files_by_suffix</code><span class="sig-paren">(</span><em>suffix</em><span class="sig-paren">)</span><a class="headerlink" href="#rbackup.config.get_files_by_suffix" title="Permalink to this definition"></a></dt>
<dd><p>Retrieve all include files from the program configuration directory.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">get_files_by_suffix</span><span class="p">(</span><span class="s1">&#39;-include.conf&#39;</span><span class="p">)</span> <span class="c1"># doctest: +ELLIPSIS</span>
<span class="go">&lt;generator object ...&gt;</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>suffix</strong> (<em>str</em>) the suffix to search for</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>paths pointing to include files</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>generator of path-like objects</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="rbackup.config.load_list_from_option">
<code class="descclassname">rbackup.config.</code><code class="descname">load_list_from_option</code><span class="sig-paren">(</span><em>parser</em>, <em>*</em>, <em>section=''</em>, <em>option=''</em><span class="sig-paren">)</span><a class="headerlink" href="#rbackup.config.load_list_from_option" title="Permalink to this definition"></a></dt>
<dd><p>Using a combination of <code class="docutils literal notranslate"><span class="pre">ConfigParser</span></code> and JSON, load a
list from a configuration file option.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If the specified option has an empty value, then an empty list is returned.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>parser</strong> (<code class="docutils literal notranslate"><span class="pre">ConfigParser</span></code> object) the parsed config file</p></li>
<li><p><strong>section</strong> (<em>str</em>) the section of the config file to load</p></li>
<li><p><strong>option</strong> (<em>str</em>) the option value inside the specified section</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the list parsed by JSON</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>list</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="rbackup.config.merge_exclude_files">
<code class="descclassname">rbackup.config.</code><code class="descname">merge_exclude_files</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#rbackup.config.merge_exclude_files" title="Permalink to this definition"></a></dt>
<dd><p>Merge exclude file paths into one file and yield its path for use with rsync.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>path-like object</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="rbackup.config.merge_files">
<code class="descclassname">rbackup.config.</code><code class="descname">merge_files</code><span class="sig-paren">(</span><em>files</em><span class="sig-paren">)</span><a class="headerlink" href="#rbackup.config.merge_files" title="Permalink to this definition"></a></dt>
<dd><p>Parse, filter, and sort through config files to create a single
files-from argument.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">merge_files</span><span class="p">(</span><span class="n">get_files_by_suffix</span><span class="p">(</span><span class="s1">&#39;-include.conf&#39;</span><span class="p">))</span> <span class="c1"># doctest: +ELLIPSIS</span>
<span class="go">PosixPath(&#39;/tmp/...&#39;)</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>files</strong> (<em>iterable of path-like objects</em>) files including paths to read from</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>path to file that lists include paths</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>path-like object</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="rbackup.config.merge_include_files">
<code class="descclassname">rbackup.config.</code><code class="descname">merge_include_files</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#rbackup.config.merge_include_files" title="Permalink to this definition"></a></dt>
<dd><p>Merge include file paths into one file and yield its path for use with rsync.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>path-like object</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="rbackup.config.parse_configfile">
<code class="descclassname">rbackup.config.</code><code class="descname">parse_configfile</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#rbackup.config.parse_configfile" title="Permalink to this definition"></a></dt>
<dd><p>Parse the main backup config file and return
a <code class="docutils literal notranslate"><span class="pre">configparser.ConfigParser</span></code> object.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>object used to parse config file</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>ConfigParser object</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>FileNotFoundError</strong> if path does not exist</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-rbackup.rsync">
<span id="rbackup-rsync-module"></span><h2>rbackup.rsync module<a class="headerlink" href="#module-rbackup.rsync" title="Permalink to this headline"></a></h2>
<span class="target" id="module-rbackup.rsync"></span><dl class="function">
<dt id="rbackup.rsync.rsync">
<code class="descclassname">rbackup.rsync.</code><code class="descname">rsync</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#rbackup.rsync.rsync" title="Permalink to this definition"></a></dt>
<dd><p>Run an rsync command.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>args</strong> (<em>str</em>) all arguments to pass to rsync</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>subprocess.CalledProcessError</strong> if rsync process failed</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-rbackup">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-rbackup" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">rbackup</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">rbackup package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li class="toctree-l2"><a class="reference internal" href="#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-rbackup.config">rbackup.config module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-rbackup.rsync">rbackup.rsync module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#module-rbackup">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="rbackup.package_managers.html">rbackup.package_managers package</a></li>
<li class="toctree-l1"><a class="reference internal" href="rbackup.struct.html">rbackup.struct package</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="index.html" title="previous chapter">Welcome to rbackups documentation!</a></li>
<li>Next: <a href="rbackup.package_managers.html" title="next chapter">rbackup.package_managers package</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Eric Torres.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.0.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/rbackup.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>