Repository navigation
Installation
The releases have one archive per system.
Each holds mbox2nntp, uatexport, ncexport and iafetch, with the README, CHANGELOG and
LICENSE. Unpack and run; there is nothing to install.
| system | archive |
|---|---|
| Linux amd64, arm64 |
mbox2nntp_TAG_linux_amd64.tar.gz, mbox2nntp_TAG_linux_arm64.tar.gz
|
| Windows amd64, arm64 |
mbox2nntp_TAG_windows_amd64.zip, mbox2nntp_TAG_windows_arm64.zip
|
| macOS Intel, Apple silicon |
mbox2nntp_TAG_darwin_amd64.tar.gz, mbox2nntp_TAG_darwin_arm64.tar.gz
|
| FreeBSD amd64 | mbox2nntp_TAG_freebsd_amd64.tar.gz |
TAG is the version, such as v0.3.2. Check a download against the checksum file of the
same release:
sha256sum -c --ignore-missing mbox2nntp_v0.3.2_checksums.txt
mbox2nntp -version prints which version you have. The other three tools take -version
too.
iafetch in v0.3.2 is older than its README. The README describes the main branch. In
v0.3.2, -j counts files (default 4), and -host-conns, -item-conns, -piece, -conns,
-meta and -nodes do not exist yet. They are listed under "Unreleased" in the
CHANGELOG. Build from
source to get them.
You need Go 1.27.3 or later. No C compiler is needed: iafetch uses
modernc.org/sqlite, a SQLite written in Go.
git clone https://github.com/go-while/mbox2nntp
cd mbox2nntp
./build_All.sh # all four, into the repository root
./build_All.sh /usr/local/bin # into another directory
GOOS=windows GOARCH=amd64 ./build_All.sh # mbox2nntp.exe, uatexport.exe, ...
build_All.sh is a bash script. It stamps the binaries with the git describe version and
honours GOOS and GOARCH. Without bash, build each tool with go build:
go build -o mbox2nntp . # for this machine
GOOS=windows GOARCH=amd64 go build -o mbox2nntp.exe . # Windows
GOOS=darwin GOARCH=arm64 go build -o mbox2nntp-mac . # macOS, Apple silicon
GOOS=darwin GOARCH=amd64 go build -o mbox2nntp-mac . # macOS, Intel
go build -o uatexport ./cmd/uatexport # the UAT exporter
go build -o ncexport ./cmd/ncexport # the NewsCache exporter
go -C cmd/iafetch build -o ../../iafetch . # the archive.org downloader
iafetch is a Go module of its own (cmd/iafetch/go.mod), so its SQLite dependency stays
out of the other tools. Build, vet and test it from cmd/iafetch, or with
go -C cmd/iafetch ... from the repository root.
Run the tests with:
go test ./...
go -C cmd/iafetch test ./...
They need no network, server or corpus. The 7z, xz and UAT tests need 7-Zip, xz and zstd, and are skipped without them.
Go's standard library reads neither 7z nor zstd, so some inputs need an outside program.
| input or task | needs | flag to give its path |
|---|---|---|
.mbox, .bag, .txt, .mbox.gz, .mbox.zip, a directory |
nothing | |
.mbox.7z |
7-Zip: 7z, 7zz or 7za
|
-7z |
.usenet (UAT) |
zstd | -zstd |
.usenet.xz |
zstd, and xz or 7-Zip |
-zstd, -xz, -7z
|
.usenet.7z |
zstd and 7-Zip |
-zstd, -7z
|
| ncexport, iafetch | nothing | |
| uatexport | as mbox2nntp for the same UAT input |
-zstd, -xz, -7z
|
contrib/uat-fetch-export.sh |
bash, curl, uatexport, zstd, xz, 7-Zip; for archive.org also ia (internetarchive) or jq
|
|
-dos2unix (optional, not needed) |
dos2unix |
-dos2unix |
Where to get them:
| system | 7-Zip | zstd | xz |
|---|---|---|---|
| Linux | the 7zip package (Debian, Ubuntu), or p7zip
|
the zstd package |
the xz-utils package (Debian, Ubuntu); or use 7-Zip |
| macOS |
brew install sevenzip (installs 7zz) |
brew install zstd |
brew install xz; or use 7-Zip |
| Windows | the installer from 7-zip.org |
zstd.exe from the zstd releases, or choco install zstandard
|
not needed: 7-Zip reads .xz
|
| FreeBSD | any 7z, 7zz or 7za in PATH, or -7z
|
zstd in PATH, or -zstd
|
xz in PATH, or 7-Zip |
On Windows, mbox2nntp also looks for C:\Program Files\7-Zip\7z.exe, so the standard 7-Zip
install is found without -7z.
If a program is missing, mbox2nntp stops with exit code 1 and says which one, for example
no 7z, 7zz or 7za in PATH: install 7-Zip, or give its path with -7z.
Start
Guides
Tools
Reference