Skip to content

QuickCLI is a CLI project requested by Kaufland ecommerce for technical interview. It can read XML files, serialise data and store in database of your choice ( Sqlite, mysql)

Notifications You must be signed in to change notification settings

cashewcodes9/quickCLI

Repository files navigation

quick-cli-xml-parser.png

Quick-cli xml parser

A simple command line tool to parse xml files and save into a database of your choice (sqlite, mysql, postgres, mongodb).

Documentation

You can follow these steps to get started with the project.

Clone the repository

git clone git@github.com:cashewcodes9/quickCLI.git

Install the dependencies

    composer install

Create a .env file

    cp .env.example .env

Run migrations

    php artisan migrate

Run the command

The first argument of the command is path to the xml file. There is an option to select the database you want to save your xml data in. The default database is sqlite

    php quick-cli parse:xml <path-to-xml-file> --db=<database-name>

If you are using sqlite database, you can run

    php quick-cli parse:xml <path-to-xml-file>

Run the tests

A php testing framework Pest is being used to test the application. To run the tests, run the following command:

    ./vendor/bin/phpunit

PhpStan static analysis

PhpStan is a static analysis tool that helps to find bugs in the code. To run the static analysis, run the following command:

    vendor/bin/phpstan analyse app config database tests --memory-limit 500M

Help

You can list all the available commands with:

        php quick-cli list

Screenshots

Run command to save feed.xml into sqlite database

quick-cli-demo.png

Database overview

database-screenshot.png

License

Laravel Zero is an open-source software licensed under the MIT license.

About

QuickCLI is a CLI project requested by Kaufland ecommerce for technical interview. It can read XML files, serialise data and store in database of your choice ( Sqlite, mysql)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages