Skip to content
Help you faster to complete daily operation command and upload
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Bin
Demo
Docs
Src
Tests/Src
.babelrc
README.md
demo.json
package.json

README.md

K-Trainer

Help you faster to complete daily operation command and upload

Install

npm install -g k-trainer

Use

k-trainer -d ./ // cp demo.json to ./
k-trainer -j demo.json or k-trainer -j demo.json -g mzk

Command

k-trainer --help
Usage /usr/local/bin/k-trainer -j {json_file} -g {[group_name...]}

Options:
  --json, -j   config.json path                                         [string]
  --group, -g  execute group, type is array|string         [array] [default: []]
  --demo, -d   get a demo, config.json, set a path                      [string]
  --help       Show help                                               [boolean]

API

options.data

key
real boolean, default is true,The object is valid?
path Listening to the specified file path (recommend absolute path)
type ftp or shell
execute start or auto
time 1. And only when the execute for auto works 2. auto for training in rotation (minimum of 5000) 3. unit is the second time
You can now import Markdown table cod

Demo

{
    "shell_concurrency": 1, //shell parallel num
    "data": [
        {
            "real": false,
            "path": "/Users/maizhikun",
            "type": "ftp",
            "execute": "change"
        },
        {
            "group": "mzk",
            "type": "shell",
            "shell": {
                "command": "echo",
                "args": ["one"],
                "options": {
                    "cwd": "/Users/maizhikun/"
                }
            },
            "execute": "start"
        },
        {
            "group": "mzk",
            "type": "shell",
            "shell": {
                "command": "echo two && echo three",
                "options": {
                    "cwd": "/Users/maizhikun/"
                }
            },
            "execute": "auto",
            "time": 3000
        }
    ]
}

or

look demo

FTP Setting

ftp will find sftp-config.json in "path" until "/"

tips: sftp-config.json demo

FTP Requirements

if you need FTP uoload ,You need to have the executable lftp installed on your computer.

LFTP Homepage

Windows (Chocolatey)

C:\> choco install lftp

OSX (Homebrew)

sudo brew install lftp

Linux

sudo apt-get install lftp
# or
sudo yum install lftp
You can’t perform that action at this time.