mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-23 07:12:32 -04:00
Function to get headers from RAR files
This commit is contained in:
@@ -61,6 +61,14 @@ def names(path_or_stream):
|
||||
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):
|
||||
from unrardll import comment
|
||||
with StreamAsPath(path_or_stream) as path:
|
||||
|
||||
Reference in New Issue
Block a user