Metadata-Version: 2.4
Name: qBittorrent-Tools
Version: 1.1.1
Summary: A collection of scripts for managing torrents in qBittorrent
Author-email: Caleb Morrison <cmorrison8191@gmail.com>
Maintainer-email: Caleb Morrison <cmorrison8191@gmail.com>
License: Copyright 2025 Caleb Morrison
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
        of the Software, and to permit persons to whom the Software is furnished to do
        so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Source, https://github.com/cmorrison31/qBittorrent-Tools
Keywords: qBittorrent,Torrent,P2P
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: qbittorrent-api
Dynamic: license-file

# qBittorrent-Tools
This project is a collection of scripts for managing torrents in a 
qBittorrent instance.

## Available Scripts
 - orphaned_torrents
 - unregistered_torrents

## Note
qBittorrent-Tools is not affiliated with the official 
[qBittorrent project.](https://www.qbittorrent.org//)

# License
This project is licensed under the MIT license. See LICENSE.txt for more 
information.

# Configuration
Create a `config.ini` file like so:

```ini
[credentials]
username = username
password = password
server url = example.com:port

[paths]
qbittorrent base directory = base torrent file path
paths to ignore = comma separated list of paths to ignore

[path maps]
path to map = value to map to

[trackers]
old url prefix = http:example.com
new url prefix = https:example.com
```

Path mapping is used to address the fact that in a docker container, the 
path seen by the qBittorrent client probably isn't the real path. For 
example, if in the container, the files are stored in `/data` but are 
physically on a RAID array, `/mnt/md0` then the following mapping would be 
needed: `/data = /mnt/md0`.

# Example Usage
Call the script function for the operation you wish to execute. The 
`config.ini` file needs to be in the same directory as your script. 

For example, if checking for unregistered torrents, the following script 
calls the appropriate function.

```python
from qBittorrentTools import Scripts


def main():
    Scripts.unregistered_torrents()
    

if __name__ == "__main__":
    main()

```
