NZB Touch is a tool for downloading NZB articles from Usenet servers to verify that the file is OK. It can be used to test download speeds, verify article availability, or validate NZB files without storing the downloaded content since it will be store in RAM.
nzbtouch -n /path/to/file.nzb -c /path/to/config.yaml
Required flags:
-n, --nzb- Path to the NZB file-c, --config- Path to the YAML configuration file
nzbtouch scan -c /path/to/config.yaml
This command will continuously scan configured directories for NZB files and process them according to the settings.
Required flags:
-c, --config- Path to the YAML configuration file
Create a YAML configuration file with your Usenet provider details and other settings. See config.sample.yaml for an example configuration:
# Download worker settings
download_workers: 20 # Number of concurrent download workers
# Usenet providers configuration
download_providers:
- host: "news.example.com"
port: 563
username: "your_username"
password: "your_password"
tls: true
max_connections: 10
# Scanner configuration for directory watching
scanner:
enabled: true # Enable directory scanning
watch_directories: # List of directories to scan for NZB files
- "/path/to/nzb/downloads"
scan_interval: "5m" # Scan interval (5 minutes)
max_files_per_day: 100 # Maximum number of files to process per day
concurrent_jobs: 3 # Number of concurrent processing jobs
database_path: "queue.db" # SQLite database for persistent queue storage
reprocess_interval: "168h" # Reprocess items after 7 days (set to "0" to disable)
check_percent: 100 # Percentage how many articles should be downloaded
missing_percent: 0 # How many percent of the articels can failenabled- Enable or disable the scannerwatch_directories- List of directories to scan for NZB filesscan_interval- How often to scan directories (e.g., "5m", "1h", "30s"). Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".max_files_per_day- Maximum number of files to process per dayconcurrent_jobs- Number of concurrent processing jobsdatabase_path- Path to SQLite database file for persistent queue storage (default: "queue.db")reprocess_interval- Duration after which to reprocess previously processed files (default: "0" = disabled). Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
go build -o nzbtouch ./cmd/nzbtouch
- Download the articles in memory and discard
- Scan mode to scan a directory
- Schedule scan with max number of files to download peer day
- Move the broken files into another directory
The application uses different exit codes to indicate specific error conditions:
0- Success1- Missing required arguments (NZB file or config file)2- Failed to load configuration file3- Failed to load or parse NZB file4- Failed to create NNTP connection pool5- Error processing NZB (download errors, missing segments, etc.)
- Go 1.24 or higher
- A valid Usenet account with a service provider
- Clone this repository:
git clone https://github.com/javi11/nzb-touch.git
cd nzb-touch- Install dependencies:
go mod tidy- Build the application:
go build -o nzbtouch ./cmd/nzbtouchRun the application with the required parameters:
./nzbtouch --nzb path/to/file.nzb --config path/to/config.ymlUsage:
nzbtouch [flags]
Flags:
-c, --config string Path to YAML config file (required)
-h, --help help for nzbtouch
-n, --nzb string Path to NZB file (required)
-r, --progress Show progress during download (default true)
-p, --checkpercent Amount of Articels to check
-m, --missingpercent Amount of allowed missing articles
The tool downloads articles to RAM by default (using io.Discard), which is more performant but uses no storage. This approach is faster because:
- No disk I/O bottlenecks
- No time spent on writing data to disk
- No storage space required
Connection settings can be configured in the YAML file. Consider:
- Your Usenet provider's limits
- Your network bandwidth
- Your system's capabilities
Increasing connections can improve download speed but might hit provider limits or saturate your network connection.
The application uses Cobra for command-line functionality. To add new commands:
cd cmd/nzbtouchThen add a new command file and implement the command logic.
This project is licensed under the MIT License - see the LICENSE file for details.