Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
the1812 committed Mar 22, 2022
1 parent d3c6397 commit 65f5f15
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 69 deletions.
53 changes: 0 additions & 53 deletions builder/node/donate-table/index.js

This file was deleted.

29 changes: 16 additions & 13 deletions builder/node/donate-table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,25 @@ const parseAliPay = (csv: Record<string, string>[]) => {
return csv
}
const parseWeChat = (csv: Record<string, string>[]) => {
csv.forEach(item => {
item.sortKey = Number(new Date(item.交易时间)).toString()
item.toString = () => {
let name = item.交易对方
const noteMatch = item.商品.match(/:(.+)/)
if (noteMatch) {
name += ' ' + noteMatch[1]
return csv.filter(item => item.交易类型 === '赞赏码').map(item => {
return {
...item,
sortKey: Number(new Date(item.交易时间)).toString(),
toString: () => {
let name = item.交易对方
const noteMatch = item.商品.match(/:(.+)/)
if (noteMatch) {
name += ' ' + noteMatch[1]
}
if (item.备注.trim() !== '/') {
name += ' ' + item.备注
}
item.交易单号 = item.交易单号.trim()
console.log(item, item.交易时间)
return `| ${item.交易时间.replace(/-/g, '.')} | ${name} | ${item.交易单号.substring(item.交易单号.length - 4)} | ${item['金额(元)']} |`
}
if (item.备注.trim() !== '/') {
name += ' ' + item.备注
}
item.交易单号 = item.交易单号.trim()
return `| ${item.交易时间.replace(/-/g, '.')} | ${name} | ${item.交易单号.substring(item.交易单号.length - 4)} | ${item['金额(元)']} |`
}
})
return csv
}
const items = files.map(file => {
const text = fs.readFileSync(file, { encoding: 'utf-8' })
Expand Down
1 change: 1 addition & 0 deletions builder/node/donate-table/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"module": "commonjs",
"strict": true,
"sourceMap": false,
"skipLibCheck": true
},
"include": [
"index.ts"
Expand Down
29 changes: 29 additions & 0 deletions doc/donate.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,35 @@ https://afdian.net/@the1812?tab=sponsor

| 时间 | 用户名 | 单号后4位 | 金额 |
| ------------------- | ---------------- | --------- | ------- |
| 2022.03.13 00:57:16 | 匿名 | 9074 | ¥10.00 |
| 2022.03.12 16:15:41 | 匿名 | 5312 | ¥10.00 |
| 2022.03.08 15:34:44 | *| 8482 | ¥10.00 |
| 2022.02.18 17:01:40 | *| 9760 | ¥10.00 |
| 2022.02.16 05:17:31 | N*x | 8071 | ¥2.33 |
| 2022.02.14 20:57:47 | M*9 | 6981 | ¥1.11 |
| 2022.02.11 23:21:36 | *| 7832 | ¥50.00 |
| 2022.02.11 11:19:30 | 匿名 | 2375 | ¥5.00 |
| 2022.02.10 15:52:04 | *| 3421 | ¥6.66 |
| 2022.02.10 15:18:02 | *| 6228 | ¥10.00 |
| 2022.02.09 22:07:25 | charygao | 1027 | ¥20.00 |
| 2022.02.09 13:11:19 | E*n | 5990 | ¥3.00 |
| 2022.02.09 10:39:52 | *D | 4731 | ¥23.33 |
| 2022.02.07 11:08:09 | *| 3696 | ¥8.88 |
| 2022.02.06 10:07:15 | *| 8538 | ¥5.00 |
| 2022.02.02 18:49:37 | *| 9618 | ¥10.00 |
| 2022.01.29 19:57:39 | 匿名 | 8374 | ¥10.88 |
| 2022.01.27 13:57:18 | 匿名 | 4816 | ¥10.00 |
| 2022.01.26 18:13:21 | R*i | 5718 | ¥20.00 |
| 2022.01.26 16:10:15 | *| 8096 | ¥5.00 |
| 2022.01.24 04:11:01 | 匿名 | 9739 | ¥5.00 |
| 2022.01.23 00:16:36 | *| 7747 | ¥20.00 |
| 2022.01.22 20:34:58 | JizzCriuy | 6416 | ¥2.33 |
| 2022.01.22 13:43:10 | dibin | 5737 | ¥3.00 |
| 2022.01.22 10:30:40 | *| 1426 | ¥10.00 |
| 2022.01.21 23:45:21 | 匿名 | 1755 | ¥20.00 |
| 2022.01.21 14:54:37 | 匿名 | 6665 | ¥5.00 |
| 2022.01.20 21:13:06 | M*P | 5348 | ¥10.00 |
| 2022.01.18 12:28:17 | FBI赤井秀一 | 4513 | ¥10.00 |
| 2022.01.14 11:09:03 | R*0 | 1506 | ¥20.00 |
| 2022.01.13 15:12:17 | *| 0034 | ¥10.00 |
| 2022.01.05 21:16:29 | *| 8137 | ¥10.00 |
Expand Down
9 changes: 6 additions & 3 deletions doc/release-checklist.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# 发布新的正式版前要做的事
- 更新 tooltip 文案 / i18n
- 更新 features.md / README.md
- 编写 change log
- 更新版本号, 打上 tag
- 更新 donate.md
- 生成文档
- 编译预览版
- 带 tag 推送
- 打开 Tampermonkey, 更新其中的预览版, 测试功能
- 测下 Firefox + Violentmonkey
- 测下 Firefox + Violentmonkey

0 comments on commit 65f5f15

Please sign in to comment.