Hi,

I'm using STON as my notebook storage file format for grafoscopio[1]. One example of such notebooks is at [2], but they grow large easily. That's because STON serialize a lot of information of each node. A snipped of such info is something like [3], showed at the end of this mail. I remember that someone told me about a way to store only the #string part of the Text node, without any #runs or #values information in STON. How can this be done?

Thanks,

Offray

Extra links and info:

[1] http://mutabit.com/grafoscopio/index.en.html
[2] http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/Es/Tutoriales/tutorial.ston

=[3][STON code sniped]=======

GrafoscopioNode {
                                                        #header : 'Lección 1: 
Bienvenida',
                                                        #headers : 
OrderedCollection [ ],
                                                        #key : '',
                                                        #body : Text {
                                                                #string : '\"Hola!, Soy el 
profesor Stef. Debes querer que te ayude a aprender \rPharo. Así que vamos a la primera lección: 
aprender a ejecutar código. \rPara ello hay varias opciones:\r  - Opción 1: Selecciona el texto 
debajo, o coloca el cursor luego del punto, dale clic derecho y selecciona \'do it (d)\'\r  - 
Opción 2: Haz click en el botón con el ícono de play que aparece justo cerca a la esquina 
superior\r    derecha de este panel\"\n\nPharoTutorial openPharoZenWorkspace \"no se 
qpoeadñl aldskfjlasdf\"\r',
                                                                #runs : 
RunArray {
                                                                        #runs : 
[
                                                                                
421,
                                                                                
2,
                                                                                
13,
                                                                                
1,
                                                                                
21,
                                                                                
1,
                                                                                
1,
                                                                                
26,
                                                                                
1,
                                                                                
1,
                                                                                
1
                                                                        ],
                                                                        #values 
: [
                                                                                
[
                                                                                
        TextColor {
                                                                                
                #color : Color {
                                                                                
                        #rgb : 451328430,
                                                                                
                        #alpha : 255
                                                                                
                }
                                                                                
        },
                                                                                
        TextFontChange {
                                                                                
                #fontNumber : 1
                                                                                
        }
                                                                                
],
                                                                                
[
                                                                                
        TextColor {
                                                                                
                #color : Color {
                                                                                
                        #rgb : 0,
                                                                                
                        #cachedDepth : 32,
                                                                                
                        #cachedBitPattern : Bitmap [
                                                                                
                                4278190080
                                                                                
                        ],
                                                                                
                        #alpha : 255
                                                                                
                }
                                                                                
        },
                                                                                
        @18
                                                                                
],
                                                                                
[
                                                                                
        TextColor {
                                                                                
                #color : Color {
                                                                                
                        #rgb : 512,
                                                                                
                        #alpha : 255
                                                                                
                }
                                                                                
        },
                                                                                
        RubTextClassLink {
                                                                                
                #className : #PharoTutorial
                                                                                
        },
                                                                                
        RubTextClassLink {
                                                                                
                #className : #PharoTutorial
                                                                                
        },
                                                                                
        RubTextClassLink {
                                                                                
                #className : #PharoTutorial
                                                                                
        },
                                                                                
        RubTextClassLink {
                                                                                
                #className : #PharoTutorial



==================

Reply via email to