1
0
mirror of https://github.com/FloatTech/zbpdata.git synced 2026-02-15 11:49:35 +09:00

Compare commits

...

8 Commits

Author SHA1 Message Date
himawari
0899cf2973 添加qqci模板 (#24) 2022-07-17 22:16:50 +08:00
himawari
fa6b84b049 添加日语学习数据库 (#23)
 添加日语学习数据库
2022-06-25 01:57:58 +08:00
Coloured-glaze
8408fdbc44 更新素材 (#22) 2022-06-24 21:04:10 +08:00
莫思潋
5941ec6108 增加塔罗牌阵数据 (#21)
* 上传tarot.json

* 添加塔罗牌阵
2022-06-19 00:01:07 +08:00
源文雨
5ce4b48c12 Merge branch 'main' of https://github.com/FloatTech/zbpdata into main 2022-06-04 17:58:53 +08:00
源文雨
1241829ec1 change reg host 2022-06-04 17:58:13 +08:00
源文雨
66289a0ad9 Add files via upload 2022-06-01 19:28:36 +08:00
himawari
291200d5d4 添加文静示例音频 (#20)
*  添加文静示例音频
2022-05-10 01:04:11 +08:00
8 changed files with 245 additions and 1 deletions

BIN
Fortune/ASoul.zip Normal file

Binary file not shown.

Binary file not shown.

BIN
MockingBird/wj.wav Normal file

Binary file not shown.

BIN
Nihongo/nihongo.db Normal file

Binary file not shown.

23
Qqci/Makefile.tpl Normal file
View File

@@ -0,0 +1,23 @@
SHELL=/bin/bash
APPNAME ?= {{.Appname}}
PKGNAME ?= $(APPNAME).tar.gz
BUILD_DIR = $(shell pwd)
TEMP_OUTPUT_DIR = $(shell pwd)/_output/$(APPNAME)
tar: build package
@echo -e "======\033[44m all done \033[0m"
build:
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(BUILD_DIR)/$(APPNAME) ./
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $(BUILD_DIR)/$(APPNAME).exe ./
package:
@-rm -rf $(TEMP_OUTPUT_DIR) >/dev/null 2>&1
mkdir -p $(TEMP_OUTPUT_DIR) >/dev/null 2>&1
cp -rL $(BUILD_DIR)/$(APPNAME) $(TEMP_OUTPUT_DIR)/
cp -rL $(BUILD_DIR)/$(APPNAME).exe $(TEMP_OUTPUT_DIR)/
cp -rL $(BUILD_DIR)/README.md $(TEMP_OUTPUT_DIR)/
cd $(TEMP_OUTPUT_DIR)/.. && tar -czf $(PKGNAME) $(APPNAME)

170
Qqci/load.tpl Normal file
View File

@@ -0,0 +1,170 @@
#!/bin/bash
approot=$(pwd)
appname={{.Appname}}
appexec={{.Command}}
isdaemon=${isdaemon:=true}
usemonitor=${usemonitor:=false}
##########################################
# main function.
##########################################
function main() {
echo "=="$(date +"%Y-%m-%d %H:%M:%S")"=="
case "$1" in
start)
$usemonitor && start_by_monitor || start_directly
;;
restart|reload)
$usemonitor && restart_by_monitor || restart_directly
;;
stop)
$usemonitor && stop_by_monitor || stop_directly
;;
install)
$usemonitor && install_with_monitor || install_no_monitor
;;
*)
echo "Usage: ./load.sh {install|start|stop|restart}"
exit 1
esac
}
##########################################
# install:
# do something before reload after deploy
##########################################
function install_no_monitor() {
##### make logs directory at app directory ##############
function isemptydir() {
[ `ls -A "$approot/logs" 2>/dev/null | wc -l` -eq 0 ] && echo true || echo false;
}
if [ ! -d $approot/logs -o $(isemptydir) == true ]; then
mkdir -p /data/logs/${appname};
rm -rf $approot/logs;
ln -s /data/logs/${appname} $approot/logs;
fi
}
function install_with_monitor() {
##### do install no monitor actions #####################
install_no_monitor
##### get the supervisor config & incloude directory ####
appmonitor=supervisor
monitconf=${SUPERVISOR_CONF:=$(find /etc -name supervisord.conf -type f 2>/dev/null)}
monitconf=${monitconf:=/etc/supervisor/supervisord.conf}
echo "The path of supervisord.conf is: '${monitconf}'"
monitinclude=${SUPERVISOR_INCLUDE:=$(grep '^\[include\]$' $monitconf -A2 | sed -n 's/^files=\([^*]*\)\(\*.conf\)*/\1/p')}
monitinclude=${monitinclude:=/etc/supervisord.d}
echo "The folder of supervisord files is: ${monitincloude}"
##### install ignore if file exist. #####################
if [ -f ${monitinclude}/${appname}.ini ]; then
echo "WARNING: install ignore, because of file '${monitinclude}/${appname}.ini' is exist"
exit 0
fi
cat >${monitinclude}/${appname}.ini <<-EOF
[program:${appname}]
command=${appexec}
process_name=%(program_name)s
numprocs=1
priority=1
directory=${approot}
autostart=true
autorestart=true
stdout_logfile=/data/logs/supervisor/%(program_name)s.log
stderr_logfile=/data/logs/supervisor/%(program_name)s.err
stdout_logfile_maxbytes=500MB
stderr_logfile_maxbytes=500MB
stdout_logfile_backups=5
stderr_logfile_backups=5
EOF
##### update supervisor & show supervisor status ########
echo "Update ing..."
supervisorctl update
echo "Update done"
echo "-----current supervisor result: -----";
supervisorctl status ${appname}
echo "-----current supervisor result done -----";
}
##########################################
# start:
# start the application
##########################################
function start_directly() {
if $isdaemon; then
#### start app backgroud #####
nohup $appexec &
echo $! > $approot/logs/pid
wait $!
else
#### start app frontgroud ####
rm -f $approot/logs/stoped
while [ ! -f $approot/logs/stoped ]; do
$appexec
sleep 30
done
fi
}
function start_by_monitor() {
echo "Start application ...";
supervisorctl start ${appname}
sleep 0.2;
echo "-----current supervisor result: -----";
supervisorctl status ${appname}
echo "-----current supervisor result done -----";
echo "START DONE";
}
##########################################
# stop:
# stop the application
##########################################
function stop_directly() {
#### check pid file ############
if [ ! -f $approot/logs/pid ]; then
echo "ERROR: no pid file: '$approot/logs/pid'"
return 1
fi
#### check cmdline ############
local pid=$(cat $approot/logs/pid)
if [ -z $pid ] || [ "$(/proc/$pid/cmdline)"x == "$appexec"x ]; then
echo "ERROR: pid($pid) is invalid or command line mismatch";
return 1
fi
#### do stop ##################
echo "stoped at: $(date +'%Y-%m-%d %H:%M:%S')" > $approot/logs/stoped
kill -9 $pid
}
function stop_by_monitor() {
echo "Stop application ...";
supervisorctl stop ${appname}
sleep 0.1;
echo "-----current supervisor result: -----";
supervisorctl status ${appname}
echo "-----current supervisor result done -----";
echo "STOP DONE"
}
##########################################
# restart:
# restart the application
##########################################
function restart_directly() {
stop_directly && start_directly
}
function restart_by_monitor() {
stop_by_monitor && start_by_monitor
}
#############################################
############## run ##########################
main $@
#############################################

