M
Martin Pirker
Hi.... I need help :-/
1)
"Array" of "String" objects
each String is a news article
dumping Array .to_yaml gives:
--- !seq
- "Path: ...!not-for-mail\nFrom: ...
- "Path: ...!not-for-mail\nFrom: ...
- "Path: ...!not-for-mail\nFrom: ...
- |
Path: ...!not-for-mail
From: ...
Subject: ...
[...]
- "Path: ...!not-for-mail\nFrom: ...
- "Path: ...!not-for-mail\nFrom: ...
[...]
Question: Why are some articles one liners with \n while others are
dumped in original linebreak style?
2) in yaml4r cookbook:
So arrays don't dump in
seq:
- a
- b
- c
but in
seq: [ a, b, c ]
Question: So far I was unable to dump the short style from Ruby - how
to...?
3) yaml+bzip2
The yaml ascii dumps may get large, any easy way to auto filter
load/save through bzip2?
Thanks!
Martin
1)
"Array" of "String" objects
each String is a news article
dumping Array .to_yaml gives:
--- !seq
- "Path: ...!not-for-mail\nFrom: ...
- "Path: ...!not-for-mail\nFrom: ...
- "Path: ...!not-for-mail\nFrom: ...
- |
Path: ...!not-for-mail
From: ...
Subject: ...
[...]
- "Path: ...!not-for-mail\nFrom: ...
- "Path: ...!not-for-mail\nFrom: ...
[...]
Question: Why are some articles one liners with \n while others are
dumped in original linebreak style?
2) in yaml4r cookbook:
Simple Inline Array
Sequences can be contained on a single line, using the inline syntax.
So arrays don't dump in
seq:
- a
- b
- c
but in
seq: [ a, b, c ]
Question: So far I was unable to dump the short style from Ruby - how
to...?
3) yaml+bzip2
The yaml ascii dumps may get large, any easy way to auto filter
load/save through bzip2?
Thanks!
Martin