A spec compliant parser and meta editor for NZB files
Project description
A spec compliant parser and meta editor for NZB files
Table Of Contents
About
A spec compliant parser and meta editor for NZB files.
Installation
nzb
is available on PyPI, so you can simply use pip to install it.
pip install nzb
Usage
from nzb import NZBParser
nzb = NZBParser.from_file("Big Buck Bunny - S01E01.mkv.nzb").parse()
print(f"{nzb.file.name} ({nzb.file.size.human_readable()})")
#> Big Buck Bunny - S01E01.mkv (16.7MiB)
for file in nzb.files:
print((file.name, file.size, file.datetime.isoformat(), file.groups))
#> ("Big Buck Bunny - S01E01.mkv", 17521761, "2024-01-28T11:18:28+00:00", ("alt.binaries.boneless",))
#> ("Big Buck Bunny - S01E01.mkv.par2", 1089, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))
#> ("Big Buck Bunny - S01E01.mkv.vol00+01.par2", 741017, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))
#> ("Big Buck Bunny - S01E01.mkv.vol01+02.par2", 1480494, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))
#> ("Big Buck Bunny - S01E01.mkv.vol03+04.par2", 2960528, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))
Docs
Checkout the complete documentation here.
License
Distributed under the Unlicense License. See UNLICENSE for more information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nzb-0.1.1.tar.gz
(11.2 kB
view hashes)
Built Distribution
nzb-0.1.1-py3-none-any.whl
(12.3 kB
view hashes)