Skip to content

Commit 3813ecc

Browse files
authored
Merge pull request #73 from alexpdev/0.6.5
v0.6.5
2 parents e631b19 + 1b51dea commit 3813ecc

25 files changed

+2930
-358
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ tests/test_data/
1111
repos/
1212
tests/TESTDIR
1313
runtests.py
14+
coverage.sh
15+
coverage.xml
1416

1517
# bite-code
1618
*.pyc

.markdownlint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"default": true,
3-
"MD013": {"line_length": 100 },
3+
"MD013": {"line_length": 120 },
44
"MD029": { "style": "ordered" },
55
"MD007": { "indent": 4 },
66
"MD046": false,

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# TorrentFile
22

3+
## Version 0.6.5
4+
5+
### Added 0.6.5
6+
7+
- Support for creating Magnet URI's
8+
- Added optional progress bar for torrent creation
9+
- Log File handler
10+
- CLI args page in documentation
11+
12+
### Fixed 0.6.5
13+
14+
- verbose and logging bugs
15+
- multi tracker errors bug
16+
317
## Version 0.6.4
418

519
### Changed/Fixed/Added 0.6.4

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ docs: ## Regenerate docs from changes
8686
mkdocs -q build
8787
touch docs/.nojekyll
8888

89-
coverage: test ## Get coverage report
90-
coverage html
89+
coverage: ## Get coverage report
90+
coverage run -m pytest
9191
coverage xml
92+
bash coverage.sh report -r coverage.xml
9293

9394
push: clean lint docs test ## Push to github
9495
git add .
Lines changed: 2287 additions & 218 deletions
Large diffs are not rendered by default.

