Update donate history

This commit is contained in:
the1812 2023-06-03 11:04:09 +08:00
parent 14b7b2116d
commit 267f18869a
4 changed files with 13 additions and 54 deletions

View File

@ -1,5 +1,5 @@
import parse from 'csv-parse/lib/sync'
import fs from 'fs-extra'
import fs from 'fs'
const files = process.argv.slice(2)
const parseAliPay = (csv: Record<string, string>[]) => {
@ -60,4 +60,5 @@ const items = files
})
.flat()
.sort((a, b) => parseInt(b.sortKey) - parseInt(a.sortKey))
fs.outputFileSync('dist/output.md', items.join('\n'))
fs.mkdirSync('dist/', { recursive: true })
fs.writeFileSync('dist/output.md', items.join('\n'))

View File

@ -6,11 +6,9 @@
"license": "MIT",
"private": true,
"dependencies": {
"csv-parse": "^4.15.4",
"fs-extra": "^10.1.0"
"csv-parse": "^4.15.4"
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/node": "^17.0.38",
"ts-node": "^10.8.0",
"typescript": "^4.7.2"

View File

@ -1,17 +1,15 @@
lockfileVersion: '6.0'
lockfileVersion: '6.1'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
csv-parse:
specifier: ^4.15.4
version: registry.npmmirror.com/csv-parse@4.15.4
fs-extra:
specifier: ^10.1.0
version: registry.npmmirror.com/fs-extra@10.1.0
devDependencies:
'@types/fs-extra':
specifier: ^9.0.13
version: registry.npmmirror.com/@types/fs-extra@9.0.13
'@types/node':
specifier: ^17.0.38
version: registry.npmmirror.com/@types/node@17.0.38
@ -79,14 +77,6 @@ packages:
version: 1.0.2
dev: true
registry.npmmirror.com/@types/fs-extra@9.0.13:
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-9.0.13.tgz}
name: '@types/fs-extra'
version: 9.0.13
dependencies:
'@types/node': registry.npmmirror.com/@types/node@17.0.38
dev: true
registry.npmmirror.com/@types/node@17.0.38:
resolution: {integrity: sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-17.0.38.tgz}
name: '@types/node'
@ -133,33 +123,6 @@ packages:
engines: {node: '>=0.3.1'}
dev: true
registry.npmmirror.com/fs-extra@10.1.0:
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz}
name: fs-extra
version: 10.1.0
engines: {node: '>=12'}
dependencies:
graceful-fs: registry.npmmirror.com/graceful-fs@4.2.10
jsonfile: registry.npmmirror.com/jsonfile@6.1.0
universalify: registry.npmmirror.com/universalify@2.0.0
dev: false
registry.npmmirror.com/graceful-fs@4.2.10:
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz}
name: graceful-fs
version: 4.2.10
dev: false
registry.npmmirror.com/jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz}
name: jsonfile
version: 6.1.0
dependencies:
universalify: registry.npmmirror.com/universalify@2.0.0
optionalDependencies:
graceful-fs: registry.npmmirror.com/graceful-fs@4.2.10
dev: false
registry.npmmirror.com/make-error@1.3.6:
resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz}
name: make-error
@ -208,13 +171,6 @@ packages:
hasBin: true
dev: true
registry.npmmirror.com/universalify@2.0.0:
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz}
name: universalify
version: 2.0.0
engines: {node: '>= 10.0.0'}
dev: false
registry.npmmirror.com/v8-compile-cache-lib@3.0.1:
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz}
name: v8-compile-cache-lib

View File

@ -28,6 +28,10 @@ https://afdian.net/@the1812?tab=sponsor
| 时间 | 用户名 | 单号后4位 | 金额 |
| ------------------- | ---------------- | --------- | ------- |
| 2023.05.22 13:38:55 | 匿名 | 4950 | ¥10.00 |
| 2023.04.26 20:14:14 | 鹏*u | 3047 | ¥50.00 |
| 2023.04.25 21:08:48 | 匿名 | 8365 | ¥20.00 |
| 2023.04.25 19:58:14 | *哈 | 6384 | ¥1.00 |
| 2023.04.23 17:50:52 | 匿名 | 8968 | ¥2.00 |
| 2023.04.22 23:13:20 | 匿名 | 3581 | ¥5.00 |
| 2023.04.10 00:29:46 | *- | 3636 | ¥10.00 |