mirror of
https://github.com/dgelessus/python-rsrcfork.git
synced 2025-02-16 18:30:24 +00:00
Don't display header data and attributes in list output
This is redundant now that there is a dedicated info subcommand.
This commit is contained in:
parent
25bec2f93a
commit
ec5eb3bcc1
@ -364,18 +364,6 @@ def show_filtered_resources(resources: typing.Sequence[api.Resource], format: st
|
||||
raise ValueError(f"Unhandled output format: {format}")
|
||||
|
||||
def list_resource_file(rf: api.ResourceFile, *, sort: bool, group: str, decompress: bool) -> None:
|
||||
if rf.header_system_data != bytes(len(rf.header_system_data)):
|
||||
print("Header system data:")
|
||||
hexdump(rf.header_system_data)
|
||||
|
||||
if rf.header_application_data != bytes(len(rf.header_application_data)):
|
||||
print("Header application data:")
|
||||
hexdump(rf.header_application_data)
|
||||
|
||||
attrs = decompose_flags(rf.file_attributes)
|
||||
if attrs:
|
||||
print("File attributes: " + " | ".join(attr.name for attr in attrs))
|
||||
|
||||
if len(rf) == 0:
|
||||
print("No resources (empty resource file)")
|
||||
return
|
||||
@ -470,6 +458,18 @@ def main_old(args: typing.List[str]) -> typing.NoReturn:
|
||||
print('Please use "rsrcfork list <file>" instead of "rsrcfork <file>".', file=sys.stderr)
|
||||
print(file=sys.stderr)
|
||||
|
||||
if rf.header_system_data != bytes(len(rf.header_system_data)):
|
||||
print("Header system data:")
|
||||
hexdump(rf.header_system_data)
|
||||
|
||||
if rf.header_application_data != bytes(len(rf.header_application_data)):
|
||||
print("Header application data:")
|
||||
hexdump(rf.header_application_data)
|
||||
|
||||
attrs = decompose_flags(rf.file_attributes)
|
||||
if attrs:
|
||||
print("File attributes: " + " | ".join(attr.name for attr in attrs))
|
||||
|
||||
list_resource_file(rf, sort=ns.sort, group=ns.group, decompress=ns.decompress)
|
||||
|
||||
sys.exit(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user