Mercurial > core / lisp/lib/dat/pkg.lisp
changeset 439: |
ea4f008ad13f |
parent: |
52608bbc3a7c
|
child: |
8d7aa0af2367 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Wed, 12 Jun 2024 17:34:07 -0400 |
permissions: |
-rw-r--r-- |
description: |
packy work, added json-trailing-whitespace-p variable for json readers |
1 ;;; dat/pkg.lisp --- Data 6 (:export :serialize :deserialize 7 :serializer-error :deserializer-error 8 :serde :serde-error :dat-error)) 12 (:use :cl :sb-mop :std) 13 (:import-from :uiop :read-file-forms :slurp-stream-forms :with-output-file) 14 ;; TODO: hot-patch readtables into sxp classes/parsers 15 (:import-from :std/named-readtables :defreadtable :in-readtable) 18 :form :formp :sxp-error :sxp-fmt-error :sxp-syntax-error :reader :writer :fmt 19 :wrap :wrap! :wrap-from-string! :unwrap :unwrap! :unwrap-or 20 :sxpp :build-ast :load-ast :ast 21 :define-macro :define-fmt :read-sxp-file :write-sxp-file 22 :read-sxp-string :write-sxp-string :read-sxp-stream :write-sxp-stream 23 :make-sxp :sxp :formp :form 25 :wrap-object :unwrap-object)) 28 (:use :cl :std :dat/proto) 35 :read-csv-file-and-sort 39 (:use :cl :std :dat/proto :obj/time) 48 #:toml-redefine-table-error 49 #:toml-redefine-property-error 50 #:toml-modify-inline-table-error 51 #:toml-dotted-key-redefine-table-error 52 #:toml-dotted-key-open-table-array-error)) 55 (:use :cl :std :dat/proto :dat/csv) 57 :arff :arff-relation :arff-attributes :arff-data :arff-path 58 :parse-arff :parse-arff-string :parse-arff-stream 59 :remove-attribute-by-name)) 62 (:use :cl :std :dat/proto) 64 :*allow-json-trailing-commas* 65 :json-trailing-commas-p 69 #:json-enable-reader-macro 75 (defpackage :dat/base64 76 (:use :cl :std :dat/proto) 77 (:export #:base64-stream-to-integer 78 #:base64-stream-to-string 79 #:base64-stream-to-stream 80 #:base64-stream-to-usb8-array 81 #:base64-string-to-integer 82 #:base64-string-to-string 83 #:base64-string-to-stream 84 #:base64-string-to-usb8-array 85 #:string-to-base64-string 86 #:string-to-base64-stream 87 #:usb8-array-to-base64-string 88 #:usb8-array-to-base64-stream 89 #:stream-to-base64-string 90 #:stream-to-base64-stream 91 #:integer-to-base64-string 92 #:integer-to-base64-stream 95 #:bad-base64-character 96 #:incomplete-base64-data 97 ;; For creating custom encode/decode tables. 100 #:+uri-decode-table+)) 102 (defpackage :dat/html 103 (:use :cl :std :dat/proto) 104 (:import-from :sb-ext :defglobal) 107 :parse-html5-fragment 131 :node-previous-sibling 133 :element-map-attributes 134 :element-map-attributes* 135 :element-map-children)) 138 (:use :cl :std :dat/proto :log) 139 (:shadow :read-char :unread-char) 150 :xml-node ; needed to support use in typep 151 ;; processing instruction objects 158 :make-xmlrep :xmlrep-add-child! 159 :xmlrep-tag :xmlrep-tagmatch 160 :xmlrep-attribs :xmlrep-children 161 :xmlrep-string-child :xmlrep-integer-child 162 :xmlrep-find-child-tags :xmlrep-find-child-tag 163 :xmlrep-attrib-value :xmlrep-boolean-attrib-value 164 ;; tree searching from Daniel Eliason 168 (defpackage :dat/mime 169 (:use :cl :std :dat/proto :dat/xml) 170 (:export :*mime-database* 171 :load-mime-info :update-mime-database 172 :mime-magic :mime-magic-offset :mime-magic-type :mime-magic-value 173 :mime-type :mime-type-name :mime-type-superclasses :mime-type-glob 174 :mime-type-glob :mime-type-magic 175 :mime :get-mime :get-mime*)) 177 (defpackage :dat/bencode 178 (:use :cl :std :dat/proto :sb-gray) 182 :*bencode-binary-key-p*)) 184 (defpackage :dat/midi 186 (:use :cl :std :dat/proto) 187 (:export #:read-midi-file #:write-midi-file 189 #:midifile-format #:midifile-tracks #:midifile-division 190 #:message #:note-off-message #:note-on-message #:tempo-message 191 #:program-change-message #:pitch-bend-message 192 #:key-signature-message #:time-signature-message 193 #:smpte-offset-message 194 #:sequence/track-name-message 195 #:message-channel #:message-key #:message-time 196 #:message-velocity #:message-numerator #:message-denominator 197 #:message-sf #:message-mi #:message-tempo #:message-program 199 #:header #:header-type 200 #:unknown-event #:status #:data-byte #:dd #:bb #:cc #:nn)) 202 (defpackage :dat/qrcode 204 (:use :cl :std :dat/proto) 207 ;; QR code representation 208 ;; this should be enough to write another backend for QR symbol 217 (:use :cl :std :dat/proto) 221 (:use :cl :std :dat/proto #+png :png) 225 (:use :cl :std :dat/proto) 229 (:use-reexport :dat/proto :dat/csv :dat/arff 230 :dat/toml :dat/json :dat/sxp :dat/xml 231 :dat/bencode :dat/qrcode))