A tool to repair incomplete NZB files by reuploading the missing articles using the par2 repair.
- Create a config file
config.yamlwith your Usenet provider details:
download_providers:
- host: news.example.com
port: 563
username: your_username
password: your_password
connections: 10
tls: true
upload_providers:
- host: upload.example.com
port: 563
username: your_username
password: your_password
connections: 5
tls: true- Run the tool:
Single File Repair:
nzb-repair -c config.yaml path/to/your.nzbWatch Mode (Monitor a directory):
It will scan a directory in configurable interval for files to repair.
nzb-repair watch -c config.yaml -d /path/to/watch/directoryOptions:
Flags applicable to both modes:
-c, --config: Config file path (required)-o, --output: Output file path or directory for repaired nzb files (optional, defaults vary by mode: next to input file for single repair,repaired/subdirectory for watch mode)--tmp-dir: Temporary directory for processing files (optional, defaults to system temp dir)-v, --verbose: Enable verbose logging (optional)
Flags specific to Watch Mode:
-d, --dir: Directory to watch for nzb files (required for watch mode)-b, --db: Path to the sqlite database file for the queue (optional, defaults toqueue.db)
To set up the project for development, follow these steps:
- Clone the repository:
git clone https://github.com/javi11/nzb-repair.git
cd nntpcli- Install dependencies:
go mod download- Run tests:
make test- Lint the code:
make lint- Generate mocks and other code:
make generateContributions are welcome! Please open an issue or submit a pull request. See the CONTRIBUTING.md file for details.
This project is licensed under the MIT License. See the LICENSE file for details.