oaknut-cli 12.18.2__tar.gz → 12.19.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oaknut_cli-12.18.2/src/oaknut_cli.egg-info → oaknut_cli-12.19.0}/PKG-INFO +1 -1
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut/cli/__init__.py +1 -1
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut/cli/reports.py +11 -3
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0/src/oaknut_cli.egg-info}/PKG-INFO +1 -1
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/LICENSE +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/README.md +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/pyproject.toml +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/setup.cfg +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut/cli/commands.py +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut/cli/help.py +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut_cli.egg-info/SOURCES.txt +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut_cli.egg-info/dependency_links.txt +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut_cli.egg-info/requires.txt +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/src/oaknut_cli.egg-info/top_level.txt +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/tests/test_commands.py +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/tests/test_help.py +0 -0
- {oaknut_cli-12.18.2 → oaknut_cli-12.19.0}/tests/test_reports.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oaknut-cli
|
|
3
|
-
Version: 12.
|
|
3
|
+
Version: 12.19.0
|
|
4
4
|
Summary: Shared CLI toolkit for the oaknut family: the contributed-command axis and report-rendering helpers a disc command needs, below the filesystem packages.
|
|
5
5
|
Author-email: Robert Smallshire <robert@smallshire.org.uk>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -74,7 +74,9 @@ def bytes_cell(num_bytes: int) -> ByAudience:
|
|
|
74
74
|
return ByAudience(machine=num_bytes, human=format_capacity(num_bytes))
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
def address_cell(
|
|
77
|
+
def address_cell(
|
|
78
|
+
address: int, *, conceal: bool = False, min_digits: int = 6, max_digits: int | None = None
|
|
79
|
+
) -> ByAudience:
|
|
78
80
|
"""An Acorn load/exec address as an audience-aware cell.
|
|
79
81
|
|
|
80
82
|
Humans read the ``0x``-prefixed hex form, padded to a whole number
|
|
@@ -87,6 +89,11 @@ def address_cell(address: int, *, conceal: bool = False, min_digits: int = 6) ->
|
|
|
87
89
|
RISC OS ``*Info``. Machine formatters (JSON, TSV) get the raw
|
|
88
90
|
integer, so a consumer never has to parse a base back out of a string.
|
|
89
91
|
|
|
92
|
+
With *max_digits* the human form shows only the low *max_digits* hex
|
|
93
|
+
digits. DFS passes six: its OSFILE value for an I/O-processor address
|
|
94
|
+
is ``&FFFF1900``, but ``*EX`` / ``*INFO`` print the low three bytes,
|
|
95
|
+
``FF1900``. The machine form always keeps the whole value.
|
|
96
|
+
|
|
90
97
|
When *conceal* is set the human form is blank but the machine form
|
|
91
98
|
keeps the raw integer: a filetype-stamped file's load/exec hold an
|
|
92
99
|
encoded filetype and datestamp shown in their own columns, yet a
|
|
@@ -94,9 +101,10 @@ def address_cell(address: int, *, conceal: bool = False, min_digits: int = 6) ->
|
|
|
94
101
|
"""
|
|
95
102
|
if conceal:
|
|
96
103
|
return ByAudience(machine=address, human="")
|
|
97
|
-
|
|
104
|
+
shown = address if max_digits is None else address & ((1 << (4 * max_digits)) - 1)
|
|
105
|
+
digits = max(min_digits, len(f"{shown:X}"))
|
|
98
106
|
width = digits + (digits & 1) # round up to a whole number of bytes
|
|
99
|
-
return ByAudience(machine=address, human=f"0x{
|
|
107
|
+
return ByAudience(machine=address, human=f"0x{shown:0{width}X}")
|
|
100
108
|
|
|
101
109
|
|
|
102
110
|
def filetype_cell(filetype: int) -> ByAudience:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oaknut-cli
|
|
3
|
-
Version: 12.
|
|
3
|
+
Version: 12.19.0
|
|
4
4
|
Summary: Shared CLI toolkit for the oaknut family: the contributed-command axis and report-rendering helpers a disc command needs, below the filesystem packages.
|
|
5
5
|
Author-email: Robert Smallshire <robert@smallshire.org.uk>
|
|
6
6
|
License-Expression: MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|