meta4ra -- Metalink4 utilities

meta4ra-create utility is used to create Metalink4
(https://datatracker.ietf.org/doc/html/rfc5854)
.meta4-file for single specified file.

meta4ra-list utility is used to list files in .meta4 file, get its size,
list its URLs in "pri|cc|URL" format, extract signatures.

meta4ra-check utility is used verify corresponding files integrity.

meta4ra-dl utility can be used to download specified URL.

meta4ra-hash utility can be used to hash the data with a single hash
algorithm. It could be useful if you want to use the best found
algorithm on current system, whatever it is.

Example attempt to download .meta4's file from Russia-based location as
most preferred, with fallback to Europe continent, leaving location-less
next, randomising remaining:

    fn=$(meta4ra-list .meta4 | head -1)
    size=$(meta4ra-list -size .meta4 $fn)
    meta4ra-list .meta4 $fn |
    urls-sort ru c:eu "" rand |
    while read url ; do
        meta4ra-dl -size $size -progress "$url" |
        meta4ra-check -pipe .meta4 $fn >$fn || {
            rm $fn
            continue
        }
        break
    done
    [ -s $fn ]

urls-sort is taken from BASS project (http://www.bass.stargrave.org/).

meta4ra is copylefted free software: see the file COPYING for copying
conditions. It should work on all POSIX-compatible systems.

You can select desired fields by ordinary XML-related utulities:
    xml sel -t -m "/_:metalink/_:file/_:url" -v . -nl data.meta4
 NameMtimeSizeType
0 HASHES.txt 2026-03-23 14:12:51Z 3.2 KiB text/plain; charset=utf-8
1 INSTALL.txt 2026-03-23 14:12:51Z 158 B text/plain; charset=utf-8
2 PUBKEY-SSH.pub 2026-03-23 14:12:51Z 103 B text/plain; charset=utf-8
3 PUBKEY-SSH.pub.asc 2026-03-23 14:12:51Z 228 B text/plain
4 README 2026-03-23 14:12:51Z 1.4 KiB text/plain; charset=utf-8
5 download/ 2026-03-22 11:17:29Z 2.0 KiB dir