blob: 89c1871491c7ef5ab3661dcd5fe1e294f6875266 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Rec file parser for Nim
Using this library you can parse rec files made by the
[recutils][https://www.gnu.org/software/recutils/] software.
# Examples
If you have the following recfile:
```
Name: John Doe
Age: 34
Name: Jane Doe
Age: 32
```
You can read the names of the persons like this:
```nim
import nimrec
import streams
for record in records(newFileStream("persons.rec")):
echo(record["Name"])
```
More examples can be found in the `examples` directory.
|