Skip to content

Commit

Permalink
防止重复打开
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzxs committed Aug 19, 2023
1 parent 59bc495 commit d77108b
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 8 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
### 介绍
`cherry-snippet` 是借助 [cherryTree](https://www.giuspen.com/cherrytree/) 笔记软件,制作的免费开源**文本片段管理工具**

****: 目前还处于beta版本, 稳定版本[cherry-snippet v1](https://github.com/sxzxs/cherry-snippet)

*v1->v2 改进: 用webview2预览、 d2d绘制hook界面、list列表增加图标*

* 代码片段**记录****快搜****预览**
Expand All @@ -23,14 +21,15 @@
|-|-|
|系统|开启html预览需要**win10**或者安装 **[webview2 runtime](https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/3c9f7ac6-fb0a-4eb7-b1fd-44c57613a3f5/MicrosoftEdgeWebView2RuntimeInstallerX64.exe)**|
|ahk 版本| [autohotkey v2H](https://github.com/thqby/AutoHotkey_H/releases)|
|cherryTree.exe|[cherryTee定制 百度网盘](https://pan.baidu.com/s/1uDmzAsB_tgwexUccUjM0uA?pwd=bet2) 提取码:bet2 <br> [cherryTree定制 蓝奏云](https://wwob.lanzoum.com/iWmdr0mpjnfa) 密码:1bkm
|cherryTree.exe|[cherryTree定制 蓝奏云](https://wwob.lanzoum.com/iq85Y15stpmb) 密码:cxue
|dx| [dx11 依赖下载](https://zhangyue667.lanzouh.com/DirectXRepairEnhanced)|

### 安装步骤
1. 下载zip,或者git clone后, 执行 cherry-snippet.ah2或者cherrysnippet.exe
2. 第一次执行会提示选择cherryTree.exe和data.ctb的目录(cherrytree_0.99.51.0_win64_portable\mingw64\bin\cherrytree.exe)

### 使用说明
首次编辑时,需要右键托盘图标点击编辑,打开cherryTree.exe后需要设置关闭退出并保存设置,后续节点跳转不需要
[按键列表](https://wyagd001.github.io/v2/docs/KeyList.htm#general)
##### 普通搜索模式
* 打开搜索界面, 默认 shift+enter
Expand Down
12 changes: 11 additions & 1 deletion cherry-snippet.ah2
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
;===============================================================================
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@@@@@@@%@@@@@@%##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%@@@@@@@@@@@@@@@@@@@@@@=%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@
;@@@@++****+.@@@*.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+****=:@@@@@@@@@@@@@@@@@@@+%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%:@@@@@@@
;@@@-+@@@@@%+@@@%.****+%@@@@@******%@@@@%*=##****@@@#*=##**+*@@#=+%@@@#==%@@:+@@@@@*@@@#=******@@@@@%**+#@@@@@#++#*****%@@#++#*****@@@@@#*****#@@@@*+.****#@@
;@@#:@@@@@@@@@@@%.*@@@%:%@@%-+%@@%#-+@@@@@-:*%@@%@@@@@-:*%@@%@@@#:%@@@%:#@@@%+****#@@@@@-:%@@@-=@@@@@@@:+@@@@@@# *%@@@#-#@@* *%@@@*-#@@-=%@@@#-=@@@@%.@@@@@@@
;@@%:@@@@@@@@@@@%:@@@@@:%@@*.##***#*+@@@@@=*@@@@@@@@@@-*@@@@@@@@@%:#@#:%@@@@@@@@@@#:%@@@=*@@@@*=@@@@@@@-*@@@@@@#.@@@@@@=-@@*:@@@@@@-=@# ##***##+@@@@%.@@@@@@@
;@@@*=#%@@%#=%@@#.%@@@%.#@@@=+%@@@@%%@@@%%-=%%%@@@@@%%:+%%%@@@@@@@%-+-%@@@@#.#@@@@#:%@@%-=@@@@=-@@@@%%%:=%%%@@@# =#%%%+-%@@* +#%%#+=@@@+=%@@@@%#@@@@%.%@@@%%@
;@@@@@******%@@%***@@@***%@@@#******%@@@#******%@@@@*******%@@@@@@@#.@@@@@@@*******@@@@#**#@@%**#@@@*******#@@@#:@#**##@@@@*-@#**#%@@@@@%******#@@@@@%*****#@
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##*:*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+:##@@@@@@@#=:##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%@@@@@@@%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;===============================================================================
; cherry-snippet 代码片段管理工具
; Tested on AHK v2.0.2 Unicode 64-bit, Windows /10
; github https://github.com/sxzxs/cherry-snippet-v2
Expand Down
Binary file modified cherry-snippet.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion config/data2html.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"is_log_open": 1,
"is_out_file": 1,
"is_use_editor": 0,
"last_html_export_time": "20230807164000"
"last_html_export_time": "20230819110555"
}
65 changes: 65 additions & 0 deletions config/py_map.bin
Original file line number Diff line number Diff line change
Expand Up @@ -3253,5 +3253,70 @@
"1": " | @code.exe-GUANBIQITA | @code.exe-GUANBIJITA",
"2": " | @code.exe-GBJT | @code.exe-GBQT",
"all": "@code.exe-关闭其他 | @code.exe-GUANBIQITA | @code.exe-GUANBIJITA | @code.exe-GBJT | @code.exe-GBQT"
},
"2023-八月-08 周二": {
"1": " | 2023-BAYUE-08 ZHOUER",
"2": " | 2023-BY-08 ZE",
"all": "2023-八月-08 周二 | 2023-BAYUE-08 ZHOUER | 2023-BY-08 ZE"
},
"@网站文件夹-文档": {
"1": " | @WANGZHANWENJIANJIA-WENDANG | @WANGZHANWENJIANGA-WENDANG",
"2": " | @WZWJG-WD | @WZWJJ-WD",
"all": "@网站文件夹-文档 | @WANGZHANWENJIANJIA-WENDANG | @WANGZHANWENJIANGA-WENDANG | @WZWJG-WD | @WZWJJ-WD"
},
"2023-八月-09 周三": {
"1": " | 2023-BAYUE-09 ZHOUSAN",
"2": " | 2023-BY-09 ZS",
"all": "2023-八月-09 周三 | 2023-BAYUE-09 ZHOUSAN | 2023-BY-09 ZS"
},
"2023-八月-10 周四": {
"1": " | 2023-BAYUE-10 ZHOUSI",
"2": " | 2023-BY-10 ZS",
"all": "2023-八月-10 周四 | 2023-BAYUE-10 ZHOUSI | 2023-BY-10 ZS"
},
"2023-八月-11 周五": {
"1": " | 2023-BAYUE-11 ZHOUWU",
"2": " | 2023-BY-11 ZW",
"all": "2023-八月-11 周五 | 2023-BAYUE-11 ZHOUWU | 2023-BY-11 ZW"
},
"@网站文件夹-文字转语音": {
"1": " | @WANGZHANWENJIANJIA-WENZIZHUANYUYIN | @WANGZHANWENJIANGA-WENZIZHUANYUYIN | @WANGZHANWENJIANJIA-WENZIZHUAIYUYIN | @WANGZHANWENJIANGA-WENZIZHUAIYUYIN",
"2": " | @WZWJG-WZZYY | @WZWJJ-WZZYY",
"all": "@网站文件夹-文字转语音 | @WANGZHANWENJIANJIA-WENZIZHUANYUYIN | @WANGZHANWENJIANGA-WENZIZHUANYUYIN | @WANGZHANWENJIANJIA-WENZIZHUAIYUYIN | @WANGZHANWENJIANGA-WENZIZHUAIYUYIN | @WZWJG-WZZYY | @WZWJJ-WZZYY"
},
"2023-八月-12 周六": {
"1": " | 2023-BAYUE-12 ZHOULU | 2023-BAYUE-12 ZHOULIU",
"2": " | 2023-BY-12 ZL",
"all": "2023-八月-12 周六 | 2023-BAYUE-12 ZHOULU | 2023-BAYUE-12 ZHOULIU | 2023-BY-12 ZL"
},
"@ahk-输入法切换": {
"1": " | @ahk-SHURUFAQIEHUAN",
"2": " | @ahk-SRFQH",
"all": "@ahk-输入法切换 | @ahk-SHURUFAQIEHUAN | @ahk-SRFQH"
},
"2023-八月-14 周一": {
"1": " | 2023-BAYUE-14 ZHOUYI",
"2": " | 2023-BY-14 ZY",
"all": "2023-八月-14 周一 | 2023-BAYUE-14 ZHOUYI | 2023-BY-14 ZY"
},
"2023-八月-15 周二": {
"1": " | 2023-BAYUE-15 ZHOUER",
"2": " | 2023-BY-15 ZE",
"all": "2023-八月-15 周二 | 2023-BAYUE-15 ZHOUER | 2023-BY-15 ZE"
},
"2023-八月-16 周三": {
"1": " | 2023-BAYUE-16 ZHOUSAN",
"2": " | 2023-BY-16 ZS",
"all": "2023-八月-16 周三 | 2023-BAYUE-16 ZHOUSAN | 2023-BY-16 ZS"
},
"2023-八月-17 周四": {
"1": " | 2023-BAYUE-17 ZHOUSI",
"2": " | 2023-BY-17 ZS",
"all": "2023-八月-17 周四 | 2023-BAYUE-17 ZHOUSI | 2023-BY-17 ZS"
},
"2023-八月-19 周六": {
"1": " | 2023-BAYUE-19 ZHOULU | 2023-BAYUE-19 ZHOULIU",
"2": " | 2023-BY-19 ZL",
"all": "2023-八月-19 周六 | 2023-BAYUE-19 ZHOULU | 2023-BAYUE-19 ZHOULIU | 2023-BY-19 ZL"
}
}
2 changes: 1 addition & 1 deletion config/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"key_quick_switch_node": "~$^e",
"key_send": "~$^enter",
"key_hook_with_exe_name": "CapsLock",
"last_parse_time": "20230807170040",
"last_parse_time": "20230819131527",
"python_path": "C:\\Python310\\python.exe",
"tooltip_back_color": "0x1E1E1E",
"tooltip_font_size": "15",
Expand Down
Binary file added tool/ai.zip
Binary file not shown.
27 changes: 27 additions & 0 deletions tool/ai/ai.ah2
Original file line number Diff line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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#SingleInstance Force
#include <log>
#include <ComVar>
Expand Down
2 changes: 1 addition & 1 deletion tool/set-v2/imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Size=400,400
Collapsed=0

[Window][设置]
ViewportPos=852,204
ViewportPos=785,272
ViewportId=0xB5C7B82D
Size=750,528
Collapsed=0
Expand Down
3 changes: 2 additions & 1 deletion utility/Zmq_send2cherry.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ class Zmq_send2cherry
try
{
command := '"' cfg['cherry_tree_path'] '" "' cfg['db_path'] '"'
if(!IsSet(data))
Run(command)
if(IsSet(data))
zmq_send_string(this.socket, data,, ZMQ_DONTWAIT)
Run(command)
}
}
}

0 comments on commit d77108b

Please sign in to comment.