mirror of
https://github.com/easychen/checkchan-dist.git
synced 2026-08-28 17:45:05 +08:00
支持带有文字的价格比较
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
|
||||
## 最新版本
|
||||
|
||||
- 插件·Chrome/Edge:2022.05.31.14.20 [下载](ckc.zip)
|
||||
- 自架云端Docker镜像:2022.05.30.11.14 [Docker Hub](https://hub.docker.com/repository/docker/easychen/checkchan)
|
||||
- 插件·Chrome/Edge:2022.05.31.15.26 [下载](ckc.zip)
|
||||
- 自架云端Docker镜像:2022.05.31.15.24 [Docker Hub](https://hub.docker.com/repository/docker/easychen/checkchan)
|
||||
- 远程桌面版Docker镜像:[Docker Hub](https://hub.docker.com/repository/docker/easychen/checkchan-chrome)
|
||||
- 文档:2022.05.31.14.20
|
||||
- 文档:2022.05.31.15.26
|
||||
- 更新日志:[GitHub](https://github.com/easychen/checkchan-dist/commits/main)
|
||||
|
||||
自架云端 Docker 命令( 将`API Key`从`YouRAPiK1`替换成`任意你想要的安全密码不要带$`):
|
||||
@@ -27,7 +27,11 @@ docker run -e API_KEY=YouRAPiK1 -e TZ=Asia/Chongqing -e ERROR_IMAGE=NORMAL -p 80
|
||||
* 特别提醒1:`/data`挂载的目录需要写权限
|
||||
* 特别提醒2:此镜像为x86架构,arm架构镜像可[拉取源码](https://github.com/easychen/checkchan-dist/tree/main/docker)自行构建
|
||||
|
||||
## 官方视频教程
|
||||
|
||||
[](https://www.bilibili.com/video/BV1K94y1m7tt)
|
||||
|
||||
[详细版,近2小时](https://www.bilibili.com/video/BV1K94y1m7tt)
|
||||
|
||||
## 什么是「Check酱」
|
||||
|
||||
@@ -49,6 +53,7 @@ Check酱的原理是,通过浏览器插件后台打开网页进行监测,从
|
||||
|
||||

|
||||
|
||||
|
||||
## 插件的安装和使用
|
||||
|
||||
插件可以独立使用,只是关掉后定时监测任务不执行。
|
||||
|
||||
@@ -27,7 +27,11 @@ docker run -e API_KEY=YouRAPiK1 -e TZ=Asia/Chongqing -e ERROR_IMAGE=NORMAL -p 80
|
||||
* 特别提醒1:`/data`挂载的目录需要写权限
|
||||
* 特别提醒2:此镜像为x86架构,arm架构镜像可[拉取源码](https://github.com/easychen/checkchan-dist/tree/main/docker)自行构建
|
||||
|
||||
## 官方视频教程
|
||||
|
||||
[](https://www.bilibili.com/video/BV1K94y1m7tt)
|
||||
|
||||
[详细版,近2小时](https://www.bilibili.com/video/BV1K94y1m7tt)
|
||||
|
||||
## 什么是「Check酱」
|
||||
|
||||
@@ -49,6 +53,7 @@ Check酱的原理是,通过浏览器插件后台打开网页进行监测,从
|
||||
|
||||

|
||||
|
||||
|
||||
## 插件的安装和使用
|
||||
|
||||
插件可以独立使用,只是关掉后定时监测任务不执行。
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"2022.05.30.11.14"
|
||||
"2022.05.31.15.24"
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
const fs = require("fs");
|
||||
const dayjs = require("dayjs");
|
||||
const { monitor_auto, send_notify, get_data_dir, cron_check, logstart, logit, to_markdown, short } = require("./func");
|
||||
const { monitor_auto, send_notify, get_data_dir, cron_check, logstart, logit, to_markdown, short, makeFloat } = require("./func");
|
||||
|
||||
const data_file = get_data_dir() + 'data.json';
|
||||
const content = fs.readFileSync( data_file );
|
||||
@@ -138,17 +138,17 @@ for( const item of to_checks )
|
||||
|
||||
if( item.compare_op == 'eq' && !(check_content == the_value)) can_send_notice = false;
|
||||
|
||||
if( item.compare_op == 'gt' && !(parseFloat(check_content) > parseFloat(the_value||0))) can_send_notice = false;
|
||||
if( item.compare_op == 'gt' && !(makeFloat(check_content) > makeFloat(the_value||0))) can_send_notice = false;
|
||||
|
||||
if( item.compare_op == 'gte' && !(parseFloat(check_content) >= parseFloat(the_value||0))) can_send_notice = false;
|
||||
if( item.compare_op == 'gte' && !(makeFloat(check_content) >= makeFloat(the_value||0))) can_send_notice = false;
|
||||
|
||||
if( item.compare_op == 'lt' && !(parseFloat(check_content) < parseFloat(the_value||0))) can_send_notice = false;
|
||||
if( item.compare_op == 'lt' && !(makeFloat(check_content) < makeFloat(the_value||0))) can_send_notice = false;
|
||||
|
||||
if( item.compare_op == 'lte' && !(parseFloat(check_content) <= parseFloat(the_value||0))) can_send_notice = false;
|
||||
if( item.compare_op == 'lte' && !(makeFloat(check_content) <= makeFloat(the_value||0))) can_send_notice = false;
|
||||
|
||||
// console.log("op:",check_content,item.compare_op,the_value,can_send_notice);
|
||||
|
||||
logit("op:"+parseFloat(check_content)+' '+item.compare_op+' '+parseFloat(the_value||0)+' '+can_send_notice);
|
||||
logit("op:"+makeFloat(check_content)+' '+item.compare_op+' '+makeFloat(the_value||0)+' '+can_send_notice);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,13 @@ function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
function makeFloat( n )
|
||||
{
|
||||
return parseFloat(String(n).match(/([0-9.]+)/i)[0]);
|
||||
}
|
||||
|
||||
exports.makeFloat = makeFloat;
|
||||
|
||||
exports.short = short;
|
||||
|
||||
function short( maybe_string , len = 0 )
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
+6
-3
@@ -20,10 +20,10 @@
|
||||
</ol>
|
||||
<h2>最新版本</h2>
|
||||
<ul>
|
||||
<li>插件·Chrome/Edge:2022.05.31.14.20 <a href="ckc.zip">下载</a></li>
|
||||
<li>自架云端Docker镜像:2022.05.30.11.14 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>插件·Chrome/Edge:2022.05.31.15.26 <a href="ckc.zip">下载</a></li>
|
||||
<li>自架云端Docker镜像:2022.05.31.15.24 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>远程桌面版Docker镜像:<a href="https://hub.docker.com/repository/docker/easychen/checkchan-chrome" rel="nofollow">Docker Hub</a></li>
|
||||
<li>文档:2022.05.31.14.20</li>
|
||||
<li>文档:2022.05.31.15.26</li>
|
||||
<li>更新日志:<a href="https://github.com/easychen/checkchan-dist/commits/main">GitHub</a></li>
|
||||
</ul>
|
||||
<p>自架云端 Docker 命令( 将<code class="notranslate">API Key</code>从<code class="notranslate">YouRAPiK1</code>替换成<code class="notranslate">任意你想要的安全密码不要带$</code>):</p>
|
||||
@@ -33,6 +33,9 @@
|
||||
<li>特别提醒1:<code class="notranslate">/data</code>挂载的目录需要写权限</li>
|
||||
<li>特别提醒2:此镜像为x86架构,arm架构镜像可<a href="https://github.com/easychen/checkchan-dist/tree/main/docker">拉取源码</a>自行构建</li>
|
||||
</ul>
|
||||
<h2>官方视频教程</h2>
|
||||
<p><a href="https://www.bilibili.com/video/BV1K94y1m7tt" rel="nofollow"><img src="image/20220531151537.png" alt="" style="max-width: 100%;"></a></p>
|
||||
<p><a href="https://www.bilibili.com/video/BV1K94y1m7tt" rel="nofollow">详细版,近2小时</a></p>
|
||||
<h2>什么是「Check酱」</h2>
|
||||
<p><a target="_blank" rel="noopener noreferrer" href="image/20220521132637.png"><img src="image/20220521132637.png" alt="" style="max-width: 100%;"></a></p>
|
||||
<p>Check酱是方糖气球出品的网页内容监测工具,它包含一个Edge/Chrome<strong>浏览器插件</strong>和可以自行架设的<strong>云端</strong>。</p>
|
||||
|
||||
+6
-3
@@ -9,10 +9,10 @@
|
||||
</ol>
|
||||
<h2>最新版本</h2>
|
||||
<ul>
|
||||
<li>插件·Chrome/Edge:2022.05.31.14.20 <a href="ckc.zip">下载</a></li>
|
||||
<li>自架云端Docker镜像:2022.05.30.11.14 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>插件·Chrome/Edge:2022.05.31.15.26 <a href="ckc.zip">下载</a></li>
|
||||
<li>自架云端Docker镜像:2022.05.31.15.24 <a href="https://hub.docker.com/repository/docker/easychen/checkchan" rel="nofollow">Docker Hub</a></li>
|
||||
<li>远程桌面版Docker镜像:<a href="https://hub.docker.com/repository/docker/easychen/checkchan-chrome" rel="nofollow">Docker Hub</a></li>
|
||||
<li>文档:2022.05.31.14.20</li>
|
||||
<li>文档:2022.05.31.15.26</li>
|
||||
<li>更新日志:<a href="https://github.com/easychen/checkchan-dist/commits/main">GitHub</a></li>
|
||||
</ul>
|
||||
<p>自架云端 Docker 命令( 将<code class="notranslate">API Key</code>从<code class="notranslate">YouRAPiK1</code>替换成<code class="notranslate">任意你想要的安全密码不要带$</code>):</p>
|
||||
@@ -22,6 +22,9 @@
|
||||
<li>特别提醒1:<code class="notranslate">/data</code>挂载的目录需要写权限</li>
|
||||
<li>特别提醒2:此镜像为x86架构,arm架构镜像可<a href="https://github.com/easychen/checkchan-dist/tree/main/docker">拉取源码</a>自行构建</li>
|
||||
</ul>
|
||||
<h2>官方视频教程</h2>
|
||||
<p><a href="https://www.bilibili.com/video/BV1K94y1m7tt" rel="nofollow"><img src="image/20220531151537.png" alt="" style="max-width: 100%;"></a></p>
|
||||
<p><a href="https://www.bilibili.com/video/BV1K94y1m7tt" rel="nofollow">详细版,近2小时</a></p>
|
||||
<h2>什么是「Check酱」</h2>
|
||||
<p><a target="_blank" rel="noopener noreferrer" href="image/20220521132637.png"><img src="image/20220521132637.png" alt="" style="max-width: 100%;"></a></p>
|
||||
<p>Check酱是方糖气球出品的网页内容监测工具,它包含一个Edge/Chrome<strong>浏览器插件</strong>和可以自行架设的<strong>云端</strong>。</p>
|
||||
|
||||
Reference in New Issue
Block a user