coco-tools 0.20__tar.gz → 0.25__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.
Files changed (41) hide show
  1. {coco_tools-0.20 → coco_tools-0.25}/PKG-INFO +59 -66
  2. {coco_tools-0.20 → coco_tools-0.25}/README.md +57 -65
  3. {coco_tools-0.20 → coco_tools-0.25}/coco/__init__.py +1 -1
  4. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/compiler.py +3 -3
  5. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/configs.py +2 -1
  6. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/elements.py +1 -1
  7. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/procbank.py +1 -2
  8. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/visitors.py +2 -2
  9. {coco_tools-0.20 → coco_tools-0.25}/coco/decb_to_b09.py +0 -1
  10. {coco_tools-0.20 → coco_tools-0.25}/coco/maxtoppm.py +0 -1
  11. {coco_tools-0.20 → coco_tools-0.25}/coco/mge_viewer2.py +1 -2
  12. coco_tools-0.25/coco/png_utilities.py +494 -0
  13. {coco_tools-0.20 → coco_tools-0.25}/coco/util.py +0 -1
  14. {coco_tools-0.20 → coco_tools-0.25}/coco/veftopng.py +2 -1
  15. {coco_tools-0.20 → coco_tools-0.25}/coco_tools.egg-info/PKG-INFO +59 -66
  16. {coco_tools-0.20 → coco_tools-0.25}/coco_tools.egg-info/SOURCES.txt +2 -0
  17. {coco_tools-0.20 → coco_tools-0.25}/coco_tools.egg-info/entry_points.txt +3 -0
  18. {coco_tools-0.20 → coco_tools-0.25}/coco_tools.egg-info/requires.txt +1 -0
  19. {coco_tools-0.20 → coco_tools-0.25}/pyproject.toml +18 -11
  20. {coco_tools-0.20 → coco_tools-0.25}/tests/coco_tests/b09/test_configs.py +2 -1
  21. {coco_tools-0.20 → coco_tools-0.25}/tests/coco_tests/b09/test_visitors.py +3 -2
  22. {coco_tools-0.20 → coco_tools-0.25}/LICENSE +0 -0
  23. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/__init__.py +0 -0
  24. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/error_handler.py +0 -0
  25. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/grammar.py +1 -1
  26. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/parser.py +19 -19
  27. {coco_tools-0.20 → coco_tools-0.25}/coco/b09/prog.py +0 -0
  28. {coco_tools-0.20 → coco_tools-0.25}/coco/cm3toppm.py +0 -0
  29. {coco_tools-0.20 → coco_tools-0.25}/coco/hrstoppm.py +0 -0
  30. {coco_tools-0.20 → coco_tools-0.25}/coco/mgetoppm.py +0 -0
  31. {coco_tools-0.20 → coco_tools-0.25}/coco/pixtopgm.py +0 -0
  32. {coco_tools-0.20 → coco_tools-0.25}/coco/rattoppm.py +0 -0
  33. {coco_tools-0.20 → coco_tools-0.25}/coco/resources/__init__.py +0 -0
  34. {coco_tools-0.20 → coco_tools-0.25}/coco/resources/ecb.b09 +0 -0
  35. {coco_tools-0.20 → coco_tools-0.25}/coco_tools.egg-info/dependency_links.txt +0 -0
  36. {coco_tools-0.20 → coco_tools-0.25}/coco_tools.egg-info/top_level.txt +0 -0
  37. {coco_tools-0.20 → coco_tools-0.25}/setup.cfg +0 -0
  38. {coco_tools-0.20 → coco_tools-0.25}/tests/coco_tests/b09/__init__.py +0 -0
  39. {coco_tools-0.20 → coco_tools-0.25}/tests/coco_tests/b09/test_b09.py +0 -0
  40. {coco_tools-0.20 → coco_tools-0.25}/tests/coco_tests/fixtures/__init__.py +0 -0
  41. {coco_tools-0.20 → coco_tools-0.25}/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.20
3
+ Version: 0.25
4
4
  Summary: TRS-80 Color Computer Tools
