Skip to content

Commit c6ac78b

Browse files
committed
vault backup: 2026-04-20 22:07:20
1 parent 8ab9449 commit c6ac78b

7 files changed

Lines changed: 168 additions & 73 deletions

File tree

.obsidian/workspace.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@
113113
"state": {
114114
"type": "markdown",
115115
"state": {
116-
"file": "source/_posts/美伊冲突与特朗普国内压力.md",
116+
"file": "source/_posts/2026年山姆波斯战争地缘政治与山姆大叔国内政治经济风险综合评估报告.md",
117117
"mode": "source",
118118
"source": false
119119
},
120120
"icon": "lucide-file",
121-
"title": "美伊冲突与特朗普国内压力"
121+
"title": "2026年山姆波斯战争地缘政治与山姆大叔国内政治经济风险综合评估报告"
122122
}
123123
}
124124
],
@@ -309,10 +309,22 @@
309309
},
310310
"active": "ff9991118cb9beb8",
311311
"lastOpenFiles": [
312+
"content-audit-formatter.skill",
313+
"zia24964",
314+
"content-audit-formatter/scripts/audit_replace.cjs",
315+
"content-audit-formatter/references/sensitive_words.json",
316+
"content-audit-formatter/scripts/example_script.cjs",
317+
"content-audit-formatter/references/example_reference.md",
318+
"content-audit-formatter/assets/example_asset.txt",
319+
"content-audit-formatter/SKILL.md",
320+
"content-audit-formatter/scripts",
321+
"content-audit-formatter/references",
322+
"content-audit-formatter/assets",
323+
"content-audit-formatter",
324+
"fix_citations_safely.cjs",
312325
"source/_posts/我是如何使用Ai Agent的?.md",
313-
"source/_posts/美伊冲突与特朗普国内压力.md",
326+
"source/_posts/2026年山姆波斯战争地缘政治与山姆大叔国内政治经济风险综合评估报告.md",
314327
"博客修改.md",
315-
"nanobanana-output",
316328
"source/_posts/气候异象与大宗农产品市场:厄尔尼诺现象对全球天然橡胶主产区降雨及价格波动的长周期实证研究.md",
317329
"source/_posts/警惕“平庸”的代价:深度解读2026年波斯极限模式下的全球陷阱.md",
318330
"source/_posts/【Quantamental 投研周报】全品种预测回顾与地缘溢价重构 (2026-04-18).md",
@@ -322,19 +334,10 @@
322334
"source/_posts/ai教/任波的“服务而非奴役”.md",
323335
"source/_posts/ai教/龙虾教.md",
324336
"source/_posts/2026年霍尔木兹海峡危机:特朗普政府的海上收费政策、全球航运封锁与地缘经济秩序的系统性重构.md",
325-
"source/_posts/ai教",
326-
"fix_citations.py",
327337
"source/_posts/futures-research-ru.md",
328-
"source/charts/ru1-9_seasonality/index.html",
329-
"source/charts/ru1-9_seasonality",
330-
"source/reports/ru1-9_seasonality.html",
331-
"source/reports",
332338
"source/_posts/2026年西北太平洋及南海热带气旋活动趋势、气候动力学机制与社会经济影响综合评估报告.md",
333339
"source/_posts/ai辅助研究例子.md",
334340
"conflict-files-obsidian-git.md",
335-
"source/games/commodity-crisis/assets/index-CqTdBJ-X.js",
336-
"source/games/commodity-crisis/assets/index-C8HuocnS.css",
337-
"commodity-crisis/dist/assets/index-mUHfRh3T.js",
338341
"source/img/今年的台风会更多吗?.png",
339342
"md-citation-formatter/references/example_reference.md",
340343
"md-citation-formatter/SKILL.md",
@@ -344,9 +347,6 @@
344347
"source/_posts/橡胶大事记/正文/10.2 中国橡胶产业的发展.md",
345348
"source/_posts/橡胶大事记/正文/10.4 现代割胶技术与高产品种.md",
346349
"source/_posts/橡胶大事记/正文/10.1 全球天然橡胶产区分布.md",
347-
"source/_posts/橡胶大事记/正文/9.5 二者共存的现代格局.md",
348-
"source/_posts/橡胶大事记/正文/9.4 天然橡胶vs合成橡胶.md",
349-
"source/_posts/橡胶大事记/正文/9.3 战后合成橡胶产业的发展.md",
350350
"source/img/马斯克的商业版图.png",
351351
"source/img/账户保卫战.png",
352352
"pic/Pasted image 20251227093005.png",

content-audit-formatter.skill

3.04 KB
Binary file not shown.

content-audit-formatter/SKILL.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: content-audit-formatter
3+
description: 为 Markdown 文档执行敏感词脱敏替换。当用户需要发布政治、军事类内容(如涉及美国、中国、伊朗等)到公众号或其他严审平台时使用。
4+
---
5+
6+
# Content Audit Formatter
7+
8+
## 概述
9+
10+
此技能专门用于将文档中的政治、军事相关敏感词汇替换为特定代称,以降低在严审平台(如微信公众号)上的违规风险。
11+
12+
## 核心功能
13+
14+
### 1. 批量词汇脱敏
15+
使用内置脚本,将预设的敏感词列表自动替换为设定的安全词汇。
16+
17+
**转换示例:**
18+
- `美国` -> `山姆大叔`
19+
- `特朗普` -> `建国同志`
20+
- `中国` -> `东大`
21+
- `霍尔木兹海峡` -> `H海峡`
22+
23+
## 使用方法
24+
25+
### 批量处理文件
26+
运行以下脚本对特定 Markdown 文件进行处理:
27+
28+
```bash
29+
node content-audit-formatter/scripts/audit_replace.cjs <文件路径>
30+
```
31+
32+
## 词汇管理
33+
34+
敏感词与代称的映射存储在:
35+
`content-audit-formatter/references/sensitive_words.json`
36+
37+
你可以根据需要手动更新该映射表以包含更多词汇,如:
38+
- `拜登` -> `睡王`
39+
- `伊朗` -> `波斯`
40+
- `中东` -> `火药桶区域`
41+
- `以色列` -> `犹大`
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"美国": "山姆大叔",
3+
"特朗普": "建国同志",
4+
"中国": "东大",
5+
"霍尔木兹海峡": "H海峡",
6+
"拜登": "睡王",
7+
"伊朗": "波斯",
8+
"中东": "火药桶区域",
9+
"以色列": "犹大",
10+
"美伊": "山姆波斯",
11+
"美军": "山姆家军"
12+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const filePath = process.argv[2];
5+
if (!filePath) {
6+
console.error('Error: Please provide a file path.');
7+
process.exit(1);
8+
}
9+
10+
// 默认映射文件路径
11+
const mappingPath = path.join(__dirname, '..', 'references', 'sensitive_words.json');
12+
13+
try {
14+
const mapping = JSON.parse(fs.readFileSync(mappingPath, 'utf8'));
15+
let content = fs.readFileSync(filePath, 'utf8');
16+
17+
// 构建正则表达式,确保不匹配单词的一部分(如果需要的话,目前以中文字符为主)
18+
// 针对中文,直接替换即可
19+
for (const [key, value] of Object.entries(mapping)) {
20+
const regex = new RegExp(key, 'g');
21+
content = content.replace(regex, value);
22+
}
23+
24+
fs.writeFileSync(filePath, content, 'utf8');
25+
console.log(`Success: Formatted ${filePath} using sensitive word mapping.`);
26+
} catch (error) {
27+
console.error(`Error: ${error.message}`);
28+
process.exit(1);
29+
}

md-citation-formatter/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@ node md-citation-formatter/scripts/format_citations.cjs <文件路径>
4141
2. **数字位宽**:默认处理 1-99 之间的引用编号。
4242
3. **后缀排除**:如果数字后紧跟量词(如 只、个、元、吨、年、% 等)或属于千分位格式,则判定为普通数值,不予转换。
4343
4. **标点锚定**:引用通常出现在句号、逗号或其他停顿标点之前。
44+
5. **特别避开项(教训总结)**
45+
- **多级标题**:若数字作为章节编号的一部分(如 `1.1``5.2`),严禁修改。
46+
- **URL 路径**:若数字出现在 URL 路径中(如 `ycwk-a13.html`),严禁修改。
47+
- **年份与百分比**:确认为 `2026年``8.5%` 的模式不应改动。
48+
6. **兼容性与分界**
49+
- **空格支持**:能够识别并处理 `文字 1。`(文字与序号间有空格)的模式。
50+
- **分界处理**:一旦检测到“引用的著作”标题,该标题及其后续列表内容应完整保留,不再进行二次转换,防止破坏参考资料的原始链接和编号。

0 commit comments

Comments
 (0)