{"id":51495648,"url":"https://github.com/appotry/pttool","last_synced_at":"2026-07-07T15:01:16.542Z","repository":{"id":38392120,"uuid":"354295199","full_name":"appotry/PTtool","owner":"appotry","description":"自动化硬链接工具，在最大可能情况下节约空间，并保持做种。 小于1M的文件直接复制，刮削修改nfo等小文件不影响做种。 大于1M的文件硬链接到目的目录，可以随意修改文件名。","archived":false,"fork":false,"pushed_at":"2026-06-07T16:11:20.000Z","size":196,"stargazers_count":647,"open_issues_count":1,"forks_count":56,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-06-07T18:04:24.026Z","etag":null,"topics":["emby","hardlink","opencode","pt","tmm"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appotry.png","metadata":{"files":{"readme":"README.de.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2021-04-03T13:10:00.000Z","updated_at":"2026-06-07T16:10:57.000Z","dependencies_parsed_at":"2026-06-07T18:01:14.957Z","dependency_job_id":null,"html_url":"https://github.com/appotry/PTtool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/appotry/PTtool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2FPTtool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2FPTtool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2FPTtool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2FPTtool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appotry","download_url":"https://codeload.github.com/appotry/PTtool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appotry%2FPTtool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35232326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["emby","hardlink","opencode","pt","tmm"],"created_at":"2026-07-07T15:01:14.906Z","updated_at":"2026-07-07T15:01:16.513Z","avatar_url":"https://github.com/appotry.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PTtool\n\n\u003e GitHub: [appotry/PTtool](https://github.com/appotry/PTtool)\n\u003e\n\u003e Reine Shell/Python Hardlink-Tools. Läuft auf Linux, BSD, macOS, Synology, QNAP und jedem OS mit einer standardkonformen POSIX-Shell.\n\u003e\n\u003e **[中文](README.md)** · **[English](README.en.md)** · **[日本語](README.ja.md)** · **[한국어](README.ko.md)** · **[Español](README.es.md)** · **[Français](README.fr.md)** · **[繁體中文](README.zh-TW.md)**\n\n[![opencode](https://img.shields.io/badge/Refaktorisiert%20mit-opencode-6A0DAD)](https://opencode.ai)\n[![CI](https://github.com/appotry/PTtool/actions/workflows/test.yml/badge.svg)](https://github.com/appotry/PTtool/actions/workflows/test.yml)\n\n---\n\nDieses Projekt wurde vollständig mit [opencode](https://opencode.ai) refaktorisiert und implementiert eine **KI-Agent-gesteuerte Entwicklungs-Test-Schleife**: Anforderungen → Architektur → Codierung → Docker-Tests → Wissensdatenbank-Archivierung, alles autonom vom Agenten erledigt. Siehe [`AGENTS.md`](AGENTS.md) und [`docs/`](docs/).\n\n---\n\n## Skriptübersicht\n\n| Skript | Zweck |\n|--------|-------|\n| `mklink.sh` | Einmaliger Hardlink: \u003e1MB verlinken, \u003c1MB kopieren |\n| `dirlink.sh` | Idempotenter Hardlink (pro Unterverzeichnis, `islinked.lk`-Marker) |\n| `link.sh` | Batch-Wrapper für `dirlink.sh` |\n| `autolink.sh` | qBittorrent-Abschluss-Hook |\n| `rename_episodes.py` | SXXEXX-Offset-Anpassung |\n| `autoThanks.sh` | NexusPHP-Massen-Danke (Vorsicht geboten) |\n\n## Sprachauswahl\n\nDie Ausgabesprache der Skripte wird über die Umgebungsvariable `SCRIPT_LANG` gesteuert (Standard: System-`LANG`):\n\n```bash\n# Englische Ausgabe\nSCRIPT_LANG=en_US ./dirlink.sh /src /dst\n\n# Chinesische Ausgabe (Standard)\n./dirlink.sh /src /dst\n```\n\n## Design\n\nPT-Benutzern ermöglichen, Dateien hart zu verlinken, um maximal Speicherplatz zu sparen und gleichzeitig das Seeden zu erhalten.\nDateien \u003c 1MB werden direkt kopiert (ermöglicht Scrapern wie emby/tmm, nfo-Dateien zu ändern).\nDateien \u003e 1MB werden zum Ziel hart verlinkt (umbenennbar, aber schreibgeschützt).\n\n**Hinweis:** SRC und DST müssen sich im selben Dateisystem befinden — Hardlinks können Partitionen nicht überqueren.\n\n## Verwendungsbeispiele\n\n```bash\n# Einmaliger Link\nmklink.sh /share/Download/src /share/Download/dst\n\n# Idempotenter Link (pro Unterverzeichnis)\ndirlink.sh /share/Download/src /share/Download/dst\n\n# qBittorrent-Abschluss-Hook\n/path/to/autolink.sh \"%N\" \"%D\" \"%L\"\n```\n\n## Installation\n\n```bash\ngit clone https://github.com/appotry/PTtool.git\nchmod +x *.sh\n```\n\n## Tests\n\n```bash\ncd tests\nmake test       # Vollständige Testsuite (15 Tests)\nmake test-nas   # NAS-Kompatibilitätstests (8 Tests)\n```\n\n## Haftungsausschluss\n\nDaten sind wertvoll, gehen Sie vorsichtig vor. Diese Skripte (außer autolink.sh) verwenden nur mkdir und cp — kein rm. Im schlimmsten Fall können Sie Ihr Dateisystem überladen. Setzen Sie das Zielverzeichnis nicht auf ein Systemverzeichnis. Nutzung auf eigene Gefahr.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappotry%2Fpttool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappotry%2Fpttool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappotry%2Fpttool/lists"}