Skip to content

Commit

Permalink
Merge pull request #73 from alexpdev/0.6.5
Browse files Browse the repository at this point in the history
v0.6.5
  • Loading branch information
alexpdev authored Jan 12, 2022
2 parents e631b19 + 1b51dea commit 3813ecc
Show file tree
Hide file tree
Showing 25 changed files with 2,930 additions and 358 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tests/test_data/
repos/
tests/TESTDIR
runtests.py
coverage.sh
coverage.xml

# bite-code
*.pyc
Expand Down
2 changes: 1 addition & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"default": true,
"MD013": {"line_length": 100 },
"MD013": {"line_length": 120 },
"MD029": { "style": "ordered" },
"MD007": { "indent": 4 },
"MD046": false,
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# TorrentFile

## Version 0.6.5

### Added 0.6.5

- Support for creating Magnet URI's
- Added optional progress bar for torrent creation
- Log File handler
- CLI args page in documentation

### Fixed 0.6.5

- verbose and logging bugs
- multi tracker errors bug

## Version 0.6.4

### Changed/Fixed/Added 0.6.4
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ docs: ## Regenerate docs from changes
mkdocs -q build
touch docs/.nojekyll

coverage: test ## Get coverage report
coverage html
coverage: ## Get coverage report
coverage run -m pytest
coverage xml
bash coverage.sh report -r coverage.xml

push: clean lint docs test ## Push to github
git add .
Expand Down
2,505 changes: 2,287 additions & 218 deletions docs/_api/index.html → docs/api/index.html

Large diffs are not rendered by default.

225 changes: 225 additions & 0 deletions docs/cli/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
<!DOCTYPE html>
<html lang="en">
<head>


<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">


<link rel="canonical" href="https://alexpdev.github.io/torrentfile/cli/">
<link rel="shortcut icon" href="../img/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>CLI - TorrentFile</title>
<link href="../css/bootstrap-3.3.7.min.css" rel="stylesheet">
<link href="../css/font-awesome-4.7.0.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="../css/highlight.css">
<link href="//use.fontawesome.com/releases/v5.8.1/css/all.css" rel="stylesheet">
<link href="//use.fontawesome.com/releases/v5.8.1/css/v4-shims.css" rel="stylesheet">
<link href="../css/mkapi-common.css" rel="stylesheet">
<link href="../assets/_mkdocstrings.css" rel="stylesheet">
<link href="../stylesheets/extra.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->

<script src="../js/jquery-3.2.1.min.js"></script>
<script src="../js/bootstrap-3.3.7.min.js"></script>
<script src="../js/highlight.pack.js"></script>

<base target="_top">
<script>
var base_url = '..';
var is_top_frame = false;

var pageToc = [
{title: "TorrentFile CLI Menu", url: "#_top", children: [
{title: "torrentfile -h", url: "#torrentfile-h" },
{title: "torrentfile e -h", url: "#torrentfile-e-h" },
]},
];

</script>
<script src="../js/base.js"></script>
<script src="../js/mkapi.js"></script>
</head>

<body>
<script>
if (is_top_frame) { $('body').addClass('wm-top-page'); }
</script>



<div class="container-fluid wm-page-content">
<a name="_top"></a>







<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">

<div class="wm-article-nav pull-right">
<a href="../examples/" class="btn btn-xs btn-default pull-right">
Next
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</a>
<a href="../examples/" class="btn btn-xs btn-link">
Examples
</a>
</div>

<div class="wm-article-nav">
<a href="../api/" class="btn btn-xs btn-default pull-left">
<i class="fa fa-chevron-left" aria-hidden="true"></i>
Previous</a><a href="../api/" class="btn btn-xs btn-link">
API
</a>
</div>

</div>



<h1 id="torrentfile-cli-menu">TorrentFile CLI Menu</h1>
<h2 id="torrentfile-h"><code>torrentfile -h</code></h2>
<p>```bash:
usage: TorrentFile [-h][-i] [-V][-v]
{c,create,new,e,edit,m,magnet,r,recheck,check} ...</p>
<p>CLI Tool for creating, checking and editing Bittorrent meta files. Supports all meta file versions including hybrid files.</p>
<p>optional arguments:
-h, --help show this help message and exit
-i, --interactive select program options interactively
-V, --version show program version and exit
-v, --verbose output debug information</p>
<p>Actions:
Each sub-command triggers a specific action.</p>
<p>{c,create,new,e,edit,m,magnet,r,recheck,check}
c (create, new) Create a torrent meta file.</p>
<pre><code>e (edit) Edit existing torrent meta file.

m (magnet) Create magnet url from an existing Bittorrent meta file.

r (recheck, check) Calculate amount of torrent meta file's content is found on disk.
</code></pre>
<pre><code>
## `torrentfile c -h`

```bash:
usage: TorrentFile c [-h] [-a &lt;url&gt; [&lt;url&gt; ...]] [-p] [-s &lt;source&gt;] [-m]
[-c &lt;comment&gt;] [-o &lt;path&gt;] [-t &lt;url&gt; [&lt;url&gt; ...]]
[--progress] [--meta-version &lt;int&gt;]
[--piece-length &lt;int&gt;] [-w &lt;url&gt; [&lt;url&gt; ...]]
&lt;content&gt;

