Difference between revisions of "Jupiter"
m |
m (Pimp'd) |
||
Line 1: | Line 1: | ||
Jupiter is a file io and table serialisation library written by Lafolie. | Jupiter is a file io and table serialisation library written by Lafolie. | ||
+ | |||
+ | == Usage == | ||
+ | |||
+ | Designed to be easy to use, Jupiter takes a table structure and saves it to a file. You can edit these files in your favourite text editor, or even write them from scratch, and re-load them into your project at a later date. | ||
+ | |||
+ | A simple implementation looks like this: | ||
+ | |||
+ | <source lang="lua"> | ||
+ | jupiter = require "jupiter" | ||
+ | |||
+ | --setup a table | ||
+ | data = {_fileName = "example.txt", "Save this string!"} | ||
+ | --write the file (Jupiter handles filenames by referring to data._fileName) | ||
+ | success = jupiter.save(data) | ||
+ | --load another file into a table | ||
+ | newData = jupiter.load("filename.extension") | ||
+ | </source> | ||
+ | == Get Jupiter == | ||
You can download the script from [http://github.com/Lafolie/Jupiter Jupiter on github] | You can download the script from [http://github.com/Lafolie/Jupiter Jupiter on github] |
Revision as of 22:02, 18 September 2012
Jupiter is a file io and table serialisation library written by Lafolie.
Usage
Designed to be easy to use, Jupiter takes a table structure and saves it to a file. You can edit these files in your favourite text editor, or even write them from scratch, and re-load them into your project at a later date.
A simple implementation looks like this:
jupiter = require "jupiter"
--setup a table
data = {_fileName = "example.txt", "Save this string!"}
--write the file (Jupiter handles filenames by referring to data._fileName)
success = jupiter.save(data)
--load another file into a table
newData = jupiter.load("filename.extension")
Get Jupiter
You can download the script from Jupiter on github