coco-tools 0.25__tar.gz → 0.26__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.
- {coco_tools-0.25/coco_tools.egg-info → coco_tools-0.26}/PKG-INFO +64 -10
- {coco_tools-0.25 → coco_tools-0.26}/README.md +63 -9
- {coco_tools-0.25 → coco_tools-0.26}/coco/__init__.py +1 -1
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/procbank.py +2 -2
- {coco_tools-0.25 → coco_tools-0.26/coco_tools.egg-info}/PKG-INFO +64 -10
- {coco_tools-0.25 → coco_tools-0.26}/pyproject.toml +2 -2
- {coco_tools-0.25 → coco_tools-0.26}/tests/coco_tests/b09/test_visitors.py +13 -11
- {coco_tools-0.25 → coco_tools-0.26}/LICENSE +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/__init__.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/compiler.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/configs.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/elements.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/error_handler.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/grammar.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/parser.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/prog.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/b09/visitors.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/cm3toppm.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/decb_to_b09.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/hrstoppm.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/maxtoppm.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/mge_viewer2.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/mgetoppm.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/pixtopgm.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/png_utilities.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/rattoppm.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/resources/__init__.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/resources/ecb.b09 +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/util.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco/veftopng.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco_tools.egg-info/SOURCES.txt +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco_tools.egg-info/dependency_links.txt +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco_tools.egg-info/entry_points.txt +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco_tools.egg-info/requires.txt +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/coco_tools.egg-info/top_level.txt +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/setup.cfg +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/tests/coco_tests/b09/__init__.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/tests/coco_tests/b09/test_b09.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/tests/coco_tests/b09/test_configs.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/tests/coco_tests/fixtures/__init__.py +0 -0
- {coco_tools-0.25 → coco_tools-0.26}/tests/test_error_handler.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coco-tools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.26
|
|
4
4
|
Summary: TRS-80 Color Computer Tools
|
|
5
5
|
Author-email: Jamie Cho <jamieleecho@gmail.com>
|
|
6
6
|
License-Expression: GPL-2.0
|
|
@@ -44,7 +44,7 @@ make install
|
|
|
44
44
|
|
|
45
45
|
### [decb-to-b09](https://github.com/jamieleecho/coco-tools/blob/main/README.decb-to-b09.md)
|
|
46
46
|
|
|
47
|
-
```
|
|
47
|
+
```text
|
|
48
48
|
usage: decb-to-b09 [-h] [--version] [-l] [-z] [-s DEFAULT_STRING_STORAGE] [-D] [-w]
|
|
49
49
|
[-c CONFIG_FILE]
|
|
50
50
|
program.bas program.b09
|
|
@@ -76,7 +76,7 @@ optional arguments:
|
|
|
76
76
|
|
|
77
77
|
### cm3toppm
|
|
78
78
|
|
|
79
|
-
```
|
|
79
|
+
```text
|
|
80
80
|
usage: cm3toppm [-h] [--version] [image.cm3] [image.ppm]
|
|
81
81
|
|
|
82
82
|
Convert RS-DOS CM3 images to PPM
|
|
@@ -95,7 +95,7 @@ options:
|
|
|
95
95
|
|
|
96
96
|
### hrstoppm
|
|
97
97
|
|
|
98
|
-
```
|
|
98
|
+
```text
|
|
99
99
|
usage: hrstoppm [-h] [-w width] [-r height] [-s bytes] [--version]
|
|
100
100
|
[image.hrs] [image.ppm]
|
|
101
101
|
|
|
@@ -118,7 +118,7 @@ options:
|
|
|
118
118
|
|
|
119
119
|
### maxtoppm
|
|
120
120
|
|
|
121
|
-
```
|
|
121
|
+
```text
|
|
122
122
|
usage: maxtoppm [-h] [--version]
|
|
123
123
|
[-br | -rb | -br2 | -rb2 | -br3 | -rb3 | -s10 | -s11] [-i]
|
|
124
124
|
[-w width] [-r height] [-s bytes] [-newsroom]
|
|
@@ -163,7 +163,7 @@ Format and size options::
|
|
|
163
163
|
|
|
164
164
|
### mgetoppm
|
|
165
165
|
|
|
166
|
-
```
|
|
166
|
+
```text
|
|
167
167
|
usage: mgetoppm [-h] [--version] [image.mge] [image.ppm]
|
|
168
168
|
|
|
169
169
|
Convert RS-DOS MGE images to PPM
|
|
@@ -182,7 +182,7 @@ options:
|
|
|
182
182
|
|
|
183
183
|
### mge_viewer2
|
|
184
184
|
|
|
185
|
-
```
|
|
185
|
+
```text
|
|
186
186
|
usage: mge_viewer2 [-h] [--version] [image.mge]
|
|
187
187
|
|
|
188
188
|
View ColorMax 3 MGE files
|
|
@@ -199,7 +199,7 @@ optional arguments:
|
|
|
199
199
|
|
|
200
200
|
### pixtopgm
|
|
201
201
|
|
|
202
|
-
```
|
|
202
|
+
```text
|
|
203
203
|
usage: pixtopgm [-h] [--version] image.pix [image.pgm]
|
|
204
204
|
|
|
205
205
|
Convert RS-DOS PIX images to PGM
|
|
@@ -215,9 +215,63 @@ options:
|
|
|
215
215
|
--version show program's version number and exit
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
+
### png-to-cocopng
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
usage: png-to-coco-png [-h] [--bits-per-pixel BITS_PER_PIXEL] input_png input_palette output_png
|
|
222
|
+
|
|
223
|
+
Convert a PNG image to a CoCo 3 palette PNG.
|
|
224
|
+
|
|
225
|
+
positional arguments:
|
|
226
|
+
input_png Path to the input PNG image file.
|
|
227
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
228
|
+
output_png Path to the output PNG file.
|
|
229
|
+
|
|
230
|
+
optional arguments:
|
|
231
|
+
-h, --help show this help message and exit
|
|
232
|
+
--bits-per-pixel BITS_PER_PIXEL
|
|
233
|
+
Number of bits per pixel.
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### png-to-mvicon
|
|
237
|
+
|
|
238
|
+
```text
|
|
239
|
+
usage: png-to-mvicon [-h] input_png input_palette output_icon
|
|
240
|
+
|
|
241
|
+
Convert a 24x24 PNG image to a Multi Vue icon file.
|
|
242
|
+
|
|
243
|
+
positional arguments:
|
|
244
|
+
input_png Path to the input PNG image file.
|
|
245
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
246
|
+
output_icon Path to the output icon file.
|
|
247
|
+
|
|
248
|
+
optional arguments:
|
|
249
|
+
-h, --help show this help message and exit
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### png-to-os9-image
|
|
253
|
+
|
|
254
|
+
```text
|
|
255
|
+
usage: png-to-os9-image [-h] [--mask-index MASK_INDEX] [--bits-per-pixel BITS_PER_PIXEL]
|
|
256
|
+
input_png input_palette output_os9_image
|
|
257
|
+
|
|
258
|
+
Convert an PNG image to an OS-9 image.
|
|
259
|
+
|
|
260
|
+
positional arguments:
|
|
261
|
+
input_png Path to the input PNG image file.
|
|
262
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
263
|
+
output_os9_image Path to the output OS-9 image file.
|
|
264
|
+
|
|
265
|
+
optional arguments:
|
|
266
|
+
-h, --help show this help message and exit
|
|
267
|
+
--mask-index MASK_INDEX
|
|
268
|
+
--bits-per-pixel BITS_PER_PIXEL
|
|
269
|
+
Number of bits per pixel.
|
|
270
|
+
```
|
|
271
|
+
|
|
218
272
|
### rattoppm
|
|
219
273
|
|
|
220
|
-
```
|
|
274
|
+
```text
|
|
221
275
|
usage: rattoppm [-h] [--version] [image.rat] [image.ppm]
|
|
222
276
|
|
|
223
277
|
Convert RS-DOS RAT images to PPM
|
|
@@ -235,7 +289,7 @@ options:
|
|
|
235
289
|
|
|
236
290
|
### veftopng
|
|
237
291
|
|
|
238
|
-
```
|
|
292
|
+
```text
|
|
239
293
|
usage: veftopng [-h] [--version] image.vef image.png
|
|
240
294
|
|
|
241
295
|
Convert OS-9 VEF images to PNG
|
|
@@ -20,7 +20,7 @@ make install
|
|
|
20
20
|
|
|
21
21
|
### [decb-to-b09](https://github.com/jamieleecho/coco-tools/blob/main/README.decb-to-b09.md)
|
|
22
22
|
|
|
23
|
-
```
|
|
23
|
+
```text
|
|
24
24
|
usage: decb-to-b09 [-h] [--version] [-l] [-z] [-s DEFAULT_STRING_STORAGE] [-D] [-w]
|
|
25
25
|
[-c CONFIG_FILE]
|
|
26
26
|
program.bas program.b09
|
|
@@ -52,7 +52,7 @@ optional arguments:
|
|
|
52
52
|
|
|
53
53
|
### cm3toppm
|
|
54
54
|
|
|
55
|
-
```
|
|
55
|
+
```text
|
|
56
56
|
usage: cm3toppm [-h] [--version] [image.cm3] [image.ppm]
|
|
57
57
|
|
|
58
58
|
Convert RS-DOS CM3 images to PPM
|
|
@@ -71,7 +71,7 @@ options:
|
|
|
71
71
|
|
|
72
72
|
### hrstoppm
|
|
73
73
|
|
|
74
|
-
```
|
|
74
|
+
```text
|
|
75
75
|
usage: hrstoppm [-h] [-w width] [-r height] [-s bytes] [--version]
|
|
76
76
|
[image.hrs] [image.ppm]
|
|
77
77
|
|
|
@@ -94,7 +94,7 @@ options:
|
|
|
94
94
|
|
|
95
95
|
### maxtoppm
|
|
96
96
|
|
|
97
|
-
```
|
|
97
|
+
```text
|
|
98
98
|
usage: maxtoppm [-h] [--version]
|
|
99
99
|
[-br | -rb | -br2 | -rb2 | -br3 | -rb3 | -s10 | -s11] [-i]
|
|
100
100
|
[-w width] [-r height] [-s bytes] [-newsroom]
|
|
@@ -139,7 +139,7 @@ Format and size options::
|
|
|
139
139
|
|
|
140
140
|
### mgetoppm
|
|
141
141
|
|
|
142
|
-
```
|
|
142
|
+
```text
|
|
143
143
|
usage: mgetoppm [-h] [--version] [image.mge] [image.ppm]
|
|
144
144
|
|
|
145
145
|
Convert RS-DOS MGE images to PPM
|
|
@@ -158,7 +158,7 @@ options:
|
|
|
158
158
|
|
|
159
159
|
### mge_viewer2
|
|
160
160
|
|
|
161
|
-
```
|
|
161
|
+
```text
|
|
162
162
|
usage: mge_viewer2 [-h] [--version] [image.mge]
|
|
163
163
|
|
|
164
164
|
View ColorMax 3 MGE files
|
|
@@ -175,7 +175,7 @@ optional arguments:
|
|
|
175
175
|
|
|
176
176
|
### pixtopgm
|
|
177
177
|
|
|
178
|
-
```
|
|
178
|
+
```text
|
|
179
179
|
usage: pixtopgm [-h] [--version] image.pix [image.pgm]
|
|
180
180
|
|
|
181
181
|
Convert RS-DOS PIX images to PGM
|
|
@@ -191,9 +191,63 @@ options:
|
|
|
191
191
|
--version show program's version number and exit
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
+
### png-to-cocopng
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
usage: png-to-coco-png [-h] [--bits-per-pixel BITS_PER_PIXEL] input_png input_palette output_png
|
|
198
|
+
|
|
199
|
+
Convert a PNG image to a CoCo 3 palette PNG.
|
|
200
|
+
|
|
201
|
+
positional arguments:
|
|
202
|
+
input_png Path to the input PNG image file.
|
|
203
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
204
|
+
output_png Path to the output PNG file.
|
|
205
|
+
|
|
206
|
+
optional arguments:
|
|
207
|
+
-h, --help show this help message and exit
|
|
208
|
+
--bits-per-pixel BITS_PER_PIXEL
|
|
209
|
+
Number of bits per pixel.
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### png-to-mvicon
|
|
213
|
+
|
|
214
|
+
```text
|
|
215
|
+
usage: png-to-mvicon [-h] input_png input_palette output_icon
|
|
216
|
+
|
|
217
|
+
Convert a 24x24 PNG image to a Multi Vue icon file.
|
|
218
|
+
|
|
219
|
+
positional arguments:
|
|
220
|
+
input_png Path to the input PNG image file.
|
|
221
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
222
|
+
output_icon Path to the output icon file.
|
|
223
|
+
|
|
224
|
+
optional arguments:
|
|
225
|
+
-h, --help show this help message and exit
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### png-to-os9-image
|
|
229
|
+
|
|
230
|
+
```text
|
|
231
|
+
usage: png-to-os9-image [-h] [--mask-index MASK_INDEX] [--bits-per-pixel BITS_PER_PIXEL]
|
|
232
|
+
input_png input_palette output_os9_image
|
|
233
|
+
|
|
234
|
+
Convert an PNG image to an OS-9 image.
|
|
235
|
+
|
|
236
|
+
positional arguments:
|
|
237
|
+
input_png Path to the input PNG image file.
|
|
238
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
239
|
+
output_os9_image Path to the output OS-9 image file.
|
|
240
|
+
|
|
241
|
+
optional arguments:
|
|
242
|
+
-h, --help show this help message and exit
|
|
243
|
+
--mask-index MASK_INDEX
|
|
244
|
+
--bits-per-pixel BITS_PER_PIXEL
|
|
245
|
+
Number of bits per pixel.
|
|
246
|
+
```
|
|
247
|
+
|
|
194
248
|
### rattoppm
|
|
195
249
|
|
|
196
|
-
```
|
|
250
|
+
```text
|
|
197
251
|
usage: rattoppm [-h] [--version] [image.rat] [image.ppm]
|
|
198
252
|
|
|
199
253
|
Convert RS-DOS RAT images to PPM
|
|
@@ -211,7 +265,7 @@ options:
|
|
|
211
265
|
|
|
212
266
|
### veftopng
|
|
213
267
|
|
|
214
|
-
```
|
|
268
|
+
```text
|
|
215
269
|
usage: veftopng [-h] [--version] image.vef image.png
|
|
216
270
|
|
|
217
271
|
Convert OS-9 VEF images to PNG
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# __version__ MUST be defined on line 2
|
|
2
|
-
__version__ = "0.
|
|
2
|
+
__version__ = "0.26"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import importlib.resources as
|
|
1
|
+
import importlib.resources as importlib_resources
|
|
2
2
|
import re
|
|
3
3
|
from collections import defaultdict
|
|
4
4
|
from typing import Dict, Set
|
|
@@ -42,7 +42,7 @@ class ProcedureBank(object):
|
|
|
42
42
|
Loads the BASIC09 file and stores the procedures and determines the
|
|
43
43
|
dependencies.
|
|
44
44
|
"""
|
|
45
|
-
resource_file =
|
|
45
|
+
resource_file = importlib_resources.files(resources) / resource_name
|
|
46
46
|
with resource_file.open("r") as f:
|
|
47
47
|
return self.add_from_str(f.read())
|
|
48
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coco-tools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.26
|
|
4
4
|
Summary: TRS-80 Color Computer Tools
|
|
5
5
|
Author-email: Jamie Cho <jamieleecho@gmail.com>
|
|
6
6
|
License-Expression: GPL-2.0
|
|
@@ -44,7 +44,7 @@ make install
|
|
|
44
44
|
|
|
45
45
|
### [decb-to-b09](https://github.com/jamieleecho/coco-tools/blob/main/README.decb-to-b09.md)
|
|
46
46
|
|
|
47
|
-
```
|
|
47
|
+
```text
|
|
48
48
|
usage: decb-to-b09 [-h] [--version] [-l] [-z] [-s DEFAULT_STRING_STORAGE] [-D] [-w]
|
|
49
49
|
[-c CONFIG_FILE]
|
|
50
50
|
program.bas program.b09
|
|
@@ -76,7 +76,7 @@ optional arguments:
|
|
|
76
76
|
|
|
77
77
|
### cm3toppm
|
|
78
78
|
|
|
79
|
-
```
|
|
79
|
+
```text
|
|
80
80
|
usage: cm3toppm [-h] [--version] [image.cm3] [image.ppm]
|
|
81
81
|
|
|
82
82
|
Convert RS-DOS CM3 images to PPM
|
|
@@ -95,7 +95,7 @@ options:
|
|
|
95
95
|
|
|
96
96
|
### hrstoppm
|
|
97
97
|
|
|
98
|
-
```
|
|
98
|
+
```text
|
|
99
99
|
usage: hrstoppm [-h] [-w width] [-r height] [-s bytes] [--version]
|
|
100
100
|
[image.hrs] [image.ppm]
|
|
101
101
|
|
|
@@ -118,7 +118,7 @@ options:
|
|
|
118
118
|
|
|
119
119
|
### maxtoppm
|
|
120
120
|
|
|
121
|
-
```
|
|
121
|
+
```text
|
|
122
122
|
usage: maxtoppm [-h] [--version]
|
|
123
123
|
[-br | -rb | -br2 | -rb2 | -br3 | -rb3 | -s10 | -s11] [-i]
|
|
124
124
|
[-w width] [-r height] [-s bytes] [-newsroom]
|
|
@@ -163,7 +163,7 @@ Format and size options::
|
|
|
163
163
|
|
|
164
164
|
### mgetoppm
|
|
165
165
|
|
|
166
|
-
```
|
|
166
|
+
```text
|
|
167
167
|
usage: mgetoppm [-h] [--version] [image.mge] [image.ppm]
|
|
168
168
|
|
|
169
169
|
Convert RS-DOS MGE images to PPM
|
|
@@ -182,7 +182,7 @@ options:
|
|
|
182
182
|
|
|
183
183
|
### mge_viewer2
|
|
184
184
|
|
|
185
|
-
```
|
|
185
|
+
```text
|
|
186
186
|
usage: mge_viewer2 [-h] [--version] [image.mge]
|
|
187
187
|
|
|
188
188
|
View ColorMax 3 MGE files
|
|
@@ -199,7 +199,7 @@ optional arguments:
|
|
|
199
199
|
|
|
200
200
|
### pixtopgm
|
|
201
201
|
|
|
202
|
-
```
|
|
202
|
+
```text
|
|
203
203
|
usage: pixtopgm [-h] [--version] image.pix [image.pgm]
|
|
204
204
|
|
|
205
205
|
Convert RS-DOS PIX images to PGM
|
|
@@ -215,9 +215,63 @@ options:
|
|
|
215
215
|
--version show program's version number and exit
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
+
### png-to-cocopng
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
usage: png-to-coco-png [-h] [--bits-per-pixel BITS_PER_PIXEL] input_png input_palette output_png
|
|
222
|
+
|
|
223
|
+
Convert a PNG image to a CoCo 3 palette PNG.
|
|
224
|
+
|
|
225
|
+
positional arguments:
|
|
226
|
+
input_png Path to the input PNG image file.
|
|
227
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
228
|
+
output_png Path to the output PNG file.
|
|
229
|
+
|
|
230
|
+
optional arguments:
|
|
231
|
+
-h, --help show this help message and exit
|
|
232
|
+
--bits-per-pixel BITS_PER_PIXEL
|
|
233
|
+
Number of bits per pixel.
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### png-to-mvicon
|
|
237
|
+
|
|
238
|
+
```text
|
|
239
|
+
usage: png-to-mvicon [-h] input_png input_palette output_icon
|
|
240
|
+
|
|
241
|
+
Convert a 24x24 PNG image to a Multi Vue icon file.
|
|
242
|
+
|
|
243
|
+
positional arguments:
|
|
244
|
+
input_png Path to the input PNG image file.
|
|
245
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
246
|
+
output_icon Path to the output icon file.
|
|
247
|
+
|
|
248
|
+
optional arguments:
|
|
249
|
+
-h, --help show this help message and exit
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### png-to-os9-image
|
|
253
|
+
|
|
254
|
+
```text
|
|
255
|
+
usage: png-to-os9-image [-h] [--mask-index MASK_INDEX] [--bits-per-pixel BITS_PER_PIXEL]
|
|
256
|
+
input_png input_palette output_os9_image
|
|
257
|
+
|
|
258
|
+
Convert an PNG image to an OS-9 image.
|
|
259
|
+
|
|
260
|
+
positional arguments:
|
|
261
|
+
input_png Path to the input PNG image file.
|
|
262
|
+
input_palette Path to the input palette file is in the Multi Vue env.file format.
|
|
263
|
+
output_os9_image Path to the output OS-9 image file.
|
|
264
|
+
|
|
265
|
+
optional arguments:
|
|
266
|
+
-h, --help show this help message and exit
|
|
267
|
+
--mask-index MASK_INDEX
|
|
268
|
+
--bits-per-pixel BITS_PER_PIXEL
|
|
269
|
+
Number of bits per pixel.
|
|
270
|
+
```
|
|
271
|
+
|
|
218
272
|
### rattoppm
|
|
219
273
|
|
|
220
|
-
```
|
|
274
|
+
```text
|
|
221
275
|
usage: rattoppm [-h] [--version] [image.rat] [image.ppm]
|
|
222
276
|
|
|
223
277
|
Convert RS-DOS RAT images to PPM
|
|
@@ -235,7 +289,7 @@ options:
|
|
|
235
289
|
|
|
236
290
|
### veftopng
|
|
237
291
|
|
|
238
|
-
```
|
|
292
|
+
```text
|
|
239
293
|
usage: veftopng [-h] [--version] image.vef image.png
|
|
240
294
|
|
|
241
295
|
Convert OS-9 VEF images to PNG
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "coco-tools"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.26"
|
|
4
4
|
authors = [
|
|
5
5
|
{name = "Jamie Cho", email = "jamieleecho@gmail.com"},
|
|
6
6
|
]
|
|
@@ -38,8 +38,8 @@ maxtoppm = "coco.maxtoppm:main"
|
|
|
38
38
|
mgetoppm = "coco.mgetoppm:main"
|
|
39
39
|
mge_viewer2 = "coco.mge_viewer2:main"
|
|
40
40
|
pixtopgm = "coco.pixtopgm:main"
|
|
41
|
-
png-to-mvicon = "coco.png_utilities:png_to_mvicon"
|
|
42
41
|
png-to-coco-png = "coco.png_utilities:png_to_coco_png"
|
|
42
|
+
png-to-mvicon = "coco.png_utilities:png_to_mvicon"
|
|
43
43
|
png-to-os9-image = "coco.png_utilities:png_to_os9_image"
|
|
44
44
|
rattoppm = "coco.rattoppm:main"
|
|
45
45
|
veftopng = "coco.veftopng:main"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import importlib.resources as importlib_resources
|
|
1
2
|
from typing import List
|
|
2
3
|
|
|
3
|
-
import pkg_resources
|
|
4
4
|
import pytest
|
|
5
5
|
|
|
6
6
|
from coco import b09
|
|
@@ -20,16 +20,18 @@ from coco.b09.visitors import (
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def parse_program(resource_name: str) -> BasicProg:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
prog
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
with importlib_resources.as_file(
|
|
24
|
+
importlib_resources.files(__package__) / f"fixtures/{resource_name}"
|
|
25
|
+
) as path:
|
|
26
|
+
prog: str
|
|
27
|
+
with open(path) as f:
|
|
28
|
+
prog = f.read()
|
|
29
|
+
|
|
30
|
+
tree = grammar.parse(prog)
|
|
31
|
+
bv = BasicVisitor()
|
|
32
|
+
prog: BasicProg = bv.visit(tree)
|
|
33
|
+
prog.visit(BasicFunctionalExpressionPatcherVisitor())
|
|
34
|
+
return prog
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
@pytest.fixture
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|