{"id":21262772,"url":"https://github.com/boinkor-net/gearbox-maintenance","last_synced_at":"2025-07-08T11:33:49.269Z","repository":{"id":36975043,"uuid":"435190969","full_name":"boinkor-net/gearbox-maintenance","owner":"boinkor-net","description":"Perform ongoing maintenance on a transmission instance","archived":false,"fork":false,"pushed_at":"2024-08-16T11:06:10.000Z","size":520,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-16T12:27:48.223Z","etag":null,"topics":["bittorrent","operations","prometheus","rust","transmission"],"latest_commit_sha":null,"homepage":"https://github.com/boinkor-net/gearbox-maintenance","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boinkor-net.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-05T14:33:58.000Z","updated_at":"2024-08-16T12:27:50.401Z","dependencies_parsed_at":"2023-10-11T16:26:18.570Z","dependency_job_id":"90e17a4b-f198-4306-a58d-05b161d29055","html_url":"https://github.com/boinkor-net/gearbox-maintenance","commit_stats":null,"previous_names":["boinkor-net/gearbox-maintenance"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boinkor-net%2Fgearbox-maintenance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boinkor-net%2Fgearbox-maintenance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boinkor-net%2Fgearbox-maintenance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boinkor-net%2Fgearbox-maintenance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boinkor-net","download_url":"https://codeload.github.com/boinkor-net/gearbox-maintenance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225674901,"owners_count":17506272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bittorrent","operations","prometheus","rust","transmission"],"created_at":"2024-11-21T04:59:21.285Z","updated_at":"2024-11-21T04:59:21.957Z","avatar_url":"https://github.com/boinkor-net.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/antifuchs/gearbox-maintenance/actions/workflows/ci.yml/badge.svg) [![Docs](https://docs.rs/gearbox-maintenance/badge.svg)](https://docs.rs/gearbox-maintenance/) [![crates.io](https://img.shields.io/crates/v/gearbox-maintenance.svg)](https://crates.io/crates/gearbox-maintenance)\n\n# A transmission maintenance tool\n\nSay you are downloading very large numbers from the internet which you\nthen share with others, and say also that those very large numbers\noccupy a lot of space on your hard disk drive.\n\nThe people who tell you where to find the large number want you to\nkeep sharing those numbers equitably, and you yourself want that too!\nLarge numbers however occupy a lot of space, but after a while you can\nstop sharing the numbers, and nobody minds that at all (because\nhopefully the very large number has propagated enough).\n\nSo, this tool helps you keep the disk space usage of seeded torrents\nin check by letting you define an amount of time that torrents get\nseeded for, or until their minimum ratio requirement has been met. If\nso, it'll delete data.\n\nThis is similar to\n[autoremove-torrents](https://autoremove-torrents.readthedocs.io/),\nexcept it works with the version of transmission that I run (and no\nother torrent client).\n\n## Installation\n\n```sh\ncargo --git git://github.com/antifuchs/gearbox-maintenance gearbox-maintenance\n```\n\n## Configuration\n\nThe configuration language is [Rhai](https://rhai.rs/book/), a\nscripting language that works pretty well for configuration files.\n\nHere's an example config file:\n\n```py\n[\n  rules(\n      transmission(\"http://localhost:9091/transmission/rpc\")\n        .user(\"transmission\")\n        .password(\"secret\")\n        .poll_interval(\"20min\"),\n      [\n          delete_policy(\"horse_seasons\",\n                        on_trackers([\"tracker-hostname.horse\"])\n                          .min_file_count(2),\n                        matching()\n                          .max_ratio(2.3)\n                          .min_seeding_time(\"2 days\")\n                          .min_seeding_time(\"14 days\")),\n          delete_policy(\"horse_episodes\",\n                        on_trackers([\"tracker-hostname.horse\"])\n                          .max_file_count(1),\n                        matching()\n                          .max_ratio(2.3)\n                          .min_seeding_time(\"24 hours\")\n                          .max_seeding_time(\"3 days\"))\n      ],\n  )\n]\n```\n\nYou can also use rhai's [module\nsystem](https://rhai.rs/book/language/modules/import.html) to import\nfiles in the same directory.\n\n## Invocation\n\nBy default, this tool takes no action: `gearbox-maintenance\nconfig.rhai` will connect to the transmission instances you specify,\nand log what actions it would take.\n\nTo have it actually delete data, run `gearbox-maintenance -f config.rhai`.\n\nThe default log level is `gearbox-maintenance=info`. You can increase\nlogging intensity by setting the environment variable\n`RUST_LOG=debug`, but beware: some dependencies are very very\nloud. See the [env_logger convention\ndocs](https://rust-lang-nursery.github.io/rust-cookbook/development_tools/debugging/config_log.html)\nfor details on how to tune the log level.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboinkor-net%2Fgearbox-maintenance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboinkor-net%2Fgearbox-maintenance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboinkor-net%2Fgearbox-maintenance/lists"}