Coverage report: /home/ellis/comp/core/lib/dat/pkg.lisp

KindCoveredAll%
expression040 0.0
branch00nil
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 ;;; dat/pkg.lisp --- Data
2
 
3
 ;;; Code:
4
 (defpackage :dat/int
5
   (:use :cl :std)
6
   (:export *dat-packages*))
7
 
8
 (in-package :dat/int)
9
 
10
 (eval-always (defparameter *dat-packages* nil))
11
 
12
 (setq *defpkg-hook* (compile nil (lambda (x) (pushnew (package-name x) *dat-packages* :test 'string=))))
13
 
14
 (defpkg :dat/proto
15
   (:use :cl :std)
16
   (:export :dat-error))
17
 
18
 (defpkg :dat/asn1
19
   (:nicknames :asn1)
20
   (:use :cl :std :dat/proto :aws-lc)
21
   (:export
22
    #:decode-asn1-string
23
    #:try-get-asn1-string-data
24
    #:decode-asn1-time))
25
 
26
 (defpkg :dat/sxp
27
   (:nicknames :sxp)
28
   (:use :cl :sb-mop :std :ast)
29
   (:import-from :uiop :read-file-forms :slurp-stream-forms :with-output-file)
30
   (:import-from :std/named-readtables :defreadtable :in-readtable)
31
   (:export
32
    :sxp-fmt-designator
33
    :sxpp
34
    :read-sxp-file :write-sxp-file
35
    :read-sxp-string :write-sxp-string
36
    :file-read-forms :make-sxp))
37
 
38
 (defpkg :dat/dot
39
   (:nicknames :dot)
40
   (:use :cl :std :dat/proto :obj/graph)
41
   (:export :graph-to-dot-file :graph-from-dot-file :graph-to-dot))
42
 
43
 (defpkg :dat/csv
44
   (:nicknames :csv)
45
   (:use :cl :std :dat/proto)
46
   (:export
47
    :read-csv-file
48
    :*csv-separator*
49
    #:read-csv-stream
50
    :write-csv-file
51
    :write-csv-stream
52
    :read-csv-file-and-sort
53
    :parse-csv-string
54
    #:write-csv-string))
55
 
56
 (defpkg :dat/ini
57
   (:nicknames :ini)
58
   (:use :cl :std :dat/proto :ast)
59
   (:export
60
    :ini-document
61
    :ini-read
62
    :ini-section
63
    :ini-object
64
    :desktop-entry))
65
 
66
 (defpkg :dat/toml
67
   (:nicknames :toml)
68
   (:use :cl :std :dat/proto :time :ast)
69
   (:export
70
    #:parse-toml-blocks
71
    :parse-toml-value
72
    #:toml-collection
73
    #:toml-table
74
    #:inline-toml-table
75
    #:toml-table-array
76
    #:toml-redefine-table-error
77
    #:toml-redefine-property-error
78
    #:toml-modify-inline-table-error
79
    #:toml-dotted-key-redefine-table-error
80
    #:toml-dotted-key-open-table-array-error
81
    #:toml-document))
82
 
83
 (defpkg :dat/arff
84
   (:nicknames :arff)
85
   (:use :cl :std :dat/proto :dat/csv)
86
   (:export
87
    :arff :arff-relation :arff-attributes :arff-data :arff-path 
88
    :parse-arff :parse-arff-string :parse-arff-stream
89
    :remove-attribute-by-name))
90
 
91
 (defpkg :dat/json
92
   (:nicknames :json)
93
   (:use :cl :std :dat/proto :uri :id)
94
   (:import-from :ast :ast :load-ast)
95
   (:export
96
    #:*allow-json-trailing-commas*
97
    #:json-trailing-commas-p
98
    #:json-decode
99
    #:json-encode
100
    #:json-read
101
    #:json-enable-reader-macro
102
    #:json-object
103
    #:json-getf
104
    #:json-setf
105
    #:json-remf
106
    #:json-delf
107
    #:json-write
108
    #:json-pointer-p #:json-pointer-from-string
109
    #:json-schema #:json-schema-validate))
110
 
111
 (defpkg :dat/openapi
112
   (:nicknames :openapi)
113
   (:use :cl :std :dat/proto :dat/json :schema)
114
   (:import-from :ast :ast))
115
 
116
 (defpkg :dat/base64
117
   (:use :cl :std :dat/proto)
118
   (:export 
119
    #:base64-stream-to-integer
120
    #:base64-stream-to-string
121
    #:base64-stream-to-stream
122
    #:base64-stream-to-octet-vector
123
    #:base64-string-to-integer
124
    #:base64-string-to-string
125
    #:base64-string-to-stream
126
    #:base64-string-to-octet-vector
127
    #:string-to-base64-string
128
    #:string-to-base64-stream
129
    #:octet-vector-to-base64-string
130
    #:octet-vector-to-base64-stream
131
    #:stream-to-base64-string
132
    #:stream-to-base64-stream
133
    #:integer-to-base64-string
134
    #:integer-to-base64-stream
135
    ;; Conditions.
136
    #:base64-error
137
    #:bad-base64-character
138
    #:incomplete-base64-data
139
    ;; For creating custom encode/decode tables.
140
    #:make-decode-table
141
    #:+decode-table+
142
    #:+uri-decode-table+))
143
 
144
 (defpkg :dat/m3u
145
   (:nicknames :m3u)
146
   (:use :cl :std :dat/proto)
147
   (:export
148
    :read-m3u-file
149
    :read-m3u-stream
150
    :write-m3u-file
151
    :write-m3u-stream
152
    :parse-m3u-string
153
    :write-m3u-string))
154
 
155
 (defpkg :dat/id3
156
   (:use :cl :std :dat/proto :id)
157
   (:export
158
    :read-id3
159
    :mp3-p
160
    :id3-p
161
    :decode-u28
162
    :read-id3-header
163
    :show-id3-header
164
    :show-id3-headers))
165
 
166
 (defpkg :dat/css
167
   (:use :cl :std :dat/proto)
168
   (:export
169
    :parse-css
170
    :*minify-css*
171
    :*css-indent-offset*
172
    :parse-css-selector
173
    :parse-css-fragment
174
    :generate-css
175
    :compile-css-selector
176
    :compile-css
177
    :compile-css-block))
178
 
179
 (defpkg :dat/html
180
   (:use :cl :dat/proto :std/macs :std/string :std/serde)
181
   (:import-from :sb-ext :defglobal)
182
   (:export
183
    :parse-html5
184
    :parse-html5-fragment
185
    :transform-html5-dom
186
    :xml-escape-name
187
    :xml-unescape-name
188
    ;; A simple DOM
189
    :make-document
190
    :make-fragment
191
    :make-doctype
192
    :make-comment
193
    :make-element
194
    :make-text-node
195
    :node-type
196
    :node-name
197
    :node-namespace
198
    :node-value
199
    :node-public-id
200
    :node-system-id
201
    :element-attribute
202
    :node-append-child
203
    :node-insert-before
204
    :node-remove-child
205
    :node-parent
206
    :node-first-child
207
    :node-last-child
208
    :node-previous-sibling
209
    :node-next-sibling
210
    :element-map-attributes
211
    :element-map-attributes*
212
    :element-map-children))
213
 
214
 (defpkg :dat/xml
215
   (:use :cl :dat/proto)
216
   (:import-from :log :trace!)
217
   (:import-from :std :serialize :deserialize)
218
   (:shadow :read-char :unread-char)
219
   (:export
220
    :xml-node-name 
221
    :xml-node-ns 
222
    :xml-node-attrs 
223
    :xml-node-children 
224
    :make-xml-node 
225
    :xml-parse 
226
    :write-xml
227
    :xml-node-p 
228
    :xml-node ; needed to support use in typep
229
    ;; processing instruction objects
230
    :proc-inst-p
231
    :proc-inst-target
232
    :proc-inst-contents
233
    :write-prologue
234
    :write-prolog
235
    ;; rpg utils
236
    :make-xmlrep :xmlrep-add-child!
237
    :xmlrep-tag :xmlrep-tagmatch
238
    :xmlrep-attribs :xmlrep-children
239
    :xmlrep-string-child :xmlrep-integer-child
240
    :xmlrep-find-child-tags :xmlrep-find-child-tag
241
    :xmlrep-attrib-value :xmlrep-boolean-attrib-value
242
    ;; tree searching from Daniel Eliason
243
    :extract-path-list
244
    :extract-path))
245
 
246
 (defpkg :dat/svg
247
   (:nicknames :svg)
248
   (:use :cl :cl-ppcre :dat/xml :dat/proto)
249
   (:import-from :std/string :*whitespaces*)
250
   (:export :parse-svg-file :parse-svg-string))
251
 
252
 (defpkg :dat/mime
253
   (:use :cl :std :dat/proto :dat/xml)
254
   (:export :*mime-database*
255
    :load-mime-info :update-mime-database
256
    :mime-magic :mime-magic-offset :mime-magic-type :mime-magic-value
257
    :mime-type :mime-type-name :mime-type-superclasses :mime-type-glob
258
    :mime-type-glob :mime-type-magic
259
    :mime :get-mime :get-mime*
260
    :mime-case))
261
 
262
 (defpkg :dat/yaml
263
   (:use :cl :dat/proto)
264
   (:import-from :log :trace!))
265
 
266
 (defpkg :dat/midi
267
   (:nicknames :midi)
268
   (:use :cl :std :dat/proto :io/proto)
269
   (:export #:read-midi-file #:write-midi-file
270
            #:midifile
271
            #:midifile-format #:midifile-tracks #:midifile-division
272
            #:note-off-message #:note-on-message #:tempo-message
273
            #:program-change-message #:pitch-bend-message
274
            #:key-signature-message #:time-signature-message
275
            #:smpte-offset-message
276
            #:sequence/track-name-message
277
            #:message-channel #:message-key #:message-time
278
            #:message-velocity #:message-numerator #:message-denominator
279
            #:message-sf #:message-mi #:message-tempo #:message-program
280
            #:message-value
281
            #:unknown-event #:data-byte #:dd #:bb #:cc #:nn))
282
 
283
 (defpkg :dat/png
284
   (:nicknames :png)
285
   (:use :cl :std :dat/proto)
286
   (:export
287
    :png
288
    :copy-png
289
    :png=
290
    :write-png
291
    :write-png-stream
292
    :streamed-png
293
    :start-png
294
    :finish-png
295
    :pixel-streamed-png
296
    :png-error))
297
 
298
 (defpkg :dat/qrcode
299
   (:nicknames :qrcode)
300
   (:use :cl :std :dat/proto :dat/png)
301
   (:export
302
    :encode-symbol
303
    ;; QR code representation
304
    ;; this should be enough to write another backend for QR symbol
305
    :qr-symbol
306
    :matrix
307
    :modules
308
    :dark-module-p
309
    :qr-symbol-to-png
310
    :qr-encode-png
311
    :qr-encode-png-stream
312
    :qr-encode-png-bytes
313
    :qr-encode-png-bytes-stream))
314
 
315
 (defpkg :dat/gif
316
   (:nicknames :gif)
317
   (:use :cl :std :dat/proto)
318
   (:export))
319
 
320
 (defpkg :dat/ttf
321
   (:nicknames :ttf)
322
   (:use :cl :std :dat/proto)
323
   (:export
324
    ;; font-cache
325
    :*font-cache*
326
    :font
327
    :font-family
328
    :font-subfamily
329
    :font-size
330
    :font-underline
331
    :font-strikethrough
332
    :font-overline
333
    :font-background
334
    :font-foreground
335
    :font-overwrite-gcontext
336
    :cache-font-file
337
    :*font-dirs*
338
    :get-font-families
339
    :get-font-subfamilies
340
    :font-antialias
341
    :cache-fonts
342
    :font-equal
343
    ;; font string
344
    :font-string-alpha-maps
345
    :font-string-bboxes
346
    :font-string-line-alpha-maps
347
    :font-string-line-bboxes
348
    ;; font loader
349
    #:open-font-loader
350
    #:close-font-loader
351
    #:with-font-loader
352
    #:with-font
353
    #:glyph-count
354
    #:name-entry-value
355
    #:find-name-entry
356
    #:value
357
    #:collection-font-count
358
    #:collection-font-index
359
    ;; font typographic
360
    #:italic-angle
361
    #:underline-thickness
362
    #:underline-position
363
    #:fixed-pitch-p
364
    #:units/em
365
    #:ascender
366
    #:descender
367
    #:line-gap
368
    #:max-width
369
    #:vascender
370
    #:vdescender
371
    ;; other font attributes
372
    #:postscript-name
373
    #:full-name
374
    #:family-name
375
    #:subfamily-name
376
    #:all-kerning-pairs
377
    #:glyph-exists-p
378
    #:index-glyph
379
    #:find-glyph
380
    ;; shared between font-loader and glyph
381
    #:bounding-box
382
    #:bbox-xmin
383
    #:bbox-ymin
384
    #:bbox-xmax
385
    #:bbox-ymax
386
    ;; control points
387
    #:cp-x
388
    #:cp-y
389
    #:on-curve-p
390
    ;; glyph contours
391
    #:contour-count
392
    #:contour
393
    #:contours
394
    #:do-contours
395
    #:explicit-contour-points
396
    #:do-contour-segments
397
    #:do-contour-segments*
398
    ;; glyph other
399
    #:code-point
400
    #:font-index
401
    ;; glyph typographic
402
    #:advance-width
403
    #:advance-height
404
    #:left-side-bearing
405
    #:top-side-bearing
406
    #:right-side-bearing
407
    #:kerning-offset
408
    #:string-bounding-box
409
    ;; conditions
410
    #:regrettable-value
411
    #:regrettable-hex-value
412
    #:bad-magic
413
    #:unsupported-version
414
    #:unsupported-format
415
    #:unsupported-value))
416
 
417
 (defpkg :dat/tar
418
   (:nicknames :tar)
419
   (:use :cl :std :dat/proto 
420
    :io/proto :io/chunky :sb-ext :io/stream
421
    :std/stream :std/macs :std/ht :io/flate)
422
   (:export
423
    #:*tar-block-bytes*
424
    #:tar-error
425
    #:simple-tar-error
426
    #:close-tar-file
427
    #:tar-file
428
    #:read-entry
429
    #:write-entry
430
    #:open-tar-file
431
    #:transfer-stream-to-tar-file
432
    #:transfer-octets-to-tar-file
433
    #:finalize-tar-file
434
    #:v7-tar-file
435
    #:entry-type
436
    #:ustar-tar-file
437
    #:gnu-tar-file
438
    #:archive
439
    #:tar-archive
440
    #:tar-entry
441
    #:tar-entry-data
442
    #:tar-file-entry
443
    #:tar-hard-link-entry
444
    #:tar-symbolic-link-entry
445
    #:tar-character-device-entry
446
    #:write-character-device-entry
447
    #:tar-block-device-entry
448
    #:tar-directory-entry
449
    #:tar-fifo-entry
450
    #:pax-attributes-entry
451
    #:do-attributes
452
    #:read-attribute
453
    #:pax-extended-attributes-entry
454
    #:pax-global-attributes-entry
455
    #:gnu-directory-dump-entry
456
    #:gnu-long-link-name-entry
457
    #:gnu-long-name-entry
458
    #:gnu-sparse-file-entry
459
    #:gnu-volume-header-name-entry
460
    #:unknown-tar-entry
461
    #:entry-unknown-p
462
    #:entry-has-data-p
463
    #:make-entry-stream
464
    #:entry-file-p
465
    #:entry-directory-p
466
    #:entry-hard-link-p
467
    #:entry-symbolic-link-p
468
    #:entry-character-device-p
469
    #:entry-block-device-p
470
    #:entry-fifo-p
471
    #:call-with-open-tar-file
472
    #:with-open-tar-file
473
    #:do-entries
474
    #:write-file-entry
475
    #:write-hard-link-entry
476
    #:write-symbolic-link-entry
477
    #:write-block-device-entry
478
    #:write-directory-entry
479
    #:write-fifo-entry
480
    #:write-pax-extended-attributes-entry
481
    #:write-pax-global-attributes-entry
482
    #:write-gnu-long-link-name-entry
483
    #:write-gnu-long-name-entry))
484
 
485
 (defpkg :dat/parquet
486
   (:use :cl :std :obj/id :dat/proto :dat/json)
487
   (:export
488
    :parquet-object
489
    :parquet-enum-object
490
    :parquet-struct-object
491
    :parquet-read
492
    :parquet-write
493
    :parquet-encode
494
    :parquet-decode))
495
 
496
 (setq *defpkg-hook* nil)
497
 
498
 (eval-always
499
   (pkg:defpkg :dat
500
     (:use :cl :std)
501
     #.`(:use-reexport ,@dat/int:*dat-packages*)))