headson 0.6.3__cp310-abi3-macosx_11_0_arm64.whl → 0.6.4__cp310-abi3-macosx_11_0_arm64.whl
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.
Potentially problematic release.
This version of headson might be problematic. Click here for more details.
headson/headson.abi3.so
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: headson
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
4
4
|
Classifier: Programming Language :: Python
|
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
|
6
6
|
Classifier: Programming Language :: Rust
|
|
@@ -26,6 +26,9 @@ Available as:
|
|
|
26
26
|
- CLI (see [Usage](#usage))
|
|
27
27
|
- Python library (see [Python Bindings](#python-bindings))
|
|
28
28
|
|
|
29
|
+
  
|
|
30
|
+
|
|
31
|
+
|
|
29
32
|
## Install
|
|
30
33
|
|
|
31
34
|
Using Cargo:
|
|
@@ -67,8 +70,8 @@ If you’re comfortable with tools like `head` and `tail`, use `headson` when yo
|
|
|
67
70
|
|
|
68
71
|
Common flags:
|
|
69
72
|
|
|
70
|
-
- `-
|
|
71
|
-
- `-
|
|
73
|
+
- `-c, --bytes <BYTES>`: per‑file output budget. For multiple inputs, default total budget is `<BYTES> * number_of_inputs`.
|
|
74
|
+
- `-C, --global-bytes <BYTES>`: total output budget across all inputs. With `--bytes`, the effective total is the smaller of the two.
|
|
72
75
|
- `-f, --format <auto|json|yaml|text>`: output format (default: `auto`).
|
|
73
76
|
- Auto: stdin → JSON family; filesets → per‑file based on extension (`.json` → JSON family, `.yaml`/`.yml` → YAML, unknown → Text).
|
|
74
77
|
- `-t, --template <strict|default|detailed>`: output style (default: `default`).
|
|
@@ -89,7 +92,7 @@ Notes:
|
|
|
89
92
|
- With newlines enabled, file sections are rendered with human‑readable headers. In compact/single‑line modes, headers are omitted.
|
|
90
93
|
- In `--format auto`, each file uses its own best format: JSON family for `.json`, YAML for `.yaml`/`.yml`.
|
|
91
94
|
- Unknown extensions are treated as Text (raw lines) — safe for logs and `.txt` files.
|
|
92
|
-
- `--global-
|
|
95
|
+
- `--global-bytes` may truncate or omit entire files to respect the total budget.
|
|
93
96
|
- The tool finds the largest preview that fits the budget; even if extremely tight, you still get a minimal, valid preview.
|
|
94
97
|
- Directories and binary files are ignored; a notice is printed to stderr for each. Stdin reads the stream as‑is.
|
|
95
98
|
- Head vs Tail sampling: these options bias which part of arrays are kept before rendering. Display styles may still insert internal gap markers to honor very small budgets; strict JSON stays unannotated.
|
|
@@ -98,33 +101,33 @@ Quick one‑liners:
|
|
|
98
101
|
|
|
99
102
|
- Peek a big JSON stream (keeps structure):
|
|
100
103
|
|
|
101
|
-
zstdcat huge.json.zst | headson -
|
|
104
|
+
zstdcat huge.json.zst | headson -c 800 -f json -t default
|
|
102
105
|
|
|
103
106
|
- Many files with a fixed overall size:
|
|
104
107
|
|
|
105
|
-
headson -
|
|
108
|
+
headson -C 1200 -f json -t strict logs/*.json
|
|
106
109
|
|
|
107
110
|
- Glance at a file, JavaScript‑style comments for omissions:
|
|
108
111
|
|
|
109
|
-
headson -
|
|
112
|
+
headson -c 400 -f json -t detailed data.json
|
|
110
113
|
|
|
111
114
|
- YAML with detailed comments:
|
|
112
115
|
|
|
113
|
-
headson -
|
|
116
|
+
headson -c 400 -f yaml -t detailed config.yaml
|
|
114
117
|
|
|
115
118
|
### Text mode
|
|
116
119
|
|
|
117
120
|
- Single file (auto):
|
|
118
121
|
|
|
119
|
-
headson -
|
|
122
|
+
headson -c 200 notes.txt
|
|
120
123
|
|
|
121
124
|
- Force Text ingest/output (useful when mixing with other extensions):
|
|
122
125
|
|
|
123
|
-
headson -
|
|
126
|
+
headson -c 200 -i text -f text notes.txt
|
|
124
127
|
|
|
125
128
|
- Many text files (fileset):
|
|
126
129
|
|
|
127
|
-
headson -
|
|
130
|
+
headson -c 800 -i text -f text logs/*.txt
|
|
128
131
|
|
|
129
132
|
- Styles on Text:
|
|
130
133
|
- default: omission as a standalone `…` line.
|
|
@@ -135,6 +138,8 @@ Show help:
|
|
|
135
138
|
|
|
136
139
|
headson --help
|
|
137
140
|
|
|
141
|
+
Note: flags align with head/tail conventions (`-c/--bytes`, `-C/--global-bytes`).
|
|
142
|
+
|
|
138
143
|
## Examples: head vs headson
|
|
139
144
|
|
|
140
145
|
Input:
|
|
@@ -153,7 +158,7 @@ jq -c . users.json | head -c 80
|
|
|
153
158
|
Structured preview with headson (JSON family, default style → Pseudo):
|
|
154
159
|
|
|
155
160
|
```bash
|
|
156
|
-
headson -
|
|
161
|
+
headson -c 120 -f json -t default users.json
|
|
157
162
|
# {
|
|
158
163
|
# users: [
|
|
159
164
|
# { id: 1, name: "Ana", roles: [ "admin", … ] },
|
|
@@ -166,7 +171,7 @@ headson -n 120 -f json -t default users.json
|
|
|
166
171
|
Machine‑readable preview (JSON family, strict style → strict JSON):
|
|
167
172
|
|
|
168
173
|
```bash
|
|
169
|
-
headson -
|
|
174
|
+
headson -c 120 -f json -t strict users.json
|
|
170
175
|
# {"users":[{"id":1,"name":"Ana","roles":["admin"]}],"meta":{"count":2}}
|
|
171
176
|
```
|
|
172
177
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
headson-0.6.4.dist-info/METADATA,sha256=7Mndu2wmf9g4UAiispmuncvh6LLuQKTmiiz4S8VTLKI,10822
|
|
2
|
+
headson-0.6.4.dist-info/WHEEL,sha256=-lwEpi49KOTCcgx48T3fLSP8Dxynwa-iRMZNo-JZaqc,103
|
|
3
|
+
headson/__init__.py,sha256=Z-vwzLN9ptomZrtRqVUuUKSAaidOSVcjFI6Ojbuj-dU,219
|
|
4
|
+
headson/headson.abi3.so,sha256=UtHCyMQNFNu5_Lyft6BLZXEQzWq5DV7msz4jNhzl0xU,853408
|
|
5
|
+
headson-0.6.4.dist-info/RECORD,,
|
headson-0.6.3.dist-info/RECORD
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
headson-0.6.3.dist-info/METADATA,sha256=-XUXLS7kujupBt2kqNLMoKyx6GJmbq0E415Nh_Qs7xk,10500
|
|
2
|
-
headson-0.6.3.dist-info/WHEEL,sha256=-lwEpi49KOTCcgx48T3fLSP8Dxynwa-iRMZNo-JZaqc,103
|
|
3
|
-
headson/__init__.py,sha256=Z-vwzLN9ptomZrtRqVUuUKSAaidOSVcjFI6Ojbuj-dU,219
|
|
4
|
-
headson/headson.abi3.so,sha256=-BlSgXzSGKMPZcFekoLb4pfuIhPfs27yfCIcZ-2c4_8,853440
|
|
5
|
-
headson-0.6.3.dist-info/RECORD,,
|
|
File without changes
|