smetdenis/csvimport

Simple csv import to mysql database

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 2

Watchers: 1

Forks: 0

Type:project

0.1 2016-12-01 20:50 UTC

README

License Latest Stable Version Scrutinizer Code Quality

Preview

How to install

composer create-project smetdenis/csvimport:1.x-dev --no-dev
./csvimport/bin/csvimport help

How to run

From file

./bin/csvimport csv:insert                      \
    --config=./tests/fixtures/config.php        \
    --source-file=./tests/fixtures/random.csv   \
    -vvv

Or pipeline

cat ./tests/fixtures/random.csv | ./bin/csvimport csv:insert    \
    --config=./tests/fixtures/config.php                        \
    -vvv

Unit tests and check code style

# prepare dev build
make

# Run all unit tests
make test-all

# Run tests manually
./bin/csvimport csv:create                  \ 
    --config=./tests/fixtures/config.php    \
    --lines=10000                           \
|                                           \
./bin/csvimport csv:insert                  \
    --config=./tests/fixtures/config.php    \
    -vvv

License

MIT