Name | deluge-announce JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | Simple utility to re-announce torrents for Deluge on a timed interval (single run or indefinitely via CRON) |
upload_time | 2025-02-17 23:06:21 |
maintainer | jlw_4049 |
docs_url | None |
author | jlw_4049 |
requires_python | >=3.10 |
license | MIT |
keywords |
python
deluge
re-announce
announce
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Deluge Announce
A script that will announce torrents on a timed interval (CRON).
## Prerequisites
- Python 3.10 or higher
- Docker (if using Docker setup)
## Setup
#### Options for Use
- Docker ([link](https://hub.docker.com/repository/docker/jlw4049/deluge-announce/))
- Package ([link](https://pypi.org/project/deluge-announce/))
#### Running the Docker Container
To run the Docker container with the appropriate environment variables, use the following command:
```bash
docker run -e "WEB_URL=<your_web_url>" -e "PASSWORD=<your_web_url_password>" -e "CRON_SCHEDULE=0 * * * *" -e "SKIP_RE_ANNOUNCE=too many requests" -e "FORCE_RE_ANNOUNCE=warning|error" -e "LOG_LEVEL=Info" -v "app_data:/app_data"
```
`SKIP_RE_ANNOUNCE` and `SKIP_RE_ANNOUNCE` expects **pipe operator |** separated strings. i.e. `SKIP_RE_ANNOUNCE=reason1|reason2`
`LOG_LEVEL` defaults to **Info**. It can be any of **Debug**, **Info**, **Warning**, **Error**, or **Critical**. _(Case insensitive)_
This command will mount the `app_data` volume to persist logs across container restarts.
#### Running the Script as a Package
1. Install the package
```bash
poetry add deluge-announce
# or
pip install deluge-announce
```
2. Use in your Python code
```python
from deluge_announce import Announcer
announcer = Announcer(
web_url="https://yourweburl.com/",
password="YOUR PASSWORD",
cron_schedule="0 * * * *", # runs every hour
skip_re_announce=["too many requests"], # defaults
force_re_announce=["warning", "error"] # defaults
log_level="Info", # defaults to INFO from enum LogLevel. Strings are also accepted "Debug", "Info", "Warning", "Error", or "Critical". (Case insensitive)
)
# Run the notifier once
announcer.run()
# Or run continuously as scheduled by cron
announcer.run_forever()
```
#### Checking Logs
Outside of Docker, you can view the logs in `./app_data/logs/`.
### Notes
- The `app_data` volume is used for persistent storage.
- If you're running the script outside Docker, the `app_data` folder will be created in your local directory to store logs and the database.
- The **cron_schedule** format follows standard cron syntax for scheduling tasks. For example, `0 * * * *` runs the script every hour.
### Troubleshooting
- **Error Logs**: If something goes wrong, check the logs at `./app_data/logs/` for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "deluge-announce",
"maintainer": "jlw_4049",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "jessielw4049@gmail.com",
"keywords": "python, deluge, re-announce, announce",
"author": "jlw_4049",
"author_email": "jessielw4049@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fe/4c/19fe0d86e9790cd3e6dd655fdcbc0fb063b16e0795fda0050d794062037c/deluge_announce-0.1.2.tar.gz",
"platform": null,
"description": "# Deluge Announce\n\nA script that will announce torrents on a timed interval (CRON).\n\n## Prerequisites\n\n- Python 3.10 or higher\n- Docker (if using Docker setup)\n\n## Setup\n\n#### Options for Use\n\n- Docker ([link](https://hub.docker.com/repository/docker/jlw4049/deluge-announce/))\n- Package ([link](https://pypi.org/project/deluge-announce/))\n\n#### Running the Docker Container\n\nTo run the Docker container with the appropriate environment variables, use the following command:\n\n```bash\ndocker run -e \"WEB_URL=<your_web_url>\" -e \"PASSWORD=<your_web_url_password>\" -e \"CRON_SCHEDULE=0 * * * *\" -e \"SKIP_RE_ANNOUNCE=too many requests\" -e \"FORCE_RE_ANNOUNCE=warning|error\" -e \"LOG_LEVEL=Info\" -v \"app_data:/app_data\"\n```\n\n`SKIP_RE_ANNOUNCE` and `SKIP_RE_ANNOUNCE` expects **pipe operator |** separated strings. i.e. `SKIP_RE_ANNOUNCE=reason1|reason2`\n\n`LOG_LEVEL` defaults to **Info**. It can be any of **Debug**, **Info**, **Warning**, **Error**, or **Critical**. _(Case insensitive)_\n\nThis command will mount the `app_data` volume to persist logs across container restarts.\n\n#### Running the Script as a Package\n\n1. Install the package\n\n```bash\npoetry add deluge-announce\n# or\npip install deluge-announce\n```\n\n2. Use in your Python code\n\n```python\nfrom deluge_announce import Announcer\nannouncer = Announcer(\n web_url=\"https://yourweburl.com/\",\n password=\"YOUR PASSWORD\",\n cron_schedule=\"0 * * * *\", # runs every hour\n skip_re_announce=[\"too many requests\"], # defaults\n force_re_announce=[\"warning\", \"error\"] # defaults\n log_level=\"Info\", # defaults to INFO from enum LogLevel. Strings are also accepted \"Debug\", \"Info\", \"Warning\", \"Error\", or \"Critical\". (Case insensitive)\n)\n\n# Run the notifier once\nannouncer.run()\n\n# Or run continuously as scheduled by cron\nannouncer.run_forever()\n```\n\n#### Checking Logs\n\nOutside of Docker, you can view the logs in `./app_data/logs/`.\n\n### Notes\n\n- The `app_data` volume is used for persistent storage.\n- If you're running the script outside Docker, the `app_data` folder will be created in your local directory to store logs and the database.\n- The **cron_schedule** format follows standard cron syntax for scheduling tasks. For example, `0 * * * *` runs the script every hour.\n\n### Troubleshooting\n\n- **Error Logs**: If something goes wrong, check the logs at `./app_data/logs/` for more details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simple utility to re-announce torrents for Deluge on a timed interval (single run or indefinitely via CRON)",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"python",
" deluge",
" re-announce",
" announce"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c38f77514227d9b6f00a91958dd9188eeec9a436828d3ec34e82308c00092ba0",
"md5": "7f5e44fb0411c6ddab5e1d218eaaed10",
"sha256": "d2d87a57719c1c11d1bcaef9b65efd3aae00225bf9469f5ec4a19de798dca042"
},
"downloads": -1,
"filename": "deluge_announce-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f5e44fb0411c6ddab5e1d218eaaed10",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 7312,
"upload_time": "2025-02-17T23:06:20",
"upload_time_iso_8601": "2025-02-17T23:06:20.153237Z",
"url": "https://files.pythonhosted.org/packages/c3/8f/77514227d9b6f00a91958dd9188eeec9a436828d3ec34e82308c00092ba0/deluge_announce-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fe4c19fe0d86e9790cd3e6dd655fdcbc0fb063b16e0795fda0050d794062037c",
"md5": "0e92c55ccb28d8c704f33ec24f240949",
"sha256": "721bf4e448a8fc20d93a36ff6dd928fe224686df778e5b9f63167999d5ee51e7"
},
"downloads": -1,
"filename": "deluge_announce-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "0e92c55ccb28d8c704f33ec24f240949",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6166,
"upload_time": "2025-02-17T23:06:21",
"upload_time_iso_8601": "2025-02-17T23:06:21.228157Z",
"url": "https://files.pythonhosted.org/packages/fe/4c/19fe0d86e9790cd3e6dd655fdcbc0fb063b16e0795fda0050d794062037c/deluge_announce-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-17 23:06:21",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "deluge-announce"
}