docs/cli/index.html

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
5+
6+
<meta charset="utf-8">
7+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
9+
10+
11+
<link rel="canonical" href="https://alexpdev.github.io/torrentfile/cli/">
12+
<link rel="shortcut icon" href="../img/favicon.ico">
13+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
14+
<title>CLI - TorrentFile</title>
15+
<link href="../css/bootstrap-3.3.7.min.css" rel="stylesheet">
16+
<link href="../css/font-awesome-4.7.0.css" rel="stylesheet">
17+
<link href="../css/base.css" rel="stylesheet">
18+
<link rel="stylesheet" href="../css/highlight.css">
19+
<link href="//use.fontawesome.com/releases/v5.8.1/css/all.css" rel="stylesheet">
20+
<link href="//use.fontawesome.com/releases/v5.8.1/css/v4-shims.css" rel="stylesheet">
21+
<link href="../css/mkapi-common.css" rel="stylesheet">
22+
<link href="../assets/_mkdocstrings.css" rel="stylesheet">
23+
<link href="../stylesheets/extra.css" rel="stylesheet">
24+
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
25+
<!--[if lt IE 9]>
26+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
27+
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
28+
<![endif]-->
29+
30+
<script src="../js/jquery-3.2.1.min.js"></script>
31+
<script src="../js/bootstrap-3.3.7.min.js"></script>
32+
<script src="../js/highlight.pack.js"></script>
33+
34+
<base target="_top">
35+
<script>
36+
var base_url = '..';
37+
var is_top_frame = false;
38+
39+
var pageToc = [
40+
{title: "TorrentFile CLI Menu", url: "#_top", children: [
41+
{title: "torrentfile -h", url: "#torrentfile-h" },
42+
{title: "torrentfile e -h", url: "#torrentfile-e-h" },
43+
]},
44+
];
45+
46+
</script>
47+
<script src="../js/base.js"></script>
48+
<script src="../js/mkapi.js"></script>
49+
</head>
50+
51+
<body>
52+
<script>
53+
if (is_top_frame) { $('body').addClass('wm-top-page'); }
54+
</script>
55+
56+
57+
58+
<div class="container-fluid wm-page-content">
59+
<a name="_top"></a>
60+
61+
62+
63+
64+
65+
66+
67+
<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">
68+
69+
<div class="wm-article-nav pull-right">
70+
<a href="../examples/" class="btn btn-xs btn-default pull-right">
71+
Next
72+
<i class="fa fa-chevron-right" aria-hidden="true"></i>
73+
</a>
74+
<a href="../examples/" class="btn btn-xs btn-link">
75+
Examples
76+
</a>
77+
</div>
78+
79+
<div class="wm-article-nav">
80+
<a href="../api/" class="btn btn-xs btn-default pull-left">
81+
<i class="fa fa-chevron-left" aria-hidden="true"></i>
82+
Previous</a><a href="../api/" class="btn btn-xs btn-link">
83+
API
84+
</a>
85+
</div>
86+
87+
</div>
88+
89+
90+
91+
<h1 id="torrentfile-cli-menu">TorrentFile CLI Menu</h1>
92+
<h2 id="torrentfile-h"><code>torrentfile -h</code></h2>
93+
<p>```bash:
94+
usage: TorrentFile [-h][-i] [-V][-v]
95+
{c,create,new,e,edit,m,magnet,r,recheck,check} ...</p>
96+
<p>CLI Tool for creating, checking and editing Bittorrent meta files. Supports all meta file versions including hybrid files.</p>
97+
<p>optional arguments:
98+
-h, --help show this help message and exit
99+
-i, --interactive select program options interactively
100+
-V, --version show program version and exit
101+
-v, --verbose output debug information</p>
102+
<p>Actions:
103+
Each sub-command triggers a specific action.</p>
104+
<p>{c,create,new,e,edit,m,magnet,r,recheck,check}
105+
c (create, new) Create a torrent meta file.</p>
106+
<pre><code>e (edit) Edit existing torrent meta file.
107+
108+
m (magnet) Create magnet url from an existing Bittorrent meta file.
109+
110+
r (recheck, check) Calculate amount of torrent meta file's content is found on disk.
111+
</code></pre>
112+
<pre><code>
113+
## `torrentfile c -h`
114+
115+
```bash:
116+
usage: TorrentFile c [-h] [-a &lt;url&gt; [&lt;url&gt; ...]] [-p] [-s &lt;source&gt;] [-m]
117+
[-c &lt;comment&gt;] [-o &lt;path&gt;] [-t &lt;url&gt; [&lt;url&gt; ...]]
118+
[--progress] [--meta-version &lt;int&gt;]
119+
[--piece-length &lt;int&gt;] [-w &lt;url&gt; [&lt;url&gt; ...]]
120+
&lt;content&gt;
121+
122+
positional arguments:
123+
&lt;content&gt; path to content file or directory
124+
125+
optional arguments:
126+
-h, --help show this help message and exit
127+
-a &lt;url&gt; [&lt;url&gt; ...], --announce &lt;url&gt; [&lt;url&gt; ...] Alias for -t/--tracker
128+
-p, --private Create a private torrent meta file
129+
-s &lt;source&gt;, --source &lt;source&gt; specify source tracker
130+
-m, --magnet output Magnet Link after creation completes
131+
-c &lt;comment&gt;, --comment &lt;comment&gt; include a comment in file metadata
132+
-o &lt;path&gt;, --out &lt;path&gt; Output path for created .torrent file
133+
-t &lt;url&gt; [&lt;url&gt; ...], --tracker &lt;url&gt; [&lt;url&gt; ...] One or more Bittorrent tracker announce url(s).
134+
--progress Enable showing the progress bar during torrent creation.
135+
(Minimially impacts the duration of torrent file creation.)
136+
137+
--meta-version &lt;int&gt; Bittorrent metafile version.
138+
Options = 1, 2 or 3.
139+
(1) = Bittorrent v1 (Default)
140+
(2) = Bittorrent v2
141+
(3) = Bittorrent v1 &amp; v2 hybrid
142+
143+
--piece-length &lt;int&gt; Fixed amount of bytes for each chunk of data. (Default: None)
144+
Acceptable input values include integers 14-24, which
145+
will be interpreted as the exponent for 2^n, or any perfect
146+
power of two integer between 16Kib and 16MiB (inclusive).
147+
Examples:: [--piece-length 14] [-l 20] [-l 16777216]
148+
149+
-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
150+
the torrent contents. This is useful if the torrent
151+
tracker is ever unreachable. Example:: [-w url1 [url2 [url3]]]
152+
</code></pre>
153+
<h2 id="torrentfile-e-h"><code>torrentfile e -h</code></h2>
154+
<p>```bash:
155+
usage: TorrentFile e [-h] [--tracker <url> [<url> ...]]
156+
[--web-seed <url> [<url> ...]][--private]
157+
[--comment <comment>] [--source <source>]
158+
&lt;*.torrent&gt;</p>
159+
<p>positional arguments:
160+
&lt;<em>.torrent&gt; path to </em>.torrent file</p>
161+
<p>optional arguments:
162+
-h, --help show this help message and exit
163+
--tracker <url> [<url> ...] replace current list of tracker/announce urls with one or more space
164+
seperated Bittorrent tracker announce url(s).</p>
165+
<p>--web-seed <url> [<url> ...] replace current list of web-seed urls with one or more space seperated url(s)</p>
166+
<p>--private If currently private, will make it public, if public then private.
167+
--comment <comment> replaces any existing comment with <comment>
168+
--source <source> replaces current source with <source></p>
169+
<pre><code>
170+
## `torrentfile m -h`
171+
172+
```bash:
173+
usage: TorrentFile m [-h] &lt;*.torrent&gt;
174+
175+
positional arguments:
176+
&lt;*.torrent&gt; path to Bittorrent meta file.
177+
178+
optional arguments:
179+
-h, --help show this help message and exit
180+
usage: TorrentFile r [-h] &lt;*.torrent&gt; content
181+
</code></pre>
182+
183+
<br>
184+
185+
186+
187+
188+
189+
190+
191+
<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">
192+
193+
<div class="wm-article-nav pull-right">
194+
<a href="../examples/" class="btn btn-xs btn-default pull-right">
195+
Next
196+
<i class="fa fa-chevron-right" aria-hidden="true"></i>
197+
</a>
198+
<a href="../examples/" class="btn btn-xs btn-link">
199+
Examples
200+
</a>
201+
</div>
202+
203+
<div class="wm-article-nav">
204+
<a href="../api/" class="btn btn-xs btn-default pull-left">
205+
<i class="fa fa-chevron-left" aria-hidden="true"></i>
206+
Previous</a><a href="../api/" class="btn btn-xs btn-link">
207+
API
208+
</a>
209+
</div>
210+
211+
</div>
212+
213+
<br>
214+
</div>
215+
216+
<footer class="container-fluid wm-page-content">
217+
<p>
218+
<a href="https://github.com/alexpdev/torrentfile/edit/master/docs/cli.md"><i class="fa fa-github"></i>
219+
Edit on GitHub</a>
220+
</p><p>alexpdev 2021</p>
221+
<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>
222+
</footer>
223+
224+
</body>
225+
</html>

