项目作者: hopeua

项目描述 :
Directory Synchronization
高级语言: PHP
项目地址: git://github.com/hopeua/dir-sync.git
创建时间: 2014-11-05T11:10:51Z
项目社区:https://github.com/hopeua/dir-sync

开源协议:MIT License

下载


Directory Synchronizer

Test passing
Scrutinizer Code Quality
Code Coverage
SensioLabs Insight

Console tool to synchronize files in two directories.

Usage

Install

  1. git clone https://github.com/HopeUA/dir-sync.git dir-sync
  2. cd dir-sync
  3. composer install --optimize-autoloader

Configure

Write your configuration to app/config/parameters.yml

  1. app.name: app
  2. app.master.storage: local
  3. app.master.path: /master
  4. app.master.filters:
  5. path:
  6. pattern: '~[a-z]\.mp4~'
  7. excludeEpisodes:
  8. path: '/path/to/file.json'
  9. app.slave.storage: local
  10. app.slave.path: /slave
  11. app.slave.path_tpl: /__program__/__uid__
  12. app.slave.filters: null
  13. app.logger: file
  14. file.log.path: %kernel.logs_dir%/sync.log

Run tests

  1. composer test

Schedule

Add new cronjob to run synchronization periodically

  1. php bin/console sync:run

Monitor

Default logs location – var/logs/sync.log