positional arguments:
&lt;content&gt; path to content file or directory

optional arguments:
-h, --help show this help message and exit
-a &lt;url&gt; [&lt;url&gt; ...], --announce &lt;url&gt; [&lt;url&gt; ...] Alias for -t/--tracker
-p, --private Create a private torrent meta file
-s &lt;source&gt;, --source &lt;source&gt; specify source tracker
-m, --magnet output Magnet Link after creation completes
-c &lt;comment&gt;, --comment &lt;comment&gt; include a comment in file metadata
-o &lt;path&gt;, --out &lt;path&gt; Output path for created .torrent file
-t &lt;url&gt; [&lt;url&gt; ...], --tracker &lt;url&gt; [&lt;url&gt; ...] One or more Bittorrent tracker announce url(s).
--progress Enable showing the progress bar during torrent creation.
(Minimially impacts the duration of torrent file creation.)

--meta-version &lt;int&gt; Bittorrent metafile version.
Options = 1, 2 or 3.
(1) = Bittorrent v1 (Default)
(2) = Bittorrent v2
(3) = Bittorrent v1 &amp; v2 hybrid

--piece-length &lt;int&gt; Fixed amount of bytes for each chunk of data. (Default: None)
Acceptable input values include integers 14-24, which
will be interpreted as the exponent for 2^n, or any perfect
power of two integer between 16Kib and 16MiB (inclusive).
Examples:: [--piece-length 14] [-l 20] [-l 16777216]

-w &lt;url&gt; [&lt;url&gt; ...], --web-seed &lt;url&gt; [&lt;url&gt; ...] One or more url(s) linking to a http server hosting
the torrent contents. This is useful if the torrent
tracker is ever unreachable. Example:: [-w url1 [url2 [url3]]]
</code></pre>
<h2 id="torrentfile-e-h"><code>torrentfile e -h</code></h2>
<p>```bash:
usage: TorrentFile e [-h] [--tracker <url> [<url> ...]]
[--web-seed <url> [<url> ...]][--private]
[--comment <comment>] [--source <source>]
&lt;*.torrent&gt;</p>
<p>positional arguments:
&lt;<em>.torrent&gt; path to </em>.torrent file</p>
<p>optional arguments:
-h, --help show this help message and exit
--tracker <url> [<url> ...] replace current list of tracker/announce urls with one or more space
seperated Bittorrent tracker announce url(s).</p>
<p>--web-seed <url> [<url> ...] replace current list of web-seed urls with one or more space seperated url(s)</p>
<p>--private If currently private, will make it public, if public then private.
--comment <comment> replaces any existing comment with <comment>
--source <source> replaces current source with <source></p>
<pre><code>
## `torrentfile m -h`

```bash:
usage: TorrentFile m [-h] &lt;*.torrent&gt;

positional arguments:
&lt;*.torrent&gt; path to Bittorrent meta file.

optional arguments:
-h, --help show this help message and exit
usage: TorrentFile r [-h] &lt;*.torrent&gt; content
</code></pre>

<br>







<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">

<div class="wm-article-nav pull-right">
<a href="../examples/" class="btn btn-xs btn-default pull-right">
Next
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</a>
<a href="../examples/" class="btn btn-xs btn-link">
Examples
</a>
</div>

<div class="wm-article-nav">
<a href="../api/" class="btn btn-xs btn-default pull-left">
<i class="fa fa-chevron-left" aria-hidden="true"></i>
Previous</a><a href="../api/" class="btn btn-xs btn-link">
API
</a>
</div>

</div>

<br>
</div>

<footer class="container-fluid wm-page-content">
<p>
<a href="https://github.com/alexpdev/torrentfile/edit/master/docs/cli.md"><i class="fa fa-github"></i>
Edit on GitHub</a>
</p><p>alexpdev 2021</p>
<p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a> using <a href="https://github.com/gristlabs/mkdocs-windmill">Windmill</a> theme by Grist Labs.</p>
</footer>

</body>
</html>
12 changes: 6 additions & 6 deletions docs/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@
</div>

<div class="wm-article-nav">
<a href="../_api/" class="btn btn-xs btn-default pull-left">
<a href="../cli/" class="btn btn-xs btn-default pull-left">
<i class="fa fa-chevron-left" aria-hidden="true"></i>
Previous</a><a href="../_api/" class="btn btn-xs btn-link">
API
Previous</a><a href="../cli/" class="btn btn-xs btn-link">
CLI
</a>
</div>

Expand Down Expand Up @@ -173,10 +173,10 @@ <h3 id="create-magnet">Create Magnet</h3>
</div>

