Skip to content

Command line utility that converts a CSV to DSX markup

License

Notifications You must be signed in to change notification settings

RussellSageCollege/csv2dml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSV 2 DML

Setup

  • Install PHP on your system.
  • Download the binary(csv2dml.phar) from the releases page.

Usage:

convert students.csv to students.csv.dml:

./csv2dml.phar convert students.csv

output to a specific filename:

./csv2dml.phar convert students.csv output.dml

pad id numbers to specified length [-p or --pad-to-length]:

./csv2dml.phar convert students.csv output.dml -p 7
# turns 999999 to 0999999 in output DML

exclude users from dml file [-e or --excluded-identifiers]:

./csv2dml.phar convert students.csv output.dml -p 7 -e excluded.csv

Format

Users CSV Input:

first_name,last_name,identifier,email,company
Luke,Skywalker,9999999,skywal@gmailcom,JediAcademy

Excluded Identifiers CSV:

identifier
9999998
9999997
9999996
9999995

DML Output:

I L1 U1 ^9999999^^^
T Names
F FName ^Luke^^^
F LName ^Skywalker^^^
F Company  ^JediAcademy^^^
W
T UDF
F UdfNum  ^1^^^
F UdfText ^9999999^^^
W
T UDF
F UdfNum  ^2^^^
F UdfText ^skywal@gmailcom^^^
W

About

Command line utility that converts a CSV to DSX markup

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages