Skip to content

Commit a156dc9

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 4a9f9cf + a13481c commit a156dc9

File tree

8 files changed

+71
-79
lines changed

8 files changed

+71
-79
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ WYSIWYG.
6565

6666
Welcome to [SiYuan English Discussion Forum](https://liuyun.io) to learn more.
6767

68-
![feature0.png](https://b3logfile.com/file/2024/01/feature0-1orBRlI.png)
68+
![feature0.png](https://b3logfile.com/file/2025/11/feature0-GfbhEqf.png)
6969

70-
![feature51.png](https://b3logfile.com/file/2024/02/feature5-1-uYYjAqy.png)
70+
![feature51.png](https://b3logfile.com/file/2025/11/feature5-1-7DJSfEP.png)
7171

7272
## 🔮 Features
7373

README_ja_JP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ SiYuanは、プライバシーを最優先とする個人の知識管理シス
6464

6565
詳細については、[SiYuan英語ディスカッションフォーラム](https://liuyun.io)をご覧ください。
6666

67-
![feature0.png](https://b3logfile.com/file/2024/01/feature0-1orBRlI.png)
67+
![feature0.png](https://b3logfile.com/file/2025/11/feature0-GfbhEqf.png)
6868

69-
![feature51.png](https://b3logfile.com/file/2024/02/feature5-1-uYYjAqy.png)
69+
![feature51.png](https://b3logfile.com/file/2025/11/feature5-1-7DJSfEP.png)
7070

7171
## 🔮 特徴
7272

README_zh_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565

6666
思源笔记是一款隐私优先的个人知识管理系统,支持细粒度块级引用和 Markdown 所见即所得。
6767

68-
![feature0.png](https://b3logfile.com/file/2024/01/feature0-1orBRlI.png)
68+
![feature0.png](https://b3logfile.com/file/2025/11/feature0-GfbhEqf.png)
6969

70-
![feature51.png](https://b3logfile.com/file/2024/02/feature5-1-uYYjAqy.png)
70+
![feature51.png](https://b3logfile.com/file/2025/11/feature5-1-7DJSfEP.png)
7171

7272
欢迎到[思源笔记官方讨论区](https://ld246.com/domain/siyuan)了解更多。同时也欢迎关注 B3log 开源社区微信公众号 `B3log开源`
7373

kernel/go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ require (
5656
github.com/rqlite/sql v0.0.0-20250623131620-453fa49cad04
5757
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
5858
github.com/sashabaranov/go-openai v1.41.2
59-
github.com/shirou/gopsutil/v4 v4.25.9
59+
github.com/shirou/gopsutil/v4 v4.25.10
6060
github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3
61-
github.com/siyuan-note/dejavu v0.0.0-20251027015737-2f9c052b7de3
61+
github.com/siyuan-note/dejavu v0.0.0-20251101084001-fa5aa496aa40
6262
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec
6363
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97
6464
github.com/siyuan-note/filelock v0.0.0-20251010020544-2603449ff16d
@@ -94,23 +94,23 @@ require (
9494
github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect
9595
github.com/andybalholm/brotli v1.2.0 // indirect
9696
github.com/andybalholm/cascadia v1.3.3 // indirect
97-
github.com/aws/aws-sdk-go-v2 v1.39.4 // indirect
97+
github.com/aws/aws-sdk-go-v2 v1.39.5 // indirect
9898
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.2 // indirect
99-
github.com/aws/aws-sdk-go-v2/config v1.31.15 // indirect
100-
github.com/aws/aws-sdk-go-v2/credentials v1.18.19 // indirect
101-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.11 // indirect
102-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.11 // indirect
103-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.11 // indirect
99+
github.com/aws/aws-sdk-go-v2/config v1.31.16 // indirect
100+
github.com/aws/aws-sdk-go-v2/credentials v1.18.20 // indirect
101+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.12 // indirect
102+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.12 // indirect
103+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.12 // indirect
104104
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
105-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.11 // indirect
105+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.12 // indirect
106106
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.2 // indirect
107-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.2 // indirect
108-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.11 // indirect
109-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.11 // indirect
110-
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.7 // indirect
111-
github.com/aws/aws-sdk-go-v2/service/sso v1.29.8 // indirect
112-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.3 // indirect
113-
github.com/aws/aws-sdk-go-v2/service/sts v1.38.9 // indirect
107+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.3 // indirect
108+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.12 // indirect
109+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.12 // indirect
110+
github.com/aws/aws-sdk-go-v2/service/s3 v1.89.1 // indirect
111+
github.com/aws/aws-sdk-go-v2/service/sso v1.30.0 // indirect
112+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.4 // indirect
113+
github.com/aws/aws-sdk-go-v2/service/sts v1.39.0 // indirect
114114
github.com/aws/smithy-go v1.23.1 // indirect
115115
github.com/bytedance/gopkg v0.1.3 // indirect
116116
github.com/bytedance/sonic v1.14.1 // indirect

kernel/go.sum

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -56,40 +56,40 @@ github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhP
5656
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw=
5757
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM=
5858
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII=
59-
github.com/aws/aws-sdk-go-v2 v1.39.4 h1:qTsQKcdQPHnfGYBBs+Btl8QwxJeoWcOcPcixK90mRhg=
60-
github.com/aws/aws-sdk-go-v2 v1.39.4/go.mod h1:yWSxrnioGUZ4WVv9TgMrNUeLV3PFESn/v+6T/Su8gnM=
59+
github.com/aws/aws-sdk-go-v2 v1.39.5 h1:e/SXuia3rkFtapghJROrydtQpfQaaUgd1cUvyO1mp2w=
60+
github.com/aws/aws-sdk-go-v2 v1.39.5/go.mod h1:yWSxrnioGUZ4WVv9TgMrNUeLV3PFESn/v+6T/Su8gnM=
6161
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.2 h1:t9yYsydLYNBk9cJ73rgPhPWqOh/52fcWDQB5b1JsKSY=
6262
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.2/go.mod h1:IusfVNTmiSN3t4rhxWFaBAqn+mcNdwKtPcV16eYdgko=
63-
github.com/aws/aws-sdk-go-v2/config v1.31.15 h1:gE3M4xuNXfC/9bG4hyowGm/35uQTi7bUKeYs5e/6uvU=
64-
github.com/aws/aws-sdk-go-v2/config v1.31.15/go.mod h1:HvnvGJoE2I95KAIW8kkWVPJ4XhdrlvwJpV6pEzFQa8o=
65-
github.com/aws/aws-sdk-go-v2/credentials v1.18.19 h1:Jc1zzwkSY1QbkEcLujwqRTXOdvW8ppND3jRBb/VhBQc=
66-
github.com/aws/aws-sdk-go-v2/credentials v1.18.19/go.mod h1:DIfQ9fAk5H0pGtnqfqkbSIzky82qYnGvh06ASQXXg6A=
67-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.11 h1:X7X4YKb+c0rkI6d4uJ5tEMxXgCZ+jZ/D6mvkno8c8Uw=
68-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.11/go.mod h1:EqM6vPZQsZHYvC4Cai35UDg/f5NCEU+vp0WfbVqVcZc=
69-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.11 h1:7AANQZkF3ihM8fbdftpjhken0TP9sBzFbV/Ze/Y4HXA=
70-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.11/go.mod h1:NTF4QCGkm6fzVwncpkFQqoquQyOolcyXfbpC98urj+c=
71-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.11 h1:ShdtWUZT37LCAA4Mw2kJAJtzaszfSHFb5n25sdcv4YE=
72-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.11/go.mod h1:7bUb2sSr2MZ3M/N+VyETLTQtInemHXb/Fl3s8CLzm0Y=
63+
github.com/aws/aws-sdk-go-v2/config v1.31.16 h1:E4Tz+tJiPc7kGnXwIfCyUj6xHJNpENlY11oKpRTgsjc=
64+
github.com/aws/aws-sdk-go-v2/config v1.31.16/go.mod h1:2S9hBElpCyGMifv14WxQ7EfPumgoeCPZUpuPX8VtW34=
65+
github.com/aws/aws-sdk-go-v2/credentials v1.18.20 h1:KFndAnHd9NUuzikHjQ8D5CfFVO+bgELkmcGY8yAw98Q=
66+
github.com/aws/aws-sdk-go-v2/credentials v1.18.20/go.mod h1:9mCi28a+fmBHSQ0UM79omkz6JtN+PEsvLrnG36uoUv0=
67+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.12 h1:VO3FIM2TDbm0kqp6sFNR0PbioXJb/HzCDW6NtIZpIWE=
68+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.12/go.mod h1:6C39gB8kg82tx3r72muZSrNhHia9rjGkX7ORaS2GKNE=
69+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.12 h1:p/9flfXdoAnwJnuW9xHEAFY22R3A6skYkW19JFF9F+8=
70+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.12/go.mod h1:ZTLHakoVCTtW8AaLGSwJ3LXqHD9uQKnOcv1TrpO6u2k=
71+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.12 h1:2lTWFvRcnWFFLzHWmtddu5MTchc5Oj2OOey++99tPZ0=
72+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.12/go.mod h1:hI92pK+ho8HVcWMHKHrK3Uml4pfG7wvL86FzO0LVtQQ=
7373
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk=
7474
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc=
75-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.11 h1:bKgSxk1TW//00PGQqYmrq83c+2myGidEclp+t9pPqVI=
76-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.11/go.mod h1:vrPYCQ6rFHL8jzQA8ppu3gWX18zxjLIDGTeqDxkBmSI=
75+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.12 h1:itu4KHu8JK/N6NcLIISlf3LL1LccMqruLUXZ9y7yBZw=
76+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.12/go.mod h1:i+6vTU3xziikTY3vcox23X8pPGW5X3wVgd1VZ7ha+x8=
7777
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.2 h1:xtuxji5CS0JknaXoACOunXOYOQzgfTvGAc9s2QdCJA4=
7878
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.2/go.mod h1:zxwi0DIR0rcRcgdbl7E2MSOvxDyyXGBlScvBkARFaLQ=
79-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.2 h1:DGFpGybmutVsCuF6vSuLZ25Vh55E3VmsnJmFfjeBx4M=
80-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.2/go.mod h1:hm/wU1HDvXCFEDzOLorQnZZ/CVvPXvWEmHMSmqgQRuA=
81-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.11 h1:GpMf3z2KJa4RnJ0ew3Hac+hRFYLZ9DDjfgXjuW+pB54=
82-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.11/go.mod h1:6MZP3ZI4QQsgUCFTwMZA2V0sEriNQ8k2hmoHF3qjimQ=
83-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.11 h1:weapBOuuFIBEQ9OX/NVW3tFQCvSutyjZYk/ga5jDLPo=
84-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.11/go.mod h1:3C1gN4FmIVLwYSh8etngUS+f1viY6nLCDVtZmrFbDy0=
85-
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.7 h1:Wer3W0GuaedWT7dv/PiWNZGSQFSTcBY2rZpbiUp5xcA=
86-
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.7/go.mod h1:UHKgcRSx8PVtvsc1Poxb/Co3PD3wL7P+f49P0+cWtuY=
87-
github.com/aws/aws-sdk-go-v2/service/sso v1.29.8 h1:M5nimZmugcZUO9wG7iVtROxPhiqyZX6ejS1lxlDPbTU=
88-
github.com/aws/aws-sdk-go-v2/service/sso v1.29.8/go.mod h1:mbef/pgKhtKRwrigPPs7SSSKZgytzP8PQ6P6JAAdqyM=
89-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.3 h1:S5GuJZpYxE0lKeMHKn+BRTz6PTFpgThyJ+5mYfux7BM=
90-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.3/go.mod h1:X4OF+BTd7HIb3L+tc4UlWHVrpgwZZIVENU15pRDVTI0=
91-
github.com/aws/aws-sdk-go-v2/service/sts v1.38.9 h1:Ekml5vGg6sHSZLZJQJagefnVe6PmqC2oiRkBq4F7fU0=
92-
github.com/aws/aws-sdk-go-v2/service/sts v1.38.9/go.mod h1:/e15V+o1zFHWdH3u7lpI3rVBcxszktIKuHKCY2/py+k=
79+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.3 h1:NEe7FaViguRQEm8zl8Ay/kC/QRsMtWUiCGZajQIsLdc=
80+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.3/go.mod h1:JLuCKu5VfiLBBBl/5IzZILU7rxS0koQpHzMOCzycOJU=
81+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.12 h1:MM8imH7NZ0ovIVX7D2RxfMDv7Jt9OiUXkcQ+GqywA7M=
82+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.12/go.mod h1:gf4OGwdNkbEsb7elw2Sy76odfhwNktWII3WgvQgQQ6w=
83+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.12 h1:R3uW0iKl8rgNEXNjVGliW/oMEh9fO/LlUEV8RvIFr1I=
84+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.12/go.mod h1:XEttbEr5yqsw8ebi7vlDoGJJjMXRez4/s9pibpJyL5s=
85+
github.com/aws/aws-sdk-go-v2/service/s3 v1.89.1 h1:Dq82AV+Qxpno/fG162eAhnD8d48t9S+GZCfz7yv1VeA=
86+
github.com/aws/aws-sdk-go-v2/service/s3 v1.89.1/go.mod h1:MbKLznDKpf7PnSonNRUVYZzfP0CeLkRIUexeblgKcU4=
87+
github.com/aws/aws-sdk-go-v2/service/sso v1.30.0 h1:xHXvxst78wBpJFgDW07xllOx0IAzbryrSdM4nMVQ4Dw=
88+
github.com/aws/aws-sdk-go-v2/service/sso v1.30.0/go.mod h1:/e8m+AO6HNPPqMyfKRtzZ9+mBF5/x1Wk8QiDva4m07I=
89+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.4 h1:tBw2Qhf0kj4ZwtsVpDiVRU3zKLvjvjgIjHMKirxXg8M=
90+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.4/go.mod h1:Deq4B7sRM6Awq/xyOBlxBdgW8/Z926KYNNaGMW2lrkA=
91+
github.com/aws/aws-sdk-go-v2/service/sts v1.39.0 h1:C+BRMnasSYFcgDw8o9H5hzehKzXyAb9GY5v/8bP9DUY=
92+
github.com/aws/aws-sdk-go-v2/service/sts v1.39.0/go.mod h1:4EjU+4mIx6+JqKQkruye+CaigV7alL3thVPfDd9VlMs=
9393
github.com/aws/smithy-go v1.23.1 h1:sLvcH6dfAFwGkHLZ7dGiYF7aK6mg4CgKA/iDKjLDt9M=
9494
github.com/aws/smithy-go v1.23.1/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
9595
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
@@ -365,17 +365,17 @@ github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+e
365365
github.com/sashabaranov/go-openai v1.41.2 h1:vfPRBZNMpnqu8ELsclWcAvF19lDNgh1t6TVfFFOPiSM=
366366
github.com/sashabaranov/go-openai v1.41.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
367367
github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg=
368-
github.com/shirou/gopsutil/v4 v4.25.9 h1:JImNpf6gCVhKgZhtaAHJ0serfFGtlfIlSC08eaKdTrU=
369-
github.com/shirou/gopsutil/v4 v4.25.9/go.mod h1:gxIxoC+7nQRwUl/xNhutXlD8lq+jxTgpIkEf3rADHL8=
368+
github.com/shirou/gopsutil/v4 v4.25.10 h1:at8lk/5T1OgtuCp+AwrDofFRjnvosn0nkN2OLQ6g8tA=
369+
github.com/shirou/gopsutil/v4 v4.25.10/go.mod h1:+kSwyC8DRUD9XXEHCAFjK+0nuArFJM0lva+StQAcskM=
370370
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
371371
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
372372
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
373373
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
374374
github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8=
375375
github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3 h1:EH063L0HD1f82DvddurUmEXS0obXypv8pQrcaC/zNgI=
376376
github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3/go.mod h1:8lb+SsWAPQblGbjmwEBsBdJszMCcLeECtB95fv6mReg=
377-
github.com/siyuan-note/dejavu v0.0.0-20251027015737-2f9c052b7de3 h1:UpCefZAUhztZFp9njYjjeewiV+b6D/mnUpE8ip9QR/g=
378-
github.com/siyuan-note/dejavu v0.0.0-20251027015737-2f9c052b7de3/go.mod h1:2uv9pVysdsZKY3Zkf18Rre/iWlZstgRC/veShQiLIOc=
377+
github.com/siyuan-note/dejavu v0.0.0-20251101084001-fa5aa496aa40 h1:sDeU6r6uG5gdS6M+QD9IR/L1HGqd6GTi1bMH403azio=
378+
github.com/siyuan-note/dejavu v0.0.0-20251101084001-fa5aa496aa40/go.mod h1:pdkv/5B0O+TI20YuhgrVJBUtCU6+vBd1nsaUtEJlwzk=
379379
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec h1:D8Sjwa+7WxP3XrIBscT4PxBZZddZ83/O+5nX1sq6g6g=
380380
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec/go.mod h1:6iAxXPOOAG3+M4bCiKQZTQ+n4gSUx/OyHhsP57dJlS8=
381381
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8=

kernel/model/import.go

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -799,45 +799,37 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
799799
moveIDs := map[string]string{}
800800
assetsDone := map[string]string{}
801801
if gulu.File.IsDir(localPath) { // 导入文件夹
802-
// 收集所有资源文件
803-
assets := map[string]string{}
802+
targetPaths := map[string]string{}
803+
count := 0
804+
// md 转换 sy
804805
filelock.Walk(localPath, func(currentPath string, d fs.DirEntry, err error) error {
805806
if err != nil {
806807
return err
807808
}
808809
if d == nil {
809810
return nil
810811
}
811-
if localPath == currentPath {
812-
return nil
813-
}
814812
if strings.HasPrefix(d.Name(), ".") {
815813
if d.IsDir() {
816814
return filepath.SkipDir
817815
}
818816
return nil
819817
}
820818

821-
if !strings.HasSuffix(d.Name(), ".md") && !strings.HasSuffix(d.Name(), ".markdown") {
822-
assets[currentPath] = currentPath
823-
return nil
824-
}
825-
return nil
826-
})
827-
828-
targetPaths := map[string]string{}
829-
count := 0
830-
// md 转换 sy
831-
filelock.Walk(localPath, func(currentPath string, d fs.DirEntry, err error) error {
832-
if err != nil {
833-
return err
834-
}
835-
if d == nil {
836-
return nil
837-
}
838-
if strings.HasPrefix(d.Name(), ".") {
839-
if d.IsDir() {
840-
return filepath.SkipDir
819+
if !d.IsDir() && strings.Contains(filepath.ToSlash(currentPath), "/assets/") {
820+
// assets 文件夹下的文件算作资源文件
821+
existName := assetsDone[currentPath]
822+
var name string
823+
if "" == existName {
824+
name = filepath.Base(currentPath)
825+
name = util.FilterUploadFileName(name)
826+
name = util.AssetName(name, ast.NewNodeID())
827+
assetTargetPath := filepath.Join(util.DataDir, "assets", name)
828+
if err = filelock.Copy(currentPath, assetTargetPath); err != nil {
829+
logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", currentPath, assetTargetPath, err)
830+
return nil
831+
}
832+
assetsDone[currentPath] = name
841833
}
842834
return nil
843835
}

screenshots/feature0.png

188 KB
Loading

screenshots/feature5-1.png

344 KB
Loading

0 commit comments

Comments
 (0)