Skip to content

Commit e75404a

Browse files
committed
Update CLAUDE.md
1 parent 4a3af25 commit e75404a

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,19 @@ Performance, execution cost, and interpreter compatibility are critical.
4949

5050
Build requires Ghostscript (`gs`) in PATH and Perl.
5151

52+
Quick iteration when developing a resource:
53+
54+
```bash
55+
make build/resource/Resource/uk.co.terryburton.bwipp/qrcode && \
56+
gs -q -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=nullpage -I build/resource/Resource \
57+
-c '10 10 moveto (Hello World) () /qrcode /uk.co.terryburton.bwipp findresource exec'
58+
```
59+
5260

5361
### Terminology
5462

55-
"Packaging" refers to PostScript processed (by the build system's "packager")
56-
into a form easier to distribute but is harder to debug:
63+
"Packaging" refers to PostScript resources processed (by the build system's
64+
"packager") into a form easier to distribute but is harder to debug:
5765

5866
- Efficient byte-based encodings for numbers and operators
5967
- Compressed numeric/string arrays
@@ -66,7 +74,7 @@ into a form easier to distribute but is harder to debug:
6674
Core library:
6775

6876
- `src/*.ps.src` - PostScript resource source files
69-
- `src/uk.co.terryburton.bwipp.upr` - Resource name to path mapping used by Distiller and build system; order determines resource order in monolithic and standalone outputs
77+
- `src/uk.co.terryburton.bwipp.upr` - Resource name to path mapping for all resources; required by Distiller; build system uses the order to determine resource order in monolithic and standalone outputs
7078
- `tests/ps_tests/*.ps.test` - PostScript test files
7179

7280
Build scripts:
@@ -207,6 +215,8 @@ end
207215

208216
### Main Procedure Structure
209217

218+
Example for an encoder:
219+
210220
```postscript
211221
/encoder {
212222
20 dict begin
@@ -237,7 +247,17 @@ end
237247
} if
238248
239249
%
240-
% 5. Main encoding logic using //encoder.staticdata
250+
% 5. Main encoding logic using //encoder.staticdata and loaded data from latevars
251+
%
252+
% The barcode generation process is typically some variation of these steps:
253+
% - High-level encoding to codewords
254+
% - Termination and padding
255+
% - Symbol size selection
256+
% - Blocking data for Reed-Solomon ECC generation
257+
% - Matrix construction with fixtures
258+
% - Data layout in matrix
259+
% - Mask evaluation and selection
260+
% - Function module placement
241261
%
242262
243263
%

0 commit comments

Comments
 (0)