webysther/dimep

Dimep time card generator

dev-master 2017-10-24 10:15 UTC

README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Create time card from dimep

Install

Via Composer

$ composer require webysther/dimep
php bin/dimep show --help

# current month
php bin/dimep show --transform

# range
php bin/dimep show --start-date='2017-10-01' --finish-date='2017-10-25' --transform

Via Docker (used to contributing)

1 - Install docker

curl -sSL https://get.docker.com/ | sh

2 - Build docker image

bash build.sh

3 - Access container to work

docker run --rm -it --user=`id -u $USER`:`id -g` \
            --workdir=/code \
            -v $(pwd):/code \
            -v /etc/passwd:/etc/passwd:ro \
            -v /etc/group:/etc/group:ro 
            dimep bash

4 - Install and use

composer install
php bin/dimep show --help

Usage

Via docker (recommended)

1 - Add to your ~/.bashrc or ~/.zshrc

dimep(){
  docker run --rm -it --net=host \
    -e DB_HOST='change-host-database-dimep' \
    -e DB_USER='database-user' \
    -e DB_PASSWORD='database-pass' \
    -e DB_NAME='database-name' \
    # user credential
    -e USER_CREDENTIAL=000000 \
    webysther/dimep $@
}

# reload
source ~/.bashrc
# or
source ~/.zshrc

2 - Execute

# Current month without format
dimep

# Current month with format
dimep --tranform

# Date range
dimep --start-date='2017-10-01' --finish-date='2017-10-25'

# You can ommit start or finish date
dimep --start-date='2017-10-10'
dimep --finish-date='2017-10-15' --transform

Requirements

The following versions of PHP are supported by this version.

  • PHP 7.0
  • PHP 7.1

Testing

composer qa:paratest

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Credits

License

Public domain. Please see License File for more information.