Reading, writing and classifying PSOSF archives.
An archive is held as data: {:version "1.1" ; or "1.0" for an archive without a manifest :manifest {"format" "psosf" ...} ; JSON object, string keys :sheets [sheet ...] ; in manifest order, see psosf.sheet :tests {"zero-balance" {:json {...} :inputs {"Accounts" csv-text} :expected {"Account Totals" csv-text}}} :signatures text-or-nil}
classify reports one of three levels: :invalid not a well-formed PSOSF archive :valid well-formed: safe to open and convertible to Excel :compatible also passes every Pebble Stream compatibility check that can be made without compiling (function allow-list, references that reach outside the spreadsheet, directive names). The compiler service has the final say.
Reading, writing and classifying PSOSF archives.
An archive is held as data:
{:version "1.1" ; or "1.0" for an archive without a manifest
:manifest {"format" "psosf" ...} ; JSON object, string keys
:sheets [sheet ...] ; in manifest order, see psosf.sheet
:tests {"zero-balance" {:json {...} :inputs {"Accounts" csv-text}
:expected {"Account Totals" csv-text}}}
:signatures text-or-nil}
classify reports one of three levels:
:invalid not a well-formed PSOSF archive
:valid well-formed: safe to open and convertible to Excel
:compatible also passes every Pebble Stream compatibility check that can be
made without compiling (function allow-list, references that
reach outside the spreadsheet, directive names). The compiler
service has the final say.(classify entries)(classify entries opts)Classifies an archive given as an entries map {path text}. Returns {:level :invalid|:valid|:compatible :archive ... :errors [...] :warnings [...] :compatibility-errors [...]}. :compatibility-errors explain why a valid archive is not compatible. Options: :allowed-functions.
Classifies an archive given as an entries map {path text}. Returns
{:level :invalid|:valid|:compatible :archive ... :errors [...]
:warnings [...] :compatibility-errors [...]}. :compatibility-errors explain why a
valid archive is not compatible. Options: :allowed-functions.(classify-file path)(classify-file path opts)Reads and classifies a .psosf file.
Reads and classifies a .psosf file.
(compatibility {:keys [sheets]}
{:keys [allowed-functions]
:or {allowed-functions allow-list/functions}})Pebble Stream compatibility findings for a structurally valid archive.
Pebble Stream compatibility findings for a structurally valid archive.
(read-entries entries)Reads an archive from an entries map {path text}. Returns {:archive archive :errors [...] :warnings [...]}.
Reads an archive from an entries map {path text}. Returns
{:archive archive :errors [...] :warnings [...]}.(write-entries {:keys [manifest sheets tests signatures]})Writes an archive to an entries map {path text}, in canonical form and as version 1.1. The manifest's sheets are taken from :sheets, in order. A version 1.0 archive, which has no manifest, is named "Untitled".
Writes an archive to an entries map {path text}, in canonical form and as
version 1.1. The manifest's sheets are taken from :sheets, in order. A
version 1.0 archive, which has no manifest, is named "Untitled".(write-file path archive)Writes an archive to a .psosf file.
Writes an archive to a .psosf file.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |