k-trainer

2.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i k-trainer

Homepage

404mzk.com/

Weekly Downloads

1

Version

2.0.2

License

MIT

Last publish

Collaborators

  • maizhikun