docs/examples/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@
7676
</div>
7777

7878
<div class="wm-article-nav">
79-
<a href="../_api/" class="btn btn-xs btn-default pull-left">
79+
<a href="../cli/" class="btn btn-xs btn-default pull-left">
8080
<i class="fa fa-chevron-left" aria-hidden="true"></i>
81-
Previous</a><a href="../_api/" class="btn btn-xs btn-link">
82-
API
81+
Previous</a><a href="../cli/" class="btn btn-xs btn-link">
82+
CLI
8383
</a>
8484
</div>
8585

@@ -173,10 +173,10 @@ <h3 id="create-magnet">Create Magnet</h3>
173173
</div>
174174

175175
<div class="wm-article-nav">
176-
<a href="../_api/" class="btn btn-xs btn-default pull-left">
176+
<a href="../cli/" class="btn btn-xs btn-default pull-left">
177177
<i class="fa fa-chevron-left" aria-hidden="true"></i>
178-
Previous</a><a href="../_api/" class="btn btn-xs btn-link">
179-
API
178+
Previous</a><a href="../cli/" class="btn btn-xs btn-link">
179+
CLI
180180
</a>
181181
</div>
182182

docs/index.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@
116116
<ul class="wm-toctree">
117117
<li class="wm-toc-li wm-toc-lev1 "><a href="" class="wm-article-link wm-toc-text">home</a>
118118
</li>
119-
<li class="wm-toc-li wm-toc-lev1 "><a href="_api/" class="wm-article-link wm-toc-text">API</a>
119+
<li class="wm-toc-li wm-toc-lev1 "><a href="api/" class="wm-article-link wm-toc-text">API</a>
120+
</li>
121+
<li class="wm-toc-li wm-toc-lev1 "><a href="cli/" class="wm-article-link wm-toc-text">CLI</a>
120122
</li>
121123
<li class="wm-toc-li wm-toc-lev1 "><a href="examples/" class="wm-article-link wm-toc-text">Examples</a>
122124
</li>
@@ -142,11 +144,11 @@
142144
<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">
143145

144146
<div class="wm-article-nav pull-right">
145-
<a href="_api/" class="btn btn-xs btn-default pull-right">
147+
<a href="api/" class="btn btn-xs btn-default pull-right">
146148
Next
147149
<i class="fa fa-chevron-right" aria-hidden="true"></i>
148150
</a>
149-
<a href="_api/" class="btn btn-xs btn-link">
151+
<a href="api/" class="btn btn-xs btn-link">
150152
API
151153
</a>
152154
</div>
@@ -158,8 +160,8 @@
158160
<h1 id="torrentfile">TorrentFile</h1>
159161
<p><img alt="torrentfile" src="https://github.com/alexpdev/torrentfile/blob/master/assets/torrentfile.png?raw=true" /></p>
160162
<hr />
161-
<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>
162-
<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>
163+
<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>
164+
<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>
163165
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/alexpdev/torrentfile" />
164166
<img alt="GitHub License" src="https://img.shields.io/github/license/alexpdev/torrentfile" />
165167
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dw/torrentfile" />
@@ -230,11 +232,11 @@ <h2 id="bug-issues">:bug: Issues</h2>
230232
<div class="row wm-article-nav-buttons" role="navigation" aria-label="navigation">
231233

232234
<div class="wm-article-nav pull-right">
233-
<a href="_api/" class="btn btn-xs btn-default pull-right">
235+
<a href="api/" class="btn btn-xs btn-default pull-right">
234236
Next
235237
<i class="fa fa-chevron-right" aria-hidden="true"></i>
236238
</a>
237-
<a href="_api/" class="btn btn-xs btn-link">
239+
<a href="api/" class="btn btn-xs btn-link">
238240
API
239241
</a>
240242
</div>
@@ -256,5 +258,5 @@ <h2 id="bug-issues">:bug: Issues</h2>
256258
</html>
257259
<!--
258260
MkDocs version : 1.2.3
259-
Build Date UTC : 2022-01-11 05:42:59.508694+00:00
261+
Build Date UTC : 2022-01-12 08:54:51.828258+00:00
260262
-->

docs/objects.inv

6 Bytes
Binary file not shown.

docs/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)