From d162c58e7fc57f5004432d685db31b9f8aaba5d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 18:07:35 +0000 Subject: [PATCH] Deployed abcf4f7 with MkDocs version: 1.6.0 --- .nojekyll | 0 404.html | 461 ++ CNAME | 1 + api-reference/exceptions/index.html | 796 ++ api-reference/meta-editor/index.html | 1821 +++++ api-reference/models/index.html | 2360 ++++++ api-reference/parser/index.html | 1005 +++ api-reference/types/index.html | 629 ++ assets/_mkdocstrings.css | 119 + assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.fe8b6f2b.min.js | 29 + assets/javascripts/bundle.fe8b6f2b.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.b8dbb3d2.min.js | 42 + .../workers/search.b8dbb3d2.min.js.map | 7 + assets/logo.png | Bin 0 -> 84627 bytes assets/logo.svg | 30 + assets/stylesheets/main.3cba04c6.min.css | 1 + assets/stylesheets/main.3cba04c6.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + index.html | 666 ++ objects.inv | Bin 0 -> 1018 bytes search/search_index.json | 1 + sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes 59 files changed, 15182 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 CNAME create mode 100644 api-reference/exceptions/index.html create mode 100644 api-reference/meta-editor/index.html create mode 100644 api-reference/models/index.html create mode 100644 api-reference/parser/index.html create mode 100644 api-reference/types/index.html create mode 100644 assets/_mkdocstrings.css create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.fe8b6f2b.min.js create mode 100644 assets/javascripts/bundle.fe8b6f2b.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js.map create mode 100644 assets/logo.png create mode 100644 assets/logo.svg create mode 100644 assets/stylesheets/main.3cba04c6.min.css create mode 100644 assets/stylesheets/main.3cba04c6.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 index.html create mode 100644 objects.inv create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..36e7e68 --- /dev/null +++ b/404.html @@ -0,0 +1,461 @@ + + + +
+ + + + + + + + + + + + + + + + + + +
NZBException
+
+
+
+ Bases: Exception
Base exception for all nzb exceptions
+ + +
InvalidNZBError
+
+
+InvalidNZBError(message: str)
+
+ Bases: NZBException
Invalid NZB
+ +src/nzb/_exceptions.py
NZBMetaEditor
+
+
+Initialize the NZBMetaEditor instance.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
nzb |
+
+ str
+ |
+
+
+
+ NZB content as a string. + |
+ + required + | +
encoding |
+
+ str
+ |
+
+
+
+ Encoding of the NZB content, defaults to |
+
+ 'utf-8'
+ |
+
Raises:
+Type | +Description | +
---|---|
+ InvalidNZBError
+ |
+
+
+
+ Raised if the input is not valid XML. +However, being valid XML doesn't guarantee it's a correctly structured NZB. + |
+
src/nzb/_core.py
append
+
+
+append(*, title: str | None = None, passwords: CollectionOf[str] | str | None = None, tags: CollectionOf[str] | str | None = None, category: str | None = None) -> Self
+
Append metadata fields to the existing metadata in the NZB.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
title |
+
+ str
+ |
+
+
+
+ The title metadata field. + |
+
+ None
+ |
+
passwords |
+
+ CollectionOf[str] | str
+ |
+
+
+
+ Password(s) for the NZB file. + |
+
+ None
+ |
+
tags |
+
+ CollectionOf[str] | str
+ |
+
+
+
+ Tag(s) associated with the NZB file. + |
+
+ None
+ |
+
category |
+
+ str
+ |
+
+
+
+ Category of the NZB file. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Self
+ |
+
+
+
+ Returns itself. + |
+
src/nzb/_core.py
clear
+
+
+clear() -> Self
+
Clear all metadata fields from the NZB.
+ + +Returns:
+Type | +Description | +
---|---|
+ Self
+ |
+
+
+
+ Returns itself. + |
+
src/nzb/_core.py
from_file
+
+
+
+ classmethod
+
+
+Create an NZBMetaEditor instance from an NZB file path.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
nzb |
+
+ str | Path
+ |
+
+
+
+ File path to the NZB. + |
+ + required + | +
encoding |
+
+ str
+ |
+
+
+
+ Encoding of the NZB, defaults to |
+
+ 'utf-8'
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Self
+ |
+
+
+
+ Returns itself. + |
+
src/nzb/_core.py
remove
+
+
+Remove a metadata field from the NZB. +If the same field is present multiple times, this will remove them all.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
key |
+
+ Literal['title', 'password', 'tag', 'category'] | str
+ |
+
+
+
+ The metadata field to remove. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ Self
+ |
+
+
+
+ Returns itself. + |
+
src/nzb/_core.py
save
+
+
+Save the edited NZB to a file.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
filename |
+
+ str | Path
+ |
+
+
+
+ Destination path for saving the NZB. +If not provided, uses the original file path if available. +This will also create the path if it doesn't exist already. + |
+
+ None
+ |
+
overwrite |
+
+ bool
+ |
+
+
+
+ Whether to overwrite the file if it exists, defaults to |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Path
+ |
+
+
+
+ The path to the saved file. + |
+
Raises:
+Type | +Description | +
---|---|
+ FileNotFoundError
+ |
+
+
+
+ If no filename is specified and the original file path is unknown. + |
+
+ FileExistsError
+ |
+
+
+
+ If the file exists and overwrite is |
+
src/nzb/_core.py
set
+
+
+set(*, title: str | None = None, passwords: CollectionOf[str] | str | None = None, tags: CollectionOf[str] | str | None = None, category: str | None = None) -> Self
+
Set metadata fields in the NZB. +This will also remove all existing metadata fields.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
title |
+
+ str
+ |
+
+
+
+ The title metadata field. + |
+
+ None
+ |
+
passwords |
+
+ CollectionOf[str] | str
+ |
+
+
+
+ Password(s) for the NZB file. + |
+
+ None
+ |
+
tags |
+
+ CollectionOf[str] | str
+ |
+
+
+
+ Tag(s) associated with the NZB file. + |
+
+ None
+ |
+
category |
+
+ str
+ |
+
+
+
+ Category of the NZB file. + |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Self
+ |
+
+
+
+ Returns itself. + |
+
src/nzb/_core.py
NZB
+
+
+
+ Bases: ParentModel
Represents a complete NZB file.
+ + + + +
file
+
+
+
+ cached
+ property
+
+
+file: File
+
The main content file (episode, movie, etc) in the NZB.
+
files
+
+
+
+ instance-attribute
+
+
+File objects representing the files included in the NZB.
+
groups
+
+
+
+ cached
+ property
+
+
+Tuple of unique groups across all the files in the NZB.
+
metadata
+
+
+
+ class-attribute
+ instance-attribute
+
+
+Optional creator-definable metadata for the contents of the NZB.
+
names
+
+
+
+ cached
+ property
+
+
+Tuple of unique file names across all the files in the NZB. +May return an empty tuple if it fails to extract the name for every file.
+
posters
+
+
+
+ cached
+ property
+
+
+Tuple of unique posters across all the files in the NZB.
+
size
+
+
+
+ cached
+ property
+
+
+size: ByteSize
+
Total size of all the files in the NZB.
+
stems
+
+
+
+ cached
+ property
+
+
+Tuple of unique file stems (basename) across all the files in the NZB. +May return an empty tuple if it fails to extract the stem for every file.
+
suffixes
+
+
+
+ cached
+ property
+
+
+Tuple of unique file extensions across all the files in the NZB. +May return an empty tuple if it fails to extract the extension for every file.
+
get_par2_percentage
+
+
+get_par2_percentage() -> float
+
Percentage of recovery based on the total .par2
size divided by the total size of all files.
has_par2
+
+
+has_par2() -> bool
+
Return True
if there's at least one .par2
file in the NZB, False
otherwise.
has_rar
+
+
+has_rar() -> bool
+
Return True
if any file in the NZB is a .rar
file, False
otherwise.
is_obfuscated
+
+
+is_obfuscated() -> bool
+
Return True
if any file in the NZB is obfuscated, False
otherwise.
is_rar
+
+
+is_rar() -> bool
+
Return True
if all files in the NZB are .rar
files, False
otherwise.
Metadata
+
+
+
+ Bases: ParentModel
Optional creator-definable metadata for the contents of the NZB.
+ + + + +
category
+
+
+
+ class-attribute
+ instance-attribute
+
+
+category: str | None = None
+
Category.
+
password
+
+
+
+ cached
+ property
+
+
+password: str | None
+
Return the first password from Metadata.passwords
+if it exists, None otherwise.
This is essentially just syntactic sugar for password = passwords[0] if passwords else None
+because although the spec allows multiple passwords, single passwords are far more common.
passwords
+
+
+
+ class-attribute
+ instance-attribute
+
+
+Password(s).
+
tag
+
+
+
+ cached
+ property
+
+
+tag: str | None
+
The first tag from Metadata.tags
+if it exists, None otherwise.
This is essentially just syntactic sugar for tag = tags[0] if tags else None
+because although the spec allows multiple tags, single tags are far more common.
tags
+
+
+
+ class-attribute
+ instance-attribute
+
+
+Tag(s).
+
title
+
+
+
+ class-attribute
+ instance-attribute
+
+
+title: str | None = None
+
Title.
+
Segment
+
+
+
+ Bases: ParentModel
One part segment of a file.
+ + + + +
message_id
+
+
+
+ instance-attribute
+
+
+message_id: str
+
Message ID of the segment.
+
number
+
+
+
+ instance-attribute
+
+
+number: int
+
Number of the segment.
+
size
+
+
+
+ instance-attribute
+
+
+size: ByteSize
+
Size of the segment.
+
File
+
+
+
+ Bases: ParentModel
Represents a complete file, consisting of segments that make up a file.
+ + + + +
datetime
+
+
+
+ instance-attribute
+
+
+datetime: UTCDateTime
+
The date and time when the file was posted, in UTC.
+
groups
+
+
+
+ instance-attribute
+
+
+Groups that reference the file.
+
name
+
+
+
+ cached
+ property
+
+
+name: str
+
Complete name of the file with it's extension extracted from the subject. +May return an empty string if it fails to extract the name.
+
poster
+
+
+
+ instance-attribute
+
+
+poster: str
+
The poster of the file.
+
segments
+
+
+
+ instance-attribute
+
+
+Segments that make up the file.
+
size
+
+
+
+ cached
+ property
+
+
+size: ByteSize
+
Size of the file calculated from the sum of segment sizes.
+
stem
+
+
+
+ cached
+ property
+
+
+stem: str
+
Base name of the file without it's extension extracted from the File.name
.
+May return an empty string if it fails to extract the stem.
subject
+
+
+
+ instance-attribute
+
+
+subject: str
+
The subject of the file.
+
suffix
+
+
+
+ cached
+ property
+
+
+suffix: str
+
Extension of the file extracted from the File.name
.
+May return an empty string if it fails to extract the extension.
is_obfuscated
+
+
+is_obfuscated() -> bool
+
is_par2
+
+
+is_par2() -> bool
+
is_rar
+
+
+is_rar() -> bool
+
NZBParser
+
+
+Initialize the NZBParser instance.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
nzb |
+
+ str
+ |
+
+
+
+ NZB content as a string. + |
+ + required + | +
encoding |
+
+ str
+ |
+
+
+
+ Encoding of the NZB content, defaults to |
+
+ 'utf-8'
+ |
+
Raises:
+Type | +Description | +
---|---|
+ InvalidNZBError
+ |
+
+
+
+ Raised if the input is not valid XML. +However, being valid XML doesn't guarantee it's a correctly structured NZB. + |
+
src/nzb/_core.py
from_file
+
+
+
+ classmethod
+
+
+Create an NZBParser instance from an NZB file path.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
nzb |
+
+ str | Path
+ |
+
+
+
+ File path to the NZB. + |
+ + required + | +
encoding |
+
+ str
+ |
+
+
+
+ Encoding of the NZB, defaults to |
+
+ 'utf-8'
+ |
+
Returns:
+Type | +Description | +
---|---|
+ NZBParser
+ |
+
+
+
+ An NZBParser instance initialized with the content of the specified NZB file. + |
+
src/nzb/_core.py
parse
+
+
+parse() -> NZB
+
Parse the NZB.
+ + +Returns:
+Type | +Description | +
---|---|
+ NZB
+ |
+
+
+
+ NZB object representing the parsed NZB file. + |
+
Raises:
+Type | +Description | +
---|---|
+ InvalidNZBError
+ |
+
+
+
+ Raised if the input is not valid NZB. + |
+
src/nzb/_core.py
UTCDateTime
+
+
+
+ module-attribute
+
+
+UTCDateTime = Annotated[datetime, AfterValidator(to_utc)]
+
datetime that's always in UTC.
+