Go to file
Jordan Irwin ea262a492a Minor edit to README 2021-08-28 21:04:11 -07:00
.github/workflows Add workflow for generating HTML docs on gh-pages branch for new tags 2021-08-28 20:17:29 -07:00
.ldoc Increment version to 1.2 2021-08-28 20:53:08 -07:00
.gitattributes Add helper script for setting version info 2021-08-28 20:18:17 -07:00
LICENSE.txt Create initial files 2021-05-27 22:15:38 -07:00
README.md Minor edit to README 2021-08-28 21:04:11 -07:00
TODO.txt Create initial files 2021-05-27 22:15:38 -07:00
api.lua LDoc: change module to topic 2021-08-28 19:47:00 -07:00
changelog.txt Increment version to 1.2 2021-08-28 20:53:08 -07:00
init.lua Rename to "wdata" 2021-05-28 00:24:48 -07:00
mod.conf Increment version to 1.2 2021-08-28 20:53:08 -07:00
screenshot.png Replace icon with CC0 image by m1981... 2021-06-15 13:24:54 -07:00
set_version.py Add helper script for setting version info 2021-08-28 20:18:17 -07:00

README.md

World Data Manager library for Minetest

Description:

A Minetest library for managing data files in the world directory.

It takes a little work to read from & write to data in the world directory. wdata aims to make that easier by utilizing just two simple methods.

This mod is essentially an alternative to Minetest's built-in StorageRef & was created before I realized the implementation existed. Some may still find wdata useful as it does allow for customizing sub-directories & filenames.

icon

Licensing:

Usage:

There are two methods:

- wdata.read(fname)
  - reads json data from file in world directory & converts to a table.
  - fname:  File basename without suffix (e.g. "my_config" or "my_mod/my_config").

- wdata.write(fname, data[, flags])
  - converts table to json data & writes to file in world directory.
  - fname:  File basename without suffix (e.g. "my_config" or "my_mod/my_config").
  - data:   Table containing data to be exported.
  - flags: Table of modifying flags.
    - styled: Outputs in a human-readable format if this is set (default: true).
    - null_to_table: "null" values will be converted to tables in output (default: `false`).

Requirements:

Depends:          none
Optional depends: none