Skip to content

This repo is home to a device that stores data inbetween runs of a program! [NOW with nested information!]

Notifications You must be signed in to change notification settings

qpeano/DataStorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

DataStorage - structural data storing using text-files

  • Structure

A DataStorage is a file consisting of DataUnits, which are containers for data. They have a label which is used for retrieval. The data contained in a DataUnit is called contents and consists of fragments, and come in two forms. A fragment can either be a piece of text or a DataUnit. This allows for nested DataUnits if needed. The DataStorage itself is a text or binary file. If It is a text file it will have a clear structure, See (1).

(1) EX: DataUnits, STATUS__P1 and STATUS_P2, with several inner DataUnits that have different fragments.

STATUS_P1 {
    HP {
       100
    }
    LVL {
       13
    }
    MANNA {
       122
    }
    GOLD {
       98
    }
    EQUIPPED_WEAPON {
        BATTLE_AXE {
            DAMAGE {
                100
            }
            QUIRK {
                LANDSLIDE
            }
        }
    }
}
STATUS_P2 {
    HP {
       89
    }
    LVL {
       18
    }
    MANNA {
       200
    }
    GOLD {
       0
    }
    EQUIPPED_WEAPON {
        LONG_SWORD {
            DAMAGE {
                120
            }
            QUIRK {
                FLAME
            }
        }
    }
}

  • Fomatting

The label of a DataUnit can not contain any special characters. they should only us alphanumeric characters amd underscore. The whitespaces used to distinguish a layer from another is very important, not adding enough whitespace will result in a unit being in a lower layer than it should be. Directly changing the DataStorage file should thus be done very carefully.

About

This repo is home to a device that stores data inbetween runs of a program! [NOW with nested information!]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages