Request:
The addition of CSV parsing to skript, basically like skript-json but for CSV
Example:
Input CSV:
Output list:
And so on
Syntax:
Pretty much a direct steal from skript-json:
Not really important but would be cool:
Why:
You could make a simple CSV parser in skript, but it would be a lot of work to account for lots of different cases and needless work when well thought out parsers that would be faster and better than mine already exist.
The addition of CSV parsing to skript, basically like skript-json but for CSV
Example:
Input CSV:
Code:
Player Name,Position,Nicknames,Years Active
Skippy Peterson,First Base,"""Blue Dog"", ""The Magician""",1908-1913
Bud Grimsby,Center Field,"""The Reaper"", ""Longneck""",1910-1917
Vic Crumb,Shortstop,"""Fat Vic"", ""Very, Very Fat Vic""",1911-1912
Output list:
code_language.skript:
{_l::0::0} = """Player Name"""
{_l::0::1} = "Position"
{_l::0::2} = "Nicknames"
{_l::0::3} = "Years Active"
{_l::1::0} = "Skippy Peterson"
Syntax:
Pretty much a direct steal from skript-json:
code_language.skript:
(map|copy) [the] csv [(of|from)] %text% to [the] [var[iable]] %list variable%"
code_language.skript:
[the] csv (form|representation) of %list variable%
code_language.skript:
%list variable%'[s] csv (form|representation)
Why:
You could make a simple CSV parser in skript, but it would be a lot of work to account for lots of different cases and needless work when well thought out parsers that would be faster and better than mine already exist.