nzb-repair
A tool to repair incomplete NZB files by reuploading the missing articles using the par2 repair.
Usage
- Create a config file
config.yaml with 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.nzb
Watch 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/directory
Options:
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 to queue.db)
Development Setup
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 generate
Contributing
Contributions are welcome! Please open an issue or submit a pull request. See the CONTRIBUTING.md file for details.
License
This project is licensed under the MIT License. See the LICENSE file for details.