diff --git a/README.md b/README.md index 2718518..9acdf28 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -#Basic functions +# Minetest mod: Basic functions Main repository: @@ -11,17 +11,17 @@ https://gitlab.com/ademant/basic_functions.git https://github.com/ademant/basic_functions.git -##Short description +## Short description Mod provide some functions, I need for several mods. Basically for import spreadsheet configurations. -##short api: +## short api: function has_value(tab,val) check if val is inside list tab function import_csv(infile,def) read configuration from infile def.as_numeric: all values not stated in col_num, col_tab or with name "name" are interpreted as numeric - def.seperator: character to use as field delimiter + def.seperator: character to use as field delimiter in infile def.col_num: turn this elements to numbers def.groups_num: put this elements as numbers into matrix groups diff --git a/functions.lua b/functions.lua index 2a00033..fbb7d15 100644 --- a/functions.lua +++ b/functions.lua @@ -12,6 +12,7 @@ end local has_value=basic_functions.has_value -- read table "infile" where in "def" is defined, which cols are numbers and which belongs to a group +-- First line has to be the header. -- def.as_numeric: all values not stated in col_num, col_tab or with name "name" are interpreted as numeric -- def.seperator: character to use as field delimiter -- def.col_num: turn this elements to numbers