curl json string with variable All In One
json
# 设置 env
LANGUAGE="zh-CN"
UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4343.0 Safari/537.36"
SH_DATE=$(TZ=':Asia/Shanghai' date '+%Y-%m-%d %T');
echo "✅ SH_DATE = ${SH_DATE}"
JSON='
{
"msgtype": "text",
"text": {
"content": " 阅读打卡了 '${SH_DATE}'",
}
}';
markdown
# 设置 env
LANGUAGE="zh-CN"
UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4343.0 Safari/537.36"
SH_DATE=$(TZ=':Asia/Shanghai' date '+%Y-%m-%d %T');
echo "✅ SH_DATE = ${SH_DATE}"
MARKDOWN='
{
"msgtype": "markdown",
"markdown": {
"content": "⏰ '$SH_DATE'\n\n<font color=\"warning\">读书会快捷链接</font>\n\n[<font color=\"info\">阅读打卡链接</font>](https://library.xgqfrms.xyz/#/club/share)\n\n",
"mentioned_list":["@all"],
}
}'
refs
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 ️,侵权必究⚠️!