51
Tarot/formation.json Normal file
View File

@@ -0,0 +1,51 @@
{
"圣三角": {
"cards_num": 3,
"is_cut": false,
"represent": [
["现状", "愿望", "行动"]
]
},
"时间之流": {
"cards_num": 3,
"is_cut": true,
"represent": [
["过去", "现在", "未来", "问卜者的主观想法"]
]
},
"四要素": {
"cards_num": 4,
"is_cut": false,
"represent": [
["火,象征行动,行动上的建议", "气,象征言语,言语上的对策", "水,象征感情,感情上的态度", "土,象征物质,物质上的准备"]
]
},
"五牌阵": {
"cards_num": 5,
"is_cut": true,
"represent": [
["现在或主要问题", "过去的影响", "未来", "主要原因", "行动可能带来的结果"]
]
},
"吉普赛十字": {
"cards_num": 5,
"is_cut": false,
"represent": [
["对方的想法", "你的想法", "相处中存在的问题", "二人目前的环境", "关系发展的结果"]
]
},
"马蹄": {
"cards_num": 6,
"is_cut": true,
"represent": [
["现状", "可预知的情况", "不可预知的情况", "即将发生的", "结果", "问卜者的主观想法"]
]
},
"六芒星": {
"cards_num": 7,
"is_cut": true,
"represent": [
["过去", "现在", "未来", "对策", "环境", "态度", "预测结果"]
]
}
}

View File

@@ -39,7 +39,7 @@ func main() {
*(*unsafe.Pointer)(unsafe.Pointer(&md5s[i])) = unsafe.Pointer(&buf)
*(*uintptr)(unsafe.Add(unsafe.Pointer(&md5s[i]), unsafe.Sizeof(uintptr(0)))) = uintptr(16)
}
r := registry.NewRegedit("reilia.westeurope.cloudapp.azure.com:32664", "fumiama", os.Getenv("REILIA_SPS"))
r := registry.NewRegedit("reilia.fumiama.top:32664", "fumiama", os.Getenv("REILIA_SPS"))
err := r.Connect()
if err != nil {
panic(err)