fileboy/raw.go

161 lines
6.0 KiB
Go
Raw Normal View History

2018-09-10 08:23:27 +00:00
package main
2018-12-30 07:59:38 +00:00
import "strconv"
2018-09-10 08:23:27 +00:00
var exampleFileGirl string = `#
core:
#
version: 1
#
monitor:
#
# test1 test1
# test1/test2 test1/test2
# test1,* test1
# .,*
includeDirs:
- .,*
#
# .idea .idea
exceptDirs:
- .idea
- .git
- .vscode
2018-09-19 03:43:16 +00:00
- node_modules
- vendor
2018-09-10 08:23:27 +00:00
2018-09-12 03:11:32 +00:00
# command
# .go .go command
# .* command
2018-09-10 08:23:27 +00:00
types:
- .go
2020-11-10 09:33:45 +00:00
# command
2020-11-10 09:13:49 +00:00
# .DS_Store .DS_Store command
2020-11-10 09:24:14 +00:00
exceptTypes:
2020-11-10 09:13:49 +00:00
- .DS_Store
2018-09-10 08:23:27 +00:00
2019-12-04 03:50:11 +00:00
# command
#
# write
# rename
# remove
# create
# chmod (unix)
events:
- write
- rename
- remove
- create
- chmod
2018-09-10 08:23:27 +00:00
#
command:
#
#
#
#
2019-01-02 08:22:11 +00:00
# ,
2018-09-19 03:43:16 +00:00
# {{file}} ( a.txt test/test2/a.go)
# {{ext}} ( .go)
2019-12-17 08:38:14 +00:00
# {{event}} (events, write)
2018-09-19 03:43:16 +00:00
# {{changed}} (, 1537326690523046400)
# 使cp {{file}} /root/sync -rf myCommand --{{ext}} {{changed}}
2018-09-10 08:23:27 +00:00
exec:
- go version
- go env
2019-01-19 09:30:33 +00:00
# xx
2019-12-17 08:38:14 +00:00
# (A)(t), (B), A
# BZtZ
#
# 0
2019-01-08 07:51:02 +00:00
delayMillSecond: 2000
2019-01-02 11:07:52 +00:00
#
notifier:
# url POST json
# command
2019-01-03 02:19:33 +00:00
# 15
2019-01-02 11:07:52 +00:00
# POST :
# Content-Type: application/json;charset=UTF-8
2020-10-17 02:29:33 +00:00
# User-Agent: FileBoy Net Notifier v1.16
2019-12-17 08:38:14 +00:00
# Body: {"project_folder":"/project/path","file":"main.go","changed":1576567861913824940,"ext":".go","event":"write"}
2019-01-03 02:19:33 +00:00
# : http://example.com/notifier/fileboy-listener
2019-01-19 09:30:33 +00:00
# ""
2019-01-02 11:07:52 +00:00
callUrl: ""
2020-03-03 03:37:20 +00:00
#
instruction:
# command
#
# exec-when-start fileboy 'exec'
# should-finish 'exec' (C)(L)退 L 退 kill L exit code
# L 退(N) C N
# ignore-stdout 'exec' stdout
# ignore-warn fileboy warn
# ignore-info fileboy info
# ignore-exec-error 'exec' 退
#- should-finish
#- exec-when-start
- ignore-warn
2018-09-10 08:23:27 +00:00
`
2018-09-10 10:00:28 +00:00
var firstRunHelp = ` fileboy ?
fileboy init
2019-01-03 02:19:33 +00:00
使 fileboy help
2018-09-10 10:00:28 +00:00
`
2018-09-10 08:23:27 +00:00
var helpStr = `fileboy [option]
Usage of fileboy:
filegirl.yaml
init
fileboy, filegirl.yaml
exec
2018-09-12 03:11:32 +00:00
command
2020-03-16 03:16:14 +00:00
daemon
2019-12-23 08:13:31 +00:00
filegirl.yaml
stop
2020-11-11 07:01:36 +00:00
profile
2018-09-30 01:43:14 +00:00
version
2018-12-30 07:59:38 +00:00
2018-09-10 08:23:27 +00:00
`
var englishSay = []string{
` Have you, the darkness is no darkness.`,
` Why do the good girls always love bad boys?`,
` If love is not madness.`,
` This world is so lonely without you.`,
` You lie. Silence in front of me.`,
` I need him like I need the air to breathe.`,
` Happiness is when the desolated soul meets love.`,
` What I can lose, but do not want to lose you.`,
` The same words, both miss, is also missed.`,
` Each bathed in the love of the people is a poet.`,
}
var logo = `
_______ _____ _ _______ ______ _____ _ _
(_______|_____) | (_______|____ \ / ___ \| | | |
_____ _ | | _____ ____) ) | | | |___| |
| ___) | | | | | ___) | __ (| | | |\_____/
| | _| |_| |_____| |_____| |__) ) |___| | ___
2020-10-17 02:29:33 +00:00
|_| (_____)_______)_______)______/ \_____/ (___) V1.16
2018-12-30 07:59:38 +00:00
`
var statement = `Dengsgo [dengsgo@gmail.com] Open Source with MIT License`
var versionDesc = `
2020-10-17 02:29:33 +00:00
Version fileboy: v1.16 filegirl: v` + strconv.Itoa(Version) + `
Released 2020.10.17
2018-12-30 07:59:38 +00:00
Licence MIT
Author dengsgo [dengsgo@gmail.com]
Website https://github.com/dengsgo/fileboy
Blog https://www.yoytang.com
2018-09-10 08:23:27 +00:00
`