Liking cljdoc? Tell your friends :D

clj-dbase.core

A small library to parse dbase files. Copyright (C) 2020 Henrik Jürges juerges.henrik@gmail.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

This module provides the utility to parse the dbase dbf table format into

The expected file format version is dBase v3. A dbf file starts with a variable header defining some metainformations and the field types and names. The remaining file is the record content.

Usage

The main entry point is the (parse-dbase-file input-file) function.

(def dbase-data (parse-dbase-file (clojure.java.io/file input-file)))

The returned data is a nested map of

{:header <meta informations>
 :fields <record field definitions>
 :records <the actual table data>}

Additionally, the field definition can be attatched to the record data.

(-> (java.io.file. input-file)
    (parse-dbase-file)
    (field-definition->records))

This results in the field name is also attached to the individual record for easier handling and post-processing.

A small library to parse dbase files.
Copyright (C) 2020  Henrik Jürges <juerges.henrik@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

This module provides the utility to parse the dbase dbf table format into

The expected file format version is dBase v3.
A dbf file starts with a variable header defining some metainformations
and the field types and names. The remaining file is the record content.

### Usage

The main entry point is the `(parse-dbase-file input-file)` function.

```
(def dbase-data (parse-dbase-file (clojure.java.io/file input-file)))
```

The returned data is a nested map of
```
{:header <meta informations>
 :fields <record field definitions>
 :records <the actual table data>}
```

Additionally, the field definition can be attatched to the record data.

```
(-> (java.io.file. input-file)
    (parse-dbase-file)
    (field-definition->records))
```
This results in the field name is also attached to the individual record
for easier handling and post-processing.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close