Hi,
Finally, with help in the Moose mailing list (thanks Doru!), I have
automatic update of nodes in my outliner, and its working pretty well.
I'm using STON for persistence and I see that when I update a node body
content I got a lot of metadata on the text like runs, text font, text
color, lastIndex, lastOfset. For reference I have attached two files,
test.1.ston which is the original outline with no updates on nodes and
test.2.ston which contains the updated nodes with metadata. So my
questions are:
1. There is any way to exclude the text metadata or to select the
"deepness" of the exportation, including just the content of the text,
but not the metadata of it?
2. I see that there is a way to export from STON to JSON. There are
plans to implement something like YAML[1] export? If not, which would be
a good approach to explore the existing code on STON-Core and implement
this?
3. I have seen that text string containing a carriage return are stored
with "\r" character in them, there is any way to make the text be stored
containing actual carriage returns?
[1] https://en.wikipedia.org/wiki/YAML
Thanks,
Offray
OrderedCollection [
UbakyeNode {
#header : 'Nodo 1',
#key : '',
#body : 'Texto 1',
#children : OrderedCollection [ ],
#parent : UbakyeNode {
#header : 'Arbol principal',
#key : '',
#body : '',
#children : @1
}
},
UbakyeNode {
#header : 'Nodo 2',
#key : '',
#body : 'Texto 2',
#children : OrderedCollection [
UbakyeNode {
#header : 'Nodo 3',
#key : '',
#body : 'Texto 3',
#parent : @5
}
],
#parent : @4
}
]
OrderedCollection [
UbakyeNode {
#header : Text {
#string : 'Nodo 1',
#runs : RunArray {
#runs : [
6
],
#values : [
[
TextFontChange {
#fontNumber : 1
},
TextColor {
#color : Color {
#rgb : 0,
#cachedDepth :
32,
#cachedBitPattern : Bitmap [
4278190080
],
#alpha : 255
}
}
]
],
#lastIndex : 1,
#lastRun : 1,
#lastOffset : 0
}
},
#key : '',
#body : Text {
#string : 'Just changing some text.',
#runs : RunArray {
#runs : [
24
],
#values : [
[
TextFontChange {
#fontNumber : 1
},
TextColor {
#color : @10
}
]
],
#lastIndex : 24,
#lastRun : 1,
#lastOffset : 23
}
},
#children : OrderedCollection [ ],
#parent : UbakyeNode {
#header : 'Arbol principal',
#key : '',
#body : '',
#children : @1
}
},
UbakyeNode {
#header : 'Nodo 2',
#key : '',
#body : 'Texto 2',
#children : OrderedCollection [
UbakyeNode {
#header : 'Nodo 3',
#key : '',
#body : 'Texto 3',
#parent : @21
}
],
#parent : @20
}
]