(type egg)
(signature "ldir-sexpr egg")
(timestamp 1612269487)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/ldir-sexpr" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.")) (section 2 "ldif-sexpr" (p "Read/write LDIF, LDAP search strings and related data formats.  (RFCs 2849, 4514, 2254)")) (section 2 "Requirements" (p "Irregex, ports, uri-common, base64.")) (section 2 "API" (def (sig (procedure "(ldif-dn LDIF) -> *" (id ldif-dn))) (p "Returns the distinguished name (as S-expression) from LDIF object.")) (def (sig (procedure "(ldif-attributes LDIF) -> *" (id ldif-attributes))) (p "Returns the attributes (as list of S-expression) from LDIF object.")) (def (sig (procedure "(make-ldif DN ATTRIBUTES) -> LDIF" (id make-ldif))) (p "Create an ldif record from " (tt "DN") " and " (tt "ATTRIBUTES") ".")) (def (sig (procedure "(read [PORT])" (id read))) (p "Reads a LDIF record from " (tt "PORT") " (default: " (tt "current-input-port") ").  Returns the ldif record or an " (tt "eof-object") ".")) (def (sig (procedure "(write LDIF [PORT])" (id write))) (p "Writes the LDIF object to " (tt "PORT") " (default: " (tt "current-output-port") ").")) (def (sig (procedure "(rfc4514-read STRING) -> SEXPR" (id rfc4514-read))) (p "Parse " (tt "STRING") " as RDN.")) (def (sig (procedure "(rfc4514-write SEXPR [PORT])" (id rfc4514-write))) (p "Write " (tt "SEXPR") " as RDN.")) (def (sig (procedure "(write-ldap-filter OBJ [PORT])" (id write-ldap-filter))) (p "Write " (tt "OBJ") " as LDAP filter (RFC 2254) to " (tt "PORT") " (default " (tt "current-output-port") ").")) (def (sig (procedure "(ldap-filter-string OBJ) -> STRING" (id ldap-filter-string))) (p "Returns a string with the output of " (tt "write-ldap-filter") " applied to " (tt "OBJ") "."))) (section 2 "Examples" (highlight scheme "(use (prefix ldif-sexpr ldif:))\n\n(assert (equal? (ldif:ldif-attributes (with-input-from-string \"dn: CN=foobar\\nfoo: bar\" ldif:read))\n\t '((\"foo\" \"bar\"))))\n\n\n(assert (equal? (ldif:ldap-filter-string\n\t\t '(and (exists name) (= foo \"bar\")))\n\t\t\"(&(name=*)(foo=bar))\"))")) (section 2 "About this egg" (section 3 "Author" (p "Jörg F. Wittenberger")) (section 3 "Source Code" (p "The " (link "https://github.com/0-8-15/ldif-sexpr" "ldif-sexpr egg repository") " is maintained on github.")) (section 3 "Version History" (p "Version 0.1: Initial release.")) (section 3 "License" (p "BSD")))))
