omdev 0.0.0.dev105__py3-none-any.whl → 0.0.0.dev107__py3-none-any.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.
- omdev/.manifests.json +1 -1
- omdev/clipboard/darwin.py +37 -3
- omdev/ptk/apps/ncdu.py +8 -4
- {omdev-0.0.0.dev105.dist-info → omdev-0.0.0.dev107.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev105.dist-info → omdev-0.0.0.dev107.dist-info}/RECORD +9 -9
- {omdev-0.0.0.dev105.dist-info → omdev-0.0.0.dev107.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev105.dist-info → omdev-0.0.0.dev107.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev105.dist-info → omdev-0.0.0.dev107.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev105.dist-info → omdev-0.0.0.dev107.dist-info}/top_level.txt +0 -0
omdev/.manifests.json
CHANGED
omdev/clipboard/darwin.py
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
# ruff: noqa: N802 N816
|
|
2
|
+
"""
|
|
3
|
+
imageProperties = dict(
|
|
4
|
+
ColorModel = "RGB"
|
|
5
|
+
DPIHeight = 144
|
|
6
|
+
DPIWidth = 144
|
|
7
|
+
Depth = 8
|
|
8
|
+
PixelHeight = 1236
|
|
9
|
+
PixelWidth = 602
|
|
10
|
+
ProfileName = "Color LCD"
|
|
11
|
+
kCGImageDestinationAllowAlpha = true
|
|
12
|
+
{Exif} = dict(
|
|
13
|
+
PixelXDimension = 602
|
|
14
|
+
PixelYDimension = 1236
|
|
15
|
+
UserComment = "Screenshot"
|
|
16
|
+
)
|
|
17
|
+
{PNG} = dict(
|
|
18
|
+
InterlaceType = 0
|
|
19
|
+
XPixelsPerMeter = 5669
|
|
20
|
+
YPixelsPerMeter = 5669
|
|
21
|
+
)
|
|
22
|
+
{TIFF} = dict(
|
|
23
|
+
ResolutionUnit = 2
|
|
24
|
+
XResolution = 144
|
|
25
|
+
YResolution = 144
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
"""
|
|
2
29
|
import ctypes as ct
|
|
3
30
|
import ctypes.util
|
|
4
31
|
import dataclasses as dc
|
|
@@ -114,7 +141,7 @@ def cfstring_to_string(cf_string: CFStringRef) -> str:
|
|
|
114
141
|
max_size = cf.CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1
|
|
115
142
|
buffer = ct.create_string_buffer(max_size)
|
|
116
143
|
|
|
117
|
-
if success := cf.CFStringGetCString(cf_string, buffer, max_size, kCFStringEncodingUTF8): # noqa
|
|
144
|
+
if not (success := cf.CFStringGetCString(cf_string, buffer, max_size, kCFStringEncodingUTF8)): # noqa
|
|
118
145
|
return ''
|
|
119
146
|
|
|
120
147
|
return buffer.value.decode('utf-8')
|
|
@@ -142,6 +169,7 @@ class DarwinClipboardItem:
|
|
|
142
169
|
def get_darwin_clipboard_data(
|
|
143
170
|
*,
|
|
144
171
|
types: ta.Container[str | None] | None = None,
|
|
172
|
+
skip_types: ta.Container[str | None] | None = None,
|
|
145
173
|
strict: bool = False,
|
|
146
174
|
types_only: bool = False,
|
|
147
175
|
) -> list[DarwinClipboardItem]:
|
|
@@ -179,6 +207,8 @@ def get_darwin_clipboard_data(
|
|
|
179
207
|
|
|
180
208
|
if types is not None and data_type_str not in types:
|
|
181
209
|
continue
|
|
210
|
+
if skip_types is not None and data_type_str in skip_types:
|
|
211
|
+
continue
|
|
182
212
|
|
|
183
213
|
if types_only:
|
|
184
214
|
lst.append(DarwinClipboardItem(
|
|
@@ -188,10 +218,14 @@ def get_darwin_clipboard_data(
|
|
|
188
218
|
continue
|
|
189
219
|
|
|
190
220
|
data = CFDataRef()
|
|
221
|
+
|
|
222
|
+
# FIXME: dumps to stderr lol:
|
|
223
|
+
# data_type_str = 'public.heics'
|
|
191
224
|
if status := aps.PasteboardCopyItemFlavorData(pasteboard, item_id, data_type, ct.byref(data)):
|
|
192
225
|
if not strict:
|
|
193
226
|
continue
|
|
194
227
|
raise StatusDarwinClipboardError('PasteboardCopyItemFlavorData', status)
|
|
228
|
+
|
|
195
229
|
if not data:
|
|
196
230
|
continue
|
|
197
231
|
|
|
@@ -221,8 +255,8 @@ def get_darwin_clipboard_data(
|
|
|
221
255
|
|
|
222
256
|
|
|
223
257
|
def _main() -> None:
|
|
224
|
-
for i in get_darwin_clipboard_data():
|
|
225
|
-
print(i)
|
|
258
|
+
for i in get_darwin_clipboard_data(skip_types={'public.heics'}):
|
|
259
|
+
print(f'type: {i.type}, len: {len(i.data) if i.data is not None else None}')
|
|
226
260
|
|
|
227
261
|
|
|
228
262
|
if __name__ == '__main__':
|
omdev/ptk/apps/ncdu.py
CHANGED
|
@@ -69,10 +69,14 @@ class NcduApp:
|
|
|
69
69
|
|
|
70
70
|
self._kb = ptk.KeyBindings()
|
|
71
71
|
self._kb.add('q')(self.exit_app)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
for k in ['up', 'p']:
|
|
73
|
+
self._kb.add(k)(self.move_up)
|
|
74
|
+
for k in ['down', 'n']:
|
|
75
|
+
self._kb.add(k)(self.move_down)
|
|
76
|
+
for k in ['right', 'enter']:
|
|
77
|
+
self._kb.add(k)(self.enter_directory)
|
|
78
|
+
for k in ['left', 'backspace']:
|
|
79
|
+
self._kb.add(k)(self.go_back)
|
|
76
80
|
|
|
77
81
|
self._layout = ptk.Layout(ptk.Frame(self._text_area))
|
|
78
82
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev107
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish ==0.0.0.
|
|
15
|
+
Requires-Dist: omlish ==0.0.0.dev107
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black ~=24.10 ; extra == 'all'
|
|
18
18
|
Requires-Dist: pycparser ~=2.22 ; extra == 'all'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
omdev/.manifests.json,sha256=
|
|
1
|
+
omdev/.manifests.json,sha256=V5q8HDU47d2-GTm_W_-iEVx0R8weTrzg_3PcmNCZXxA,6713
|
|
2
2
|
omdev/__about__.py,sha256=ON7EnhbxbwLsMj60wkd9OEYPloXZ7jmnMMzeLg44LXY,1225
|
|
3
3
|
omdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
omdev/bracepy.py,sha256=I8EdqtDvxzAi3I8TuMEW-RBfwXfqKbwp06CfOdj3L1o,2743
|
|
@@ -67,7 +67,7 @@ omdev/cli/managers.py,sha256=BV98_n30Jj63OJrFgRoVZRfICxMLXEZKoEn4rMj9LV4,1160
|
|
|
67
67
|
omdev/cli/types.py,sha256=bqKw9SbtBtAip2vF9v4khh0CqKG6LBr6n9VzWBz7AJE,474
|
|
68
68
|
omdev/clipboard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
69
|
omdev/clipboard/clipboard.py,sha256=CmnozkRljJ9UQDHLfCS8wKU0Xg-HfbsAkagAfMEias0,567
|
|
70
|
-
omdev/clipboard/darwin.py,sha256=
|
|
70
|
+
omdev/clipboard/darwin.py,sha256=zKPmI4mdTTo5ixbOVIBt6OnZE6BrpXgTPf0Tgz_-ds0,7556
|
|
71
71
|
omdev/interp/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
72
72
|
omdev/interp/__main__.py,sha256=GMCqeGYltgt5dlJzHxY9gqisa8cRkrPfmZYuZnjg4WI,162
|
|
73
73
|
omdev/interp/cli.py,sha256=sh7PZQoLletUViw1Y9OXNr9ekyNZ6YyxYuOQ_n9hyqU,2072
|
|
@@ -104,7 +104,7 @@ omdev/precheck/manifests.py,sha256=YfXqt6u0hlFXY0QkBMec6V_6Y9T4eCVAmrJDkQkB13U,7
|
|
|
104
104
|
omdev/precheck/scripts.py,sha256=Xw9kkQzlDd_2V9av9qlaNpNZG9jZdy3TTo7x60MeR2I,1273
|
|
105
105
|
omdev/ptk/__init__.py,sha256=StAwXQ96e8Xkkg7ciR9oBBhcSgqHT76vhoZML82BuY0,447
|
|
106
106
|
omdev/ptk/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
|
-
omdev/ptk/apps/ncdu.py,sha256=
|
|
107
|
+
omdev/ptk/apps/ncdu.py,sha256=dOkEJoc2Wjv1u_Uge7Vpei_LvXldoPP5833Eia355tc,4548
|
|
108
108
|
omdev/pyproject/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
109
109
|
omdev/pyproject/__main__.py,sha256=gn3Rl1aYPYdiTtEqa9ifi0t-e4ZwPY0vhJ4UXvYdJDY,165
|
|
110
110
|
omdev/pyproject/cexts.py,sha256=x13piOOnNrYbA17qZLDVuR0p1sqhgEwpk4FtImX-klM,4281
|
|
@@ -136,9 +136,9 @@ omdev/tools/sqlrepl.py,sha256=tmFZh80-xsGM62dyQ7_UGLebChrj7IHbIPYBWDJMgVk,5741
|
|
|
136
136
|
omdev/tools/pawk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
137
|
omdev/tools/pawk/__main__.py,sha256=VCqeRVnqT1RPEoIrqHFSu4PXVMg4YEgF4qCQm90-eRI,66
|
|
138
138
|
omdev/tools/pawk/pawk.py,sha256=Eckymn22GfychCQcQi96BFqRo_LmiJ-EPhC8TTUJdB4,11446
|
|
139
|
-
omdev-0.0.0.
|
|
140
|
-
omdev-0.0.0.
|
|
141
|
-
omdev-0.0.0.
|
|
142
|
-
omdev-0.0.0.
|
|
143
|
-
omdev-0.0.0.
|
|
144
|
-
omdev-0.0.0.
|
|
139
|
+
omdev-0.0.0.dev107.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
140
|
+
omdev-0.0.0.dev107.dist-info/METADATA,sha256=YvVixJXzhPOArqpAuSbxYpi67N4-8pmSm4kcBZjTm8E,1704
|
|
141
|
+
omdev-0.0.0.dev107.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
142
|
+
omdev-0.0.0.dev107.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
|
143
|
+
omdev-0.0.0.dev107.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
144
|
+
omdev-0.0.0.dev107.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|