5
5
  Author-email: Jamie Cho <jamieleecho@gmail.com>
6
6
  License-Expression: GPL-2.0
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3
14
14
  Requires-Python: >=3.9.19
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
+ Requires-Dist: colormath>=3.0.0
17
18
  Requires-Dist: parsimonious>=0.10.0
18
19
  Requires-Dist: Pillow>=7.0.0
19
20
  Requires-Dist: pypng>=0.0.18
@@ -28,7 +29,7 @@ the [TRS-80 Color Computer](https://en.wikipedia.org/wiki/TRS-80_Color_Computer)
28
29
 
29
30
  ## Installation
30
31
 
31
- ```
32
+ ```bash
32
33
  # To install via pip
33
34
  pip install coco-tools
34
35
 
@@ -39,32 +40,11 @@ make install-pre-commit
39
40
  make install
40
41
  ```
41
42
 
42
- The `Makefile` makes it easy to perform the most common operations:
43
- * `make all` transpiles several exapmle ECB programs to Basic09
44
- * `make check-all` runs linting and `uv.lock` checks
45
- * `make check-lint` checks for linting issues
46
- * `make check-lock` verifies the `uv.lock` is aligned to `pyproject.toml`
47
- * `make clean` cleans the virtual environment and caches
48
- * `make default` runs a default set of checks on the code
49
- * `make fix-all` formats the code, fixes lint errors and runs locks `uv.lock` to `pyproject.toml`
50
- * `make fix-format` formats the code
51
- * `make fix-lint` fixes linting issues
52
- * `make fix-lint-unsafe` fixes linting issues potentially adding inadvertant bugs
53
- * `make help` outputs the different make options
54
- * `make install` build install the distribution
55
- * `make install-pre-commit` installs pre-commit hooks
56
- * `make lock` locks `uv.lock` to `pyproject.toml`
57
- * `make install-pre-commit` installs pre-commit hooks
58
- * `make run-tests` runs the unit tests
59
- * `make sync` syncs the python environment with `uv.lock`
60
-
61
- `.vscode/settings.json` is set so that unit tests can be run without further configuration.
62
-
63
43
  ## Tools
64
44
 
65
- ### [decb-to-b09](./README.decb-to-b09.md)
45
+ ### [decb-to-b09](https://github.com/jamieleecho/coco-tools/blob/main/README.decb-to-b09.md)
66
46
 
67
- ```
47
+ ```bash
68
48
  usage: decb-to-b09 [-h] [--version] [-l] [-z] [-s DEFAULT_STRING_STORAGE] [-D] [-w]
69
49
  [-c CONFIG_FILE]
70
50
  program.bas program.b09
@@ -96,7 +76,7 @@ optional arguments:
96
76
 
97
77
  ### cm3toppm
98
78
 
99
- ```
79
+ ```bash
100
80
  usage: cm3toppm [-h] [--version] [image.cm3] [image.ppm]
101
81
 
102
82
  Convert RS-DOS CM3 images to PPM
@@ -115,7 +95,7 @@ options:
115
95
 
116
96
  ### hrstoppm
117
97
 
118
- ```
98
+ ```bash
119
99
  usage: hrstoppm [-h] [-w width] [-r height] [-s bytes] [--version]
120
100
  [image.hrs] [image.ppm]
121
101
 
@@ -138,7 +118,7 @@ options:
138
118
 
139
119
  ### maxtoppm
140
120
 
141
- ```
121
+ ```bash
142
122
  usage: maxtoppm [-h] [--version]
143
123
  [-br | -rb | -br2 | -rb2 | -br3 | -rb3 | -s10 | -s11] [-i]
144
124
  [-w width] [-r height] [-s bytes] [-newsroom]
@@ -183,7 +163,7 @@ Format and size options::
183
163
 
184
164
  ### mgetoppm
185
165
 
186
- ```
166
+ ```bash
187
167
  usage: mgetoppm [-h] [--version] [image.mge] [image.ppm]
188
168
 
189
169
  Convert RS-DOS MGE images to PPM
@@ -202,7 +182,7 @@ options:
202
182
 
203
183
  ### mge_viewer2
204
184
 
205
- ```
185
+ ```bash
206
186
  usage: mge_viewer2 [-h] [--version] [image.mge]
207
187
 
208
188
  View ColorMax 3 MGE files
@@ -219,7 +199,7 @@ optional arguments:
219
199
 
220
200
  ### pixtopgm
221
201
 
222
- ```
202
+ ```bash
223
203
  usage: pixtopgm [-h] [--version] image.pix [image.pgm]
224
204
 
225
205
  Convert RS-DOS PIX images to PGM
@@ -237,7 +217,7 @@ options:
237
217
 
238
218
  ### rattoppm
239
219
 
240
- ```
220
+ ```bash
241
221
  usage: rattoppm [-h] [--version] [image.rat] [image.ppm]
242
222
 
243
223
  Convert RS-DOS RAT images to PPM
@@ -255,7 +235,7 @@ options:
255
235
 
256
236
  ### veftopng
257
237
 
258
- ```
238
+ ```bash
259
239
  usage: veftopng [-h] [--version] image.vef image.png
260
240
 
261
241
  Convert OS-9 VEF images to PNG
@@ -274,10 +254,42 @@ options:
274
254
 
275
255
  ## Developing and Testing
276
256
 
257
+ You will need a fairly modern python environment with [uv](https://github.com/astral-sh/uv) installed.
258
+
259
+ You can begin by entering:
260
+
261
+ ```bash
262
+ make install-pre-commit
263
+ make sync
264
+ make run-tests
277
265
  ```
278
- # To set up pre-commit checks
279
- pre-commit install
280
266
 
267
+ The `Makefile` makes it easy to perform the most common operations:
268
+
269
+ * `make all` transpiles several example ECB programs to Basic09
270
+ * `make basic.dsk os9boot.dsk` builds ECB and OS-9 disks with examples
271
+ * `make check-all` runs linting and `uv.lock` checks
272
+ * `make check-lint` checks for linting issues
273
+ * `make check-lock` verifies the `uv.lock` is aligned to `pyproject.toml`
274
+ * `make clean` cleans the virtual environment and caches
275
+ * `make default` runs a default set of checks on the code
276
+ * `make fix-all` formats the code, fixes lint errors and runs locks `uv.lock` to `pyproject.toml`
277
+ * `make fix-format` formats the code
278
+ * `make fix-lint` fixes linting issues
279
+ * `make fix-lint-unsafe` fixes linting issues potentially adding inadvertant bugs
280
+ * `make help` outputs the different make options
281
+ * `make install` build install the distribution
282
+ * `make install-pre-commit` installs pre-commit hooks
283
+ * `make lock` locks `uv.lock` to `pyproject.toml`
284
+ * `make install-pre-commit` installs pre-commit hooks
285
+ * `make run-tests` runs the unit tests
286
+ * `make sync` syncs the python environment with `uv.lock`
287
+
288
+ `.vscode/settings.json` is set so that unit tests can be run without further configuration.
289
+
290
+ You can use Docker to run tests in a Linux environment:
291
+
292
+ ```bash
281
293
  # Build the docker image
282
294
  docker compose build test
283
295
 
@@ -286,38 +298,19 @@ docker compose run test
286
298
 
287
299
  # Run tests using the source on the host computer
288
300
  docker compose run testv
289
-
290
- # To develop locally
291
- pip install -r requirements.txt
292
-
293
- # Run linting, build example disk images for basic conversion
294
- make
295
-
296
- # Remove built artifacts
297
- make clean
298
-
299
- # Reformats the code
300
- make format
301
-
302
- # Only runs linting
303
- make lint
304
-
305
- # Only run tests
306
- make test
307
-
308
- # Build basic and os-9 eample images
309
- make basic.dsk os9boot.dsk
310
301
  ```
311
302
 
312
303
  ## Credits
304
+
313
305
  The programs in the examples/decb and examples/other-decb-examples-to-try directories are from the following sources:
314
- * alien4k0.bas -- https://github.com/jggames/trs80mc10/blob/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Arcade/4K/Alien4K/ALIEN4K0.TXT#L4
315
- * bach.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/bach.c10
316
- * banner.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/banner.c10
317
- * cadnza.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cadnza.c10
318
- * cflip.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cflip.c10
319
- * flip.bas -- https://github.com/daftspaniel/RetroCornerRedux/blob/main/Dragon/Originals/FlipBits/flip.bas
320
- * loops.bas -- https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf
321
- * f15eagle.bas -- https://colorcomputerarchive.com/repo/Disks/Magazines/Rainbow%20On%20Disk.zip
322
- * mars.bas -- https://github.com/jggames/trs80mc10/tree/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Text%20Adventures/WorkInProgress/Mars
323
- * saints.bas -- https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf
306
+
307
+ * alien4k0.bas -- <https://github.com/jggames/trs80mc10/blob/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Arcade/4K/Alien4K/ALIEN4K0.TXT#L4>
308
+ * bach.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/bach.c10>
309
+ * banner.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/banner.c10>
310
+ * cadnza.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cadnza.c10>
311
+ * cflip.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cflip.c10>
312
+ * flip.bas -- <https://github.com/daftspaniel/RetroCornerRedux/blob/main/Dragon/Originals/FlipBits/flip.bas>
313
+ * loops.bas -- <https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf>
314
+ * f15eagle.bas -- <https://colorcomputerarchive.com/repo/Disks/Magazines/Rainbow%20On%20Disk.zip>
315
+ * mars.bas -- <https://github.com/jggames/trs80mc10/tree/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Text%20Adventures/WorkInProgress/Mars>
316
+ * saints.bas -- <https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf>
@@ -5,7 +5,7 @@ the [TRS-80 Color Computer](https://en.wikipedia.org/wiki/TRS-80_Color_Computer)
5
5
 
6
6
  ## Installation
7
7
 
8
- ```
8
+ ```bash
9
9
  # To install via pip
10
10
  pip install coco-tools
11
11
 
@@ -16,32 +16,11 @@ make install-pre-commit
16
16
  make install
17
17
  ```
18
18
 
19
- The `Makefile` makes it easy to perform the most common operations:
20
- * `make all` transpiles several exapmle ECB programs to Basic09
21
- * `make check-all` runs linting and `uv.lock` checks
22
- * `make check-lint` checks for linting issues
23
- * `make check-lock` verifies the `uv.lock` is aligned to `pyproject.toml`
24
- * `make clean` cleans the virtual environment and caches
25
- * `make default` runs a default set of checks on the code
26
- * `make fix-all` formats the code, fixes lint errors and runs locks `uv.lock` to `pyproject.toml`
27
- * `make fix-format` formats the code
28
- * `make fix-lint` fixes linting issues
29
- * `make fix-lint-unsafe` fixes linting issues potentially adding inadvertant bugs
30
- * `make help` outputs the different make options
31
- * `make install` build install the distribution
32
- * `make install-pre-commit` installs pre-commit hooks
33
- * `make lock` locks `uv.lock` to `pyproject.toml`
34
- * `make install-pre-commit` installs pre-commit hooks
35
- * `make run-tests` runs the unit tests
36
- * `make sync` syncs the python environment with `uv.lock`
37
-
38
- `.vscode/settings.json` is set so that unit tests can be run without further configuration.
39
-
40
19
  ## Tools
41
20
 
42
- ### [decb-to-b09](./README.decb-to-b09.md)
21
+ ### [decb-to-b09](https://github.com/jamieleecho/coco-tools/blob/main/README.decb-to-b09.md)
43
22
 
44
- ```
23
+ ```bash
45
24
  usage: decb-to-b09 [-h] [--version] [-l] [-z] [-s DEFAULT_STRING_STORAGE] [-D] [-w]
46
25
  [-c CONFIG_FILE]
47
26
  program.bas program.b09
@@ -73,7 +52,7 @@ optional arguments:
73
52
 
74
53
  ### cm3toppm
75
54
 
76
- ```
55
+ ```bash
77
56
  usage: cm3toppm [-h] [--version] [image.cm3] [image.ppm]
78
57
 
79
58
  Convert RS-DOS CM3 images to PPM
@@ -92,7 +71,7 @@ options:
92
71
 
93
72
  ### hrstoppm
94
73
 
95
- ```
74
+ ```bash
96
75
  usage: hrstoppm [-h] [-w width] [-r height] [-s bytes] [--version]
97
76
  [image.hrs] [image.ppm]
98
77
 
@@ -115,7 +94,7 @@ options:
115
94
 
116
95
  ### maxtoppm
117
96
 
118
- ```
97
+ ```bash
119
98
  usage: maxtoppm [-h] [--version]
120
99
  [-br | -rb | -br2 | -rb2 | -br3 | -rb3 | -s10 | -s11] [-i]
121
100
  [-w width] [-r height] [-s bytes] [-newsroom]
@@ -160,7 +139,7 @@ Format and size options::
160
139
 
161
140
  ### mgetoppm
162
141
 
163
- ```
142
+ ```bash
164
143
  usage: mgetoppm [-h] [--version] [image.mge] [image.ppm]
165
144
 
166
145
  Convert RS-DOS MGE images to PPM
@@ -179,7 +158,7 @@ options:
179
158
 
180
159
  ### mge_viewer2
181
160
 
182
- ```
161
+ ```bash
183
162
  usage: mge_viewer2 [-h] [--version] [image.mge]
184
163
 
185
164
  View ColorMax 3 MGE files
@@ -196,7 +175,7 @@ optional arguments:
196
175
 
197
176
  ### pixtopgm
198
177
 
199
- ```
178
+ ```bash
200
179
  usage: pixtopgm [-h] [--version] image.pix [image.pgm]
201
180
 
202
181
  Convert RS-DOS PIX images to PGM
@@ -214,7 +193,7 @@ options:
214
193
 
215
194
  ### rattoppm
216
195
 
217
- ```
196
+ ```bash
218
197
  usage: rattoppm [-h] [--version] [image.rat] [image.ppm]
219
198
 
220
199
  Convert RS-DOS RAT images to PPM
@@ -232,7 +211,7 @@ options:
232
211
 
233
212
  ### veftopng
234
213
 
235
- ```
214
+ ```bash
236
215
  usage: veftopng [-h] [--version] image.vef image.png
237
216
 
238
217
  Convert OS-9 VEF images to PNG
@@ -251,10 +230,42 @@ options:
251
230
 
252
231
  ## Developing and Testing
253
232
 
233
+ You will need a fairly modern python environment with [uv](https://github.com/astral-sh/uv) installed.
234
+
235
+ You can begin by entering:
236
+
237
+ ```bash
238
+ make install-pre-commit
239
+ make sync
240
+ make run-tests
254
241
  ```
255
- # To set up pre-commit checks
256
- pre-commit install
257
242
 
243
+ The `Makefile` makes it easy to perform the most common operations:
244
+
245
+ * `make all` transpiles several example ECB programs to Basic09
246
+ * `make basic.dsk os9boot.dsk` builds ECB and OS-9 disks with examples
247
+ * `make check-all` runs linting and `uv.lock` checks
248
+ * `make check-lint` checks for linting issues
249
+ * `make check-lock` verifies the `uv.lock` is aligned to `pyproject.toml`
250
+ * `make clean` cleans the virtual environment and caches
251
+ * `make default` runs a default set of checks on the code
252
+ * `make fix-all` formats the code, fixes lint errors and runs locks `uv.lock` to `pyproject.toml`
253
+ * `make fix-format` formats the code
254
+ * `make fix-lint` fixes linting issues
255
+ * `make fix-lint-unsafe` fixes linting issues potentially adding inadvertant bugs
256
+ * `make help` outputs the different make options
257
+ * `make install` build install the distribution
258
+ * `make install-pre-commit` installs pre-commit hooks
259
+ * `make lock` locks `uv.lock` to `pyproject.toml`
260
+ * `make install-pre-commit` installs pre-commit hooks
261
+ * `make run-tests` runs the unit tests
262
+ * `make sync` syncs the python environment with `uv.lock`
263
+
264
+ `.vscode/settings.json` is set so that unit tests can be run without further configuration.
265
+
266
+ You can use Docker to run tests in a Linux environment:
267
+
268
+ ```bash
258
269
  # Build the docker image
259
270
  docker compose build test
260
271
 
@@ -263,38 +274,19 @@ docker compose run test
263
274
 
264
275
  # Run tests using the source on the host computer
265
276
  docker compose run testv
266
-
267
- # To develop locally
268
- pip install -r requirements.txt
269
-
270
- # Run linting, build example disk images for basic conversion
271
- make
272
-
273
- # Remove built artifacts
274
- make clean
275
-
276
- # Reformats the code
277
- make format
278
-
279
- # Only runs linting
280
- make lint
281
-
282
- # Only run tests
283
- make test
284
-
285
- # Build basic and os-9 eample images
286
- make basic.dsk os9boot.dsk
287
277
  ```
288
278
 
289
279
  ## Credits
280
+
290
281
  The programs in the examples/decb and examples/other-decb-examples-to-try directories are from the following sources:
291
- * alien4k0.bas -- https://github.com/jggames/trs80mc10/blob/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Arcade/4K/Alien4K/ALIEN4K0.TXT#L4
292
- * bach.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/bach.c10
293
- * banner.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/banner.c10
294
- * cadnza.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cadnza.c10
295
- * cflip.bas -- https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cflip.c10
296
- * flip.bas -- https://github.com/daftspaniel/RetroCornerRedux/blob/main/Dragon/Originals/FlipBits/flip.bas
297
- * loops.bas -- https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf
298
- * f15eagle.bas -- https://colorcomputerarchive.com/repo/Disks/Magazines/Rainbow%20On%20Disk.zip
299
- * mars.bas -- https://github.com/jggames/trs80mc10/tree/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Text%20Adventures/WorkInProgress/Mars
300
- * saints.bas -- https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf
282
+
283
+ * alien4k0.bas -- <https://github.com/jggames/trs80mc10/blob/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Arcade/4K/Alien4K/ALIEN4K0.TXT#L4>
284
+ * bach.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/bach.c10>
285
+ * banner.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/banner.c10>
286
+ * cadnza.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cadnza.c10>
287
+ * cflip.bas -- <https://colorcomputerarchive.com/repo/MC-10/Software/Books/TRS-80%20Color%20Computer%20%26%20MC-10%20Programs/cflip.c10>
288
+ * flip.bas -- <https://github.com/daftspaniel/RetroCornerRedux/blob/main/Dragon/Originals/FlipBits/flip.bas>
289
+ * loops.bas -- <https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf>
290
+ * f15eagle.bas -- <https://colorcomputerarchive.com/repo/Disks/Magazines/Rainbow%20On%20Disk.zip>
291
+ * mars.bas -- <https://github.com/jggames/trs80mc10/tree/9df4c9578250009d68a03101d626faa3c22e7445/quicktype/Text%20Adventures/WorkInProgress/Mars>
292
+ * saints.bas -- <https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Color%20Computer%203%20Extended%20Basic%20(Tandy).pdf>
@@ -1,2 +1,2 @@
1
1
  # __version__ MUST be defined on line 2
2
- __version__ = "0.20"
2
+ __version__ = "0.25"
@@ -3,6 +3,7 @@ from typing import List
3
3
 
4
4
  from coco import b09
5
5
  from coco.b09 import error_handler
6
+ from coco.b09.configs import CompilerConfigs
6
7
  from coco.b09.elements import (
7
8
  Basic09CodeStatement,
8
9
  BasicExpressionList,
@@ -13,8 +14,7 @@ from coco.b09.elements import (
13
14
  BasicRunCall,
14
15
  BasicVar,
15
16
  )
16
- from coco.b09.configs import CompilerConfigs
17
- from coco.b09.grammar import grammar, PROCNAME_REGEX
17
+ from coco.b09.grammar import PROCNAME_REGEX, grammar
18
18
  from coco.b09.parser import BasicVisitor
19
19
  from coco.b09.procbank import ProcedureBank
20
20
  from coco.b09.prog import BasicProg
@@ -29,8 +29,8 @@ from coco.b09.visitors import (
29
29
  DeclareImplicitArraysVisitor,
30
30
  GetDimmedArraysVisitor,
31
31
  JoystickVisitor,
32
- LineNumberFilterVisitor,
33
32
  LineNumberCheckerVisitor,
33
+ LineNumberFilterVisitor,
34
34
  LineReferenceVisitor,
35
35
  LineZeroFilterVisitor,
36
36
  SetDimStringStorageVisitor,
@@ -1,8 +1,9 @@
1
1
  import re
2
2
  from pathlib import Path
3
+ from typing import Dict
4
+
3
5
  from pydantic import BaseModel, Field, field_validator
4
6
  from pydantic_yaml import parse_yaml_raw_as
5
- from typing import Dict
6
7
 
7
8
 
8
9
  class StringConfigs(BaseModel):
@@ -1,7 +1,7 @@
1
1
  from abc import ABC, abstractmethod
2
2
  from collections import defaultdict
3
3
  from itertools import chain
4
- from typing import Dict, List, Literal, TYPE_CHECKING, Union
4
+ from typing import TYPE_CHECKING, Dict, List, Literal, Union
5
5
 
6
6
  from coco.b09 import DEFAULT_STR_STORAGE
7
7
 
@@ -1,12 +1,11 @@
1
1
  import importlib.resources as pkg_resources
2
2
  import re
3
-
4
3
  from collections import defaultdict
5
4
  from typing import Dict, Set
6
5
 
7
6
  from coco import b09
8
- from .. import resources
9
7
 
8
+ from .. import resources
10
9
 
11
10
  # Procedure names that start with a procedure keyword.
12
11
  PROCEDURE_START_PREFIX = re.compile(r"(?i)procedure\s+(\w+)\s*$")
@@ -1,4 +1,4 @@
1
- from typing import Dict, List, Set, TYPE_CHECKING
1
+ from typing import TYPE_CHECKING, Dict, List, Set
2
2
 
3
3
  from coco import b09
4
4
  from coco.b09.configs import StringConfigs
@@ -15,8 +15,8 @@ from coco.b09.elements import (
15
15
  BasicFunctionalExpression,
16
16
  BasicGoStatements,
17
17
  BasicHbuffStatement,
18
- BasicJoystkExpression,
19
18
  BasicInputStatement,
19
+ BasicJoystkExpression,
20
20
  BasicLine,
21
21
  BasicLiteral,
22
22
  BasicNextStatement,
@@ -11,7 +11,6 @@ import sys
11
11
  from coco import __version__
12
12
  from coco.b09.compiler import convert_file
13
13
 
14
-
15
14
  DESCRIPTION = """Convert a Color BASIC program to a BASIC09 program
16
15
  Copyright (c) 2023 by Jamie Cho
17
16
  Version: {}""".format(__version__)
@@ -23,7 +23,6 @@ from coco.util import (
23
23
  strtoio,
24
24
  )
25
25
 
26
-
27
26
  PIXEL_MODE_BW = 0
28
27
  PIXEL_MODE_BR = 1
29
28
  PIXEL_MODE_RB = 2
@@ -11,12 +11,11 @@
11
11
 
12
12
  import argparse
13
13
  import sys
14
- from tkinter import Tk, Canvas, PhotoImage, NW
14
+ from tkinter import NW, Canvas, PhotoImage, Tk
15
15
 
16
16
  from coco import __version__
17
17
  from coco.util import stdiotobuffer
18
18
 
19
-
20
19
  # Color Computer 3 RGB Palette in Photoimage color format
21
20
  RGB = [
22
21
  "#000000", # Black