Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
berybox committed Sep 15, 2023
1 parent 8846a65 commit 49d0f54
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ __debug_bin

# Project specific files
magnetiq
magnetiq-win
magnetiq-linux
magnetiq-mac

Expand Down
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# MagnetiQ <img src="./cli/magnetiq.png" width="48" />
Simple tool for adding torrents to the qBittorrent using WebUI using magnet:// protocol. It is convenient to use e.g. in cases where qBittorrent is not running on the local computer, but the user has access to the remote WebUI. Using MagnetiQ, torrents can then be easily added with a single click.


## Installation

Magnetiq contains everything you need in a single binary file and comes in Windows, Linux and Mac versions. On Windows, MagnetiQ can be registered to the magnet:// protocol using the `reg-files` command, which creates `.reg` files for registering and unregistering the protocol. On Linux and Mac, external tools must be used to register the magnet:// protocol.
Expand All @@ -10,14 +9,25 @@ Magnetiq contains everything you need in a single binary file and comes in Windo

Before adding torrents to the qBittorrend WebUI using MagnetiQ, it is necessary to configure the connection using a configuration file. Default name is `magnetiq.json` which is located in the same directory as MagnetiQ, however this can be changed using the `-c` parameter. For simplicity, MagnetiQ includes an `init-config` command that creates a ready-to-populate configuration file.

Once the configuration file is set up correctly, torrents can be added using the `add` command and the `-l` parameter, which specifies the magnet URI to add. This command is also used when MagnetiQ is associated with the magnet:// protocol.
Once the configuration file is set up correctly, torrents can be added using the `add` command and the `-l` parameter, which specifies the magnet URI to add. This command is also used when MagnetiQ is associated with the magnet:// protocol. The link can also be directly assigned to a category using the `-a` parameter.

## Command line parameters

- `add-torrent` , `add` - Adds torrent to the qBittorrent queue
- `--link`, `-l`, `-u` Magnet link of the torrent
- `--category`, `-a` Assign category of the torrent
- `--config`, `-c` qBittorrent WebUI configuration file
- `init-config` - Creates empty configuration file to be filled by user
- `--filename`, `-f` Name of output file
- `reg-files` - Creates Windows .reg files ('magnetiq-register.reg' and 'magnetiq-unregister.reg') for simple magnet:// protocol (un)registration
- `--category`, `-c`, `-a` Default category of the newly added torrents

## License

Datel is licensed under the [MIT License](./LICENSE). You are free to use, modify, and distribute this tool in accordance with the terms of the license.
MagnetiQ is licensed under the [MIT License](./LICENSE). You are free to use, modify, and distribute this tool in accordance with the terms of the license.

## Disclaimer

Datel is provided "as is" without any warranties, express or implied. The use of this software is at your own risk. The authors and contributors of this project disclaim any and all warranties, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
MagnetiQ is provided "as is" without any warranties, express or implied. The use of this software is at your own risk. The authors and contributors of this project disclaim any and all warranties, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose.

In no event shall the authors or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
1 change: 1 addition & 0 deletions cli/built-gui.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go build -ldflags -H=windowsgui -o magnetiq-win.exe
42 changes: 42 additions & 0 deletions cli/command_doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// This is just to generate documetnation for command line
// This file can be safely removed from the build

package main

import (
"fmt"

"github.com/urfave/cli/v2"
)

var (
commandDoc = cli.Command{
Name: "doc",
Hidden: true,
Action: func(ctx *cli.Context) error {
for _, c := range commands {
if c.Hidden {
continue
}

// Command
fmt.Printf("- `%s`", c.Name)
for _, a := range c.Aliases {
fmt.Printf(" , `%s`", a)
}
fmt.Printf(" - %s\n", c.Usage)

// Flags
for _, f := range c.Flags {
fmt.Printf("\t- %s\n", f.String())
}

}
return nil
},
}
)

func init() {
commands = append(commands, &commandDoc)
}

0 comments on commit 49d0f54

Please sign in to comment.