<div class="wm-article-nav">
<a href="../_api/" class="btn btn-xs btn-default pull-left">
<a href="../cli/" class="btn btn-xs btn-default pull-left">
<i class="fa fa-chevron-left" aria-hidden="true"></i>
Previous</a><a href="../_api/" class="btn btn-xs btn-link">
API
Previous</a><a href="../cli/" class="btn btn-xs btn-link">
CLI
</a>
</div>

Expand Down
18 changes: 10 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@
<ul class="wm-toctree">
<li class="wm-toc-li wm-toc-lev1 "><a href="" class="wm-article-link wm-toc-text">home</a>
</li>
<li class="wm-toc-li wm-toc-lev1 "><a href="_api/" class="wm-article-link wm-toc-text">API</a>
<li class="wm-toc-li wm-toc-lev1 "><a href="api/" class="wm-article-link wm-toc-text">API</a>
</li>
<li class="wm-toc-li wm-toc-lev1 "><a href="cli/" class="wm-article-link wm-toc-text">CLI</a>
</li>
<li class="wm-toc-li wm-toc-lev1 "><a href="examples/" class="wm-article-link wm-toc-text">Examples</a>
</li>
Expand All @@ -142,11 +144,11 @@
<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">

<div class="wm-article-nav pull-right">
<a href="_api/" class="btn btn-xs btn-default pull-right">
<a href="api/" class="btn btn-xs btn-default pull-right">
Next
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</a>
<a href="_api/" class="btn btn-xs btn-link">
<a href="api/" class="btn btn-xs btn-link">
API
</a>
</div>
Expand All @@ -158,8 +160,8 @@
<h1 id="torrentfile">TorrentFile</h1>
<p><img alt="torrentfile" src="https://github.com/alexpdev/torrentfile/blob/master/assets/torrentfile.png?raw=true" /></p>
<hr />
<p><a href="https://www.codacy.com/gh/alexpdev/TorrentFile/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=alexpdev/torrentfile&amp;utm_campaign=Badge_Grade"><img alt="Codacy Badge" src="https://app.codacy.com/project/badge/Grade/202440df15224535b5358503e6235c88" /></a>
<a href="https://codecov.io/gh/alexpdev/torrentfile"><img alt="codecov" src="https://codecov.io/gh/alexpdev/TorrentFile/branch/master/graph/badge.svg?token=PXFsxXVAHW" /></a>
<p><a href="https://www.codacy.com/gh/alexpdev/torrentfile/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=alexpdev/torrentfile&amp;utm_campaign=Badge_Grade"><img alt="Codacy Badge" src="https://app.codacy.com/project/badge/Grade/2da47ec1b5904538a40230f049a02be4" /></a>
<a href="https://www.codacy.com/gh/alexpdev/torrentfile/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=alexpdev/torrentfile&amp;utm_campaign=Badge_Coverage"><img alt="Codacy Badge" src="https://app.codacy.com/project/badge/Coverage/2da47ec1b5904538a40230f049a02be4" /></a>
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/alexpdev/torrentfile" />
<img alt="GitHub License" src="https://img.shields.io/github/license/alexpdev/torrentfile" />
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dw/torrentfile" />
Expand Down Expand Up @@ -230,11 +232,11 @@ <h2 id="bug-issues">:bug: Issues</h2>
<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">

<div class="wm-article-nav pull-right">
<a href="_api/" class="btn btn-xs btn-default pull-right">
<a href="api/" class="btn btn-xs btn-default pull-right">
Next
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</a>
<a href="_api/" class="btn btn-xs btn-link">
<a href="api/" class="btn btn-xs btn-link">
API
</a>
</div>
Expand All @@ -256,5 +258,5 @@ <h2 id="bug-issues">:bug: Issues</h2>
</html>
<!--
MkDocs version : 1.2.3
Build Date UTC : 2022-01-11 05:42:59.508694+00:00
Build Date UTC : 2022-01-12 08:54:51.828258+00:00
-->
Binary file modified docs/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/search/search_index.json

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://alexpdev.github.io/torrentfile/</loc>
<lastmod>2022-01-11</lastmod>
<lastmod>2022-01-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://alexpdev.github.io/torrentfile/LGPLv3/</loc>
<lastmod>2022-01-11</lastmod>
<lastmod>2022-01-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://alexpdev.github.io/torrentfile/_api/</loc>
<lastmod>2022-01-11</lastmod>
<loc>https://alexpdev.github.io/torrentfile/api/</loc>
<lastmod>2022-01-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://alexpdev.github.io/torrentfile/cli/</loc>
<lastmod>2022-01-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://alexpdev.github.io/torrentfile/examples/</loc>
<lastmod>2022-01-11</lastmod>
<lastmod>2022-01-12</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified docs/sitemap.xml.gz
Binary file not shown.
Loading

0 comments on commit 3813ecc

Please sign in to comment.