prep v0.3.1

This commit is contained in:
Robin Müller 2023-03-14 15:24:55 +01:00
parent c40db0c10d
commit cada155b8e
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 13 additions and 8 deletions

View File

@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
# [unreleased]
# [v0.3.1]
- Sorted returnvalue export by raw returnvalue.
# [v0.3.0]
- Description parser is now more generic and parses a list of meta informations.

View File

@ -1,5 +1,5 @@
__version__ = "0.3.0"
__version__ = "0.3.1"
VERSION_MAJOR = 0
VERSION_MINOR = 3
VERSION_REVISION = 0
VERSION_REVISION = 1

View File

@ -461,16 +461,17 @@ class ReturnValueParser(FileParser):
f"Full ID (hex){column_sep} Name{column_sep} Description{column_sep} "
f"Unique ID{column_sep} Subsytem Name{column_sep} File Path\n"
)
for entry in list_of_entries.items():
for k, entry in sorted(list_of_entries.items()):
# entry: tuple
if column_sep == ";":
entry[1].description = entry[1].description.replace(";", ",")
entry.description = entry.description.replace(";", ",")
elif column_sep == ",":
# Quote the description
entry[1].description = f'"{entry[1].description}"'
entry.description = f'"{entry.description}"'
out.write(
f"{entry[0]:#06x}{column_sep}{entry[1].name}{column_sep}{entry[1].description}"
f"{column_sep}{entry[1].unique_id}{column_sep}{entry[1].subsystem_name}"
f"{column_sep}{entry[1].file_name.as_posix()}\n"
f"{k:#06x}{column_sep}{entry.name}{column_sep}{entry.description}"
f"{column_sep}{entry.unique_id}{column_sep}{entry.subsystem_name}"
f"{column_sep}{entry.file_name.as_posix()}\n"
)
def build_checked_string(