Skip to content

Commit 08506dd

Browse files
authored
Merge pull request #71 from alexpdev/docs
Updated documentation
2 parents 70459e0 + 1028f93 commit 08506dd

File tree

10 files changed

+52
-11
lines changed

10 files changed

+52
-11
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ lint:
8181

8282
docs: ## Regenerate docs from changes
8383
rm -rf docs/*
84+
rm -rf site/index.md
85+
cp -rfv README.md site/index.md
8486
mkdocs -q build
8587
touch docs/.nojekyll
8688

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
![GitHub repo size](https://img.shields.io/github/repo-size/alexpdev/torrentfile)
1010
![GitHub License](https://img.shields.io/github/license/alexpdev/torrentfile)
1111
![PyPI - Downloads](https://img.shields.io/pypi/dw/torrentfile)
12-
[![CI](https://github.com/alexpdev/TorrentFile/actions/workflows/python_workflow.yml/badge.svg?branch=master&event=push)](https://github.com/alexpdev/torrentfile/actions/workflows/python_workflow.yml)
12+
[![CI](https://github.com/alexpdev/TorrentFile/actions/workflows/pyworkflow.yml/badge.svg?branch=master&event=push)](https://github.com/alexpdev/torrentfile/actions/workflows/pyworkflow.yml)
1313
[![DeepSource](https://deepsource.io/gh/alexpdev/TorrentFile.svg/?label=active+issues&token=16Sl_dF7nTU8YgPilcqhvHm8)](https://deepsource.io/gh/alexpdev/torrentfile/)
1414

1515
## :globe_with_meridians: Overview
@@ -53,6 +53,7 @@ Sub-Commands:
5353
create Create a new torrent file.
5454
check Check if file/folder contents match a torrent file.
5555
edit Edit a pre-existing torrent file.
56+
magnet Create Magnet URI for an existing torrent meta file.
5657

5758
optional arguments:
5859
-h, --help show this help message and exit
@@ -63,6 +64,10 @@ optional arguments:
6364
6465
> Usage examples can be found in the project documentation on the [examples page.](https://alexpdev.github.io/torrentfile/examples)
6566
67+
!!!
68+
_torrentfile_ is under active development, and is subject to significant changes in
69+
it's codebase between releases.
70+
6671
## :memo: License
6772
6873
Distributed under the GNU LGPL v3. See `LICENSE` for more information.

docs/_api/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ <h3 id="torrentfile.cli.main_script" class="doc doc-heading">
450450
<span class="s2">&quot;create&quot;</span><span class="p">,</span>
451451
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Create a torrent file.&quot;</span><span class="p">,</span>
452452
<span class="n">prefix_chars</span><span class="o">=</span><span class="s2">&quot;-&quot;</span><span class="p">,</span>
453-
<span class="n">aliases</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;new&quot;</span><span class="p">,</span> <span class="s2">&quot;make&quot;</span><span class="p">],</span>
453+
<span class="n">aliases</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;new&quot;</span><span class="p">],</span>
454454
<span class="n">formatter_class</span><span class="o">=</span><span class="n">HelpFormat</span><span class="p">,</span>
455455
<span class="p">)</span>
456456

docs/examples/index.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ <h3 id="creating-torrents">Creating Torrents</h3>
125125
<li>to create files using bittorrent v2 or other formats use <code>--meta-version</code></li>
126126
<li><code>--meta-version 3</code> asks for a v1 &amp; v2 hybrid file.</li>
127127
</ul>
128-
<pre><code class="language-bash">&gt; torrentfile create /path/to/content --meta-version 2 -t https://tracker1.com
129-
&gt; torrentfile create /path/to/content --meta-version 3
128+
<pre><code class="language-bash">&gt; torrentfile create /path/to/content --meta-version 2
129+
&gt; torrentfile create --meta-version 3 /path/to/content
130+
</code></pre>
131+
<ul>
132+
<li>to create a magnet URI for the created torrent file use <code>--magnet</code></li>
133+
</ul>
134+
<pre><code class="language-bash">&gt; torrentfile create --t https://tracker1/annc https://tracker2/annc --magnet /path/to/content
130135
</code></pre>
131136
<h3 id="recheck-torrents">Recheck Torrents</h3>
132137
<p>Using the sub-command <code>recheck</code> or <code>check</code> or <code>r</code> you can check how much of
@@ -141,6 +146,11 @@ <h3 id="edit-torrents">Edit Torrents</h3>
141146
<p>Using the sub-command <code>edit</code> or <code>e</code> enables editting a pre-existing torrent file.
142147
The edit sub-command works identically to the <code>create</code> sub-command and accepts many
143148
of the same arguments.</p>
149+
<h3 id="create-magnet">Create Magnet</h3>
150+
<p>To create a magnet URI for a pre-existing torrent meta file, use the sub-command<br />
151+
<code>magnet</code> with the path to the meta file.</p>
152+
<pre><code class="language-bash">&gt; torrentfile magnet /path/to/metafile
153+
</code></pre>
144154

145155
<br>
146156

docs/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ <h1 id="torrentfile">TorrentFile</h1>
163163
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/alexpdev/torrentfile" />
164164
<img alt="GitHub License" src="https://img.shields.io/github/license/alexpdev/torrentfile" />
165165
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dw/torrentfile" />
166-
<a href="https://github.com/alexpdev/torrentfile/actions/workflows/python_workflow.yml"><img alt="CI" src="https://github.com/alexpdev/TorrentFile/actions/workflows/python_workflow.yml/badge.svg?branch=master&amp;event=push" /></a>
166+
<a href="https://github.com/alexpdev/torrentfile/actions/workflows/pyworkflow.yml"><img alt="CI" src="https://github.com/alexpdev/TorrentFile/actions/workflows/pyworkflow.yml/badge.svg?branch=master&amp;event=push" /></a>
167167
<a href="https://deepsource.io/gh/alexpdev/torrentfile/"><img alt="DeepSource" src="https://deepsource.io/gh/alexpdev/TorrentFile.svg/?label=active+issues&amp;token=16Sl_dF7nTU8YgPilcqhvHm8" /></a></p>
168168
<h2 id="globe_with_meridians-overview">:globe_with_meridians: Overview</h2>
169169
<p>A <code>simple</code> and <code>convenient</code> tool for creating, reviewing, editing, and/or<br />
@@ -199,6 +199,7 @@ <h2 id="rocket-usage">:rocket: Usage</h2>
199199
create Create a new torrent file.
200200
check Check if file/folder contents match a torrent file.
201201
edit Edit a pre-existing torrent file.
202+
magnet Create Magnet URI for an existing torrent meta file.
202203

203204
optional arguments:
204205
-h, --help show this help message and exit
@@ -209,6 +210,9 @@ <h2 id="rocket-usage">:rocket: Usage</h2>
209210
<blockquote>
210211
<p>Usage examples can be found in the project documentation on the <a href="https://alexpdev.github.io/torrentfile/examples">examples page.</a></p>
211212
</blockquote>
213+
<p>!!!
214+
<em>torrentfile</em> is under active development, and is subject to significant changes in<br />
215+
it's codebase between releases.</p>
212216
<h2 id="memo-license">:memo: License</h2>
213217
<p>Distributed under the GNU LGPL v3. See <code>LICENSE</code> for more information.</p>
214218
<h2 id="bug-issues">:bug: Issues</h2>
@@ -252,5 +256,5 @@ <h2 id="bug-issues">:bug: Issues</h2>
252256
</html>
253257
<!--
254258
MkDocs version : 1.2.3
255-
Build Date UTC : 2022-01-11 04:14:38.530837+00:00
259+
Build Date UTC : 2022-01-11 05:42:59.508694+00:00
256260
-->

docs/search/search_index.json

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

docs/sitemap.xml.gz

0 Bytes
Binary file not shown.

site/examples.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@ illustrate some of the options available for creating torrent files.
4646
- `--meta-version 3` asks for a v1 & v2 hybrid file.
4747

4848
```bash
49-
> torrentfile create /path/to/content --meta-version 2 -t https://tracker1.com
50-
> torrentfile create /path/to/content --meta-version 3
49+
> torrentfile create /path/to/content --meta-version 2
50+
> torrentfile create --meta-version 3 /path/to/content
51+
```
52+
53+
- to create a magnet URI for the created torrent file use `--magnet`
54+
55+
```bash
56+
> torrentfile create --t https://tracker1/annc https://tracker2/annc --magnet /path/to/content
5157
```
5258

5359
### Recheck Torrents
@@ -67,3 +73,12 @@ torrent file.
6773
Using the sub-command `edit` or `e` enables editting a pre-existing torrent file.
6874
The edit sub-command works identically to the `create` sub-command and accepts many
6975
of the same arguments.
76+
77+
### Create Magnet
78+
79+
To create a magnet URI for a pre-existing torrent meta file, use the sub-command
80+
`magnet` with the path to the meta file.
81+
82+
```bash
83+
> torrentfile magnet /path/to/metafile
84+
```

site/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
![GitHub repo size](https://img.shields.io/github/repo-size/alexpdev/torrentfile)
1010
![GitHub License](https://img.shields.io/github/license/alexpdev/torrentfile)
1111
![PyPI - Downloads](https://img.shields.io/pypi/dw/torrentfile)
12-
[![CI](https://github.com/alexpdev/TorrentFile/actions/workflows/python_workflow.yml/badge.svg?branch=master&event=push)](https://github.com/alexpdev/torrentfile/actions/workflows/python_workflow.yml)
12+
[![CI](https://github.com/alexpdev/TorrentFile/actions/workflows/pyworkflow.yml/badge.svg?branch=master&event=push)](https://github.com/alexpdev/torrentfile/actions/workflows/pyworkflow.yml)
1313
[![DeepSource](https://deepsource.io/gh/alexpdev/TorrentFile.svg/?label=active+issues&token=16Sl_dF7nTU8YgPilcqhvHm8)](https://deepsource.io/gh/alexpdev/torrentfile/)
1414

1515
## :globe_with_meridians: Overview
@@ -53,6 +53,7 @@ Sub-Commands:
5353
create Create a new torrent file.
5454
check Check if file/folder contents match a torrent file.
5555
edit Edit a pre-existing torrent file.
56+
magnet Create Magnet URI for an existing torrent meta file.
5657

5758
optional arguments:
5859
-h, --help show this help message and exit
@@ -63,6 +64,10 @@ optional arguments:
6364
6465
> Usage examples can be found in the project documentation on the [examples page.](https://alexpdev.github.io/torrentfile/examples)
6566
67+
!!!
68+
_torrentfile_ is under active development, and is subject to significant changes in
69+
it's codebase between releases.
70+
6671
## :memo: License
6772
6873
Distributed under the GNU LGPL v3. See `LICENSE` for more information.

torrentfile/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def main_script(args=None):
115115
"create",
116116
help="Create a torrent file.",
117117
prefix_chars="-",
118-
aliases=["c", "new", "make"],
118+
aliases=["c", "new"],
119119
formatter_class=HelpFormat,
120120
)
121121

0 commit comments

Comments
 (0)