- git clone [email protected]:artemBilik/hotels-test.git
- cd hotels-test
- docker build -t hotels-test ./
- docker run -it hotels-test /bin/bash
- cd /app
- php src/main.php 'file(csv,/app/instance/hotels.csv)' 'group(name,sum)' 'file(json,/app/instance/sum-by-name.json)'
- php src/main.php 'reader' 'command' 'writer'
- type(encoder,path)
- type - file, db, etc
- encoder - csv, xml, json
- path - путь к файлу или к бд
- file(csv,/app/instance/hotels.csv)
- command(field,param)
- command - order, group
- field - name, url, star (поле отеля)
- param - direction для order (ask, desc) или функция аггрегации для group (avg, sum, cnt)
- group|order(name|url|star,(order(ask|desc)|group(avg,sum,cnt)))
- type(encoder,path)
- type - file, db, etc
- encoder - csv, xml, json
- path - путь к файлу или к бд
- file(xml|json,/app/instance/order-by-url-desc.csv)