mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Function to get headers from RAR files
This commit is contained in:
parent
5725b1cd2c
commit
60e8a67dcf
@ -61,6 +61,14 @@ def names(path_or_stream):
|
|||||||
yield from names(path, only_useful=True)
|
yield from names(path, only_useful=True)
|
||||||
|
|
||||||
|
|
||||||
|
def headers(path_or_stream):
|
||||||
|
from unrardll import headers, is_useful
|
||||||
|
with StreamAsPath(path_or_stream) as path:
|
||||||
|
for h in headers(path):
|
||||||
|
if is_useful(h):
|
||||||
|
yield h
|
||||||
|
|
||||||
|
|
||||||
def comment(path_or_stream):
|
def comment(path_or_stream):
|
||||||
from unrardll import comment
|
from unrardll import comment
|
||||||
with StreamAsPath(path_or_stream) as path:
|
with StreamAsPath(path_or_stream) as path:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user