Skip to content

Commit 4e1fea2

Browse files
committed
Add site-linux.do-my.json
1 parent 01281b4 commit 4e1fea2

File tree

9 files changed

+908
-64
lines changed

9 files changed

+908
-64
lines changed

scripts/fix_ids.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const fs = require('fs')
2+
const path = require('path')
3+
4+
// Setup paths similar to build_groups.js
5+
const ROOT_DIR = path.resolve(__dirname, '..')
6+
const ZH_CN_DIR = path.join(ROOT_DIR, 'zh-CN')
7+
8+
// Get filename from command line arguments
9+
const args = process.argv.slice(2)
10+
if (args.length === 0) {
11+
console.error(
12+
'Error: Please provide a filename (e.g., site-linux.do-my.json)'
13+
)
14+
process.exit(1)
15+
}
16+
17+
const fileName = args[0]
18+
// Handle case where user might provide full path or just filename
19+
const baseName = path.basename(fileName)
20+
const filePath = path.join(ZH_CN_DIR, baseName)
21+
22+
if (!fs.existsSync(filePath)) {
23+
console.error(`Error: File not found at ${filePath}`)
24+
process.exit(1)
25+
}
26+
27+
console.log(`Processing file: ${filePath}`)
28+
29+
try {
30+
const content = fs.readFileSync(filePath, 'utf8')
31+
const data = JSON.parse(content)
32+
33+
function generateId() {
34+
return Math.random().toString(36).substring(2, 10)
35+
}
36+
37+
let count = 0
38+
if (data.items) {
39+
data.items.forEach((item) => {
40+
item.id = generateId()
41+
count++
42+
})
43+
}
44+
45+
// Preserve final newline
46+
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + '\n', 'utf8')
47+
console.log(`Successfully regenerated IDs for ${count} items.`)
48+
} catch (e) {
49+
console.error('Error processing file:', e)
50+
process.exit(1)
51+
}

zh-CN/README.md

Lines changed: 31 additions & 29 deletions
Large diffs are not rendered by default.

zh-CN/collections/all_groups.json

Lines changed: 178 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
"https://gemini.google.com/*",
219219
"https://claude.ai/*",
220220
"https://www.doubao.com/chat/*",
221-
"https://kimi.moonshot.cn/*",
221+
"https://www.kimi.com/*",
222222
"https://chat.deepseek.com/*",
223223
"https://www.perplexity.ai/search/*",
224224
"https://metaso.cn/*",
@@ -263,7 +263,7 @@
263263
"name": "Kimi",
264264
"icon": "favicon",
265265
"type": "url",
266-
"data": "https://kimi.moonshot.cn/"
266+
"data": "https://www.kimi.com/"
267267
},
268268
{
269269
"id": "deepseek_ai",
@@ -942,7 +942,8 @@
942942
"name": "LINUX DO",
943943
"icon": "url:https://wsrv.nl/?w=64&h=64&url=https%3A%2F%2Ft3.gstatic.com%2FfaviconV2%3Fclient%3DSOCIAL%26type%3DFAVICON%26fallback_opts%3DTYPE%2CSIZE%2CURL%26url%3Dhttps%3A%2F%2Flinux.do%26size%3D64",
944944
"match": [
945-
"*://linux.do/*"
945+
"*://linux.do/*",
946+
"*://*.linux.do/*"
946947
],
947948
"defaultOpen": "same-tab",
948949
"items": [
@@ -1010,54 +1011,219 @@
10101011
"openIn": "new-tab"
10111012
},
10121013
{
1013-
"id": "0eybi3bv",
1014-
"name": "leaderbooard",
1014+
"id": "linuxdo_leaderboard",
1015+
"name": "Leaderbooard",
10151016
"type": "url",
10161017
"data": "https://linux.do/leaderboard",
10171018
"openIn": "new-tab",
10181019
"icon": "lucide:trophy"
10191020
},
10201021
{
1021-
"id": "oy4c2de9",
1022+
"id": "linuxdo_connect",
10221023
"name": "Connect",
10231024
"type": "url",
10241025
"data": "https://connect.linux.do/",
10251026
"openIn": "new-tab"
10261027
},
10271028
{
1028-
"id": "tt9yac9m",
1029-
"name": "IDC Flare",
1029+
"id": "linuxdo_credit",
1030+
"name": "LINUX DO Credit",
1031+
"icon": "lucide:credit-card",
10301032
"type": "url",
1031-
"data": "https://idcflare.com/",
1033+
"data": "https://credit.linux.do/home",
10321034
"openIn": "new-tab"
10331035
},
10341036
{
1035-
"id": "vt4y2688",
1037+
"id": "linuxdo_challenge",
10361038
"name": "Challenge",
10371039
"type": "url",
10381040
"data": "https://linux.do/challenge?redirect={current_url_encoded}",
10391041
"openIn": "same-tab",
10401042
"icon": "lucide:swords"
10411043
},
10421044
{
1043-
"id": "20p30jnz",
1045+
"id": "linuxdo_cdk",
10441046
"name": "分发站",
10451047
"type": "url",
10461048
"data": "https://cdk.linux.do/",
10471049
"openIn": "new-tab",
10481050
"icon": "lucide:ticket-check"
10491051
},
10501052
{
1051-
"id": "q1df8ev8",
1053+
"id": "linuxdo_rate",
1054+
"name": "评分站",
1055+
"type": "url",
1056+
"data": "https://rate.linux.do/",
1057+
"openIn": "new-tab",
1058+
"icon": "lucide:thumbs-up"
1059+
},
1060+
{
1061+
"id": "linuxdo_lottery",
1062+
"name": "抽奖站",
1063+
"type": "url",
1064+
"data": "https://lottery.linux.do/",
1065+
"openIn": "new-tab",
1066+
"icon": "lucide:dice-6"
1067+
},
1068+
{
1069+
"id": "linuxdo_wiki",
1070+
"name": "Wiki",
1071+
"type": "url",
1072+
"data": "https://wiki.linux.do/",
1073+
"openIn": "new-tab",
1074+
"icon": "lucide:book"
1075+
},
1076+
{
1077+
"id": "linuxdo_community",
10521078
"name": "社区子系统和元宇宙",
10531079
"type": "url",
10541080
"data": "https://linux.do/pub/resources",
10551081
"openIn": "new-tab",
10561082
"icon": "lucide:infinity"
1083+
},
1084+
{
1085+
"id": "linuxdo_channel",
1086+
"name": "LINUX DO 频道",
1087+
"type": "url",
1088+
"data": "https://t.me/s/linux_do_channel",
1089+
"openIn": "new-tab",
1090+
"icon": "lucide:send"
1091+
},
1092+
{
1093+
"id": "idcflare",
1094+
"name": "IDC Flare",
1095+
"type": "url",
1096+
"data": "https://idcflare.com/",
1097+
"openIn": "new-tab",
1098+
"icon": "lucide:server"
1099+
},
1100+
{
1101+
"id": "safemode",
1102+
"name": "Safe Mode",
1103+
"type": "url",
1104+
"data": "?safe_mode=no_themes%2Cno_plugins",
1105+
"openIn": "new-tab",
1106+
"icon": "lucide:shield"
10571107
}
10581108
],
10591109
"itemsPerRow": 2
10601110
},
1111+
{
1112+
"id": "linuxdo_my_group",
1113+
"name": "LINUX DO - MY",
1114+
"icon": "url:https://wsrv.nl/?w=64&h=64&url=https%3A%2F%2Ft3.gstatic.com%2FfaviconV2%3Fclient%3DSOCIAL%26type%3DFAVICON%26fallback_opts%3DTYPE%2CSIZE%2CURL%26url%3Dhttps%3A%2F%2Flinux.do%26size%3D64",
1115+
"match": [
1116+
"*://linux.do/*",
1117+
"*://*.linux.do/*"
1118+
],
1119+
"defaultOpen": "same-tab",
1120+
"items": [
1121+
{
1122+
"id": "zyf30x98",
1123+
"name": "未读话题(unread)",
1124+
"icon": "lucide:eye",
1125+
"type": "url",
1126+
"data": "https://linux.do/unread"
1127+
},
1128+
{
1129+
"id": "irdi1l9s",
1130+
"name": "未读话题(unseen)",
1131+
"icon": "lucide:eye",
1132+
"type": "url",
1133+
"data": "https://linux.do/unseen"
1134+
},
1135+
{
1136+
"id": "se9wmmqu",
1137+
"name": "我关注的人的动态",
1138+
"icon": "lucide:user-check",
1139+
"type": "url",
1140+
"data": "https://linux.do/my/follow/feed"
1141+
},
1142+
{
1143+
"id": "917ql3b2",
1144+
"name": "我关注的人",
1145+
"icon": "lucide:user-check",
1146+
"type": "url",
1147+
"data": "https://linux.do/my/follow/following"
1148+
},
1149+
{
1150+
"id": "mtnq2qzr",
1151+
"name": "通知",
1152+
"icon": "lucide:bell",
1153+
"type": "url",
1154+
"data": "https://linux.do/my/notifications"
1155+
},
1156+
{
1157+
"id": "xr56tpdx",
1158+
"name": "消息",
1159+
"icon": "lucide:inbox",
1160+
"type": "url",
1161+
"data": "https://linux.do/my/messages"
1162+
},
1163+
{
1164+
"id": "9t7a3qz3",
1165+
"name": "浏览历史记录",
1166+
"icon": "lucide:history",
1167+
"type": "url",
1168+
"data": "https://linux.do/my/activity/read"
1169+
},
1170+
{
1171+
"id": "mdboed22",
1172+
"name": "书签",
1173+
"icon": "lucide:bookmark-check",
1174+
"type": "url",
1175+
"data": "https://linux.do/my/activity/bookmarks"
1176+
},
1177+
{
1178+
"id": "f0644ar0",
1179+
"name": "我的帖子",
1180+
"icon": "lucide:check-square",
1181+
"type": "url",
1182+
"data": "https://linux.do/my/activity"
1183+
},
1184+
{
1185+
"id": "kkb7tcrx",
1186+
"name": "我创建的话题",
1187+
"icon": "lucide:check-square",
1188+
"type": "url",
1189+
"data": "https://linux.do/my/activity/topics"
1190+
},
1191+
{
1192+
"id": "8m7k73qk",
1193+
"name": "我创建的话题(按创建时间排序)",
1194+
"icon": "lucide:check-square",
1195+
"type": "url",
1196+
"data": "https://linux.do/my/activity/topics?ascending=false&order=created"
1197+
},
1198+
{
1199+
"id": "13qpf8vw",
1200+
"name": "免打扰设置(屏蔽类别与标签)",
1201+
"icon": "lucide:eye-off",
1202+
"type": "url",
1203+
"data": "https://linux.do/my/preferences/tracking"
1204+
},
1205+
{
1206+
"id": "001a3iqh",
1207+
"name": "用户屏蔽管理",
1208+
"icon": "lucide:eye-off",
1209+
"type": "url",
1210+
"data": "https://linux.do/my/preferences/users"
1211+
},
1212+
{
1213+
"id": "k1inrrfh",
1214+
"name": "徽章",
1215+
"icon": "lucide:award",
1216+
"type": "url",
1217+
"data": "https://linux.do/my/badges"
1218+
}
1219+
],
1220+
"collapsed": false,
1221+
"itemsPerRow": 1,
1222+
"hidden": false,
1223+
"displayStyle": "icon-title",
1224+
"iconSize": "medium",
1225+
"iconItemsPerRow": 0
1226+
},
10611227
{
10621228
"id": "2libra_com_default",
10631229
"name": "2libra",

zh-CN/collections/all_search_groups.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"https://gemini.google.com/*",
8888
"https://claude.ai/*",
8989
"https://www.doubao.com/chat/*",
90-
"https://kimi.moonshot.cn/*",
90+
"https://www.kimi.com/*",
9191
"https://chat.deepseek.com/*",
9292
"https://www.perplexity.ai/search/*",
9393
"https://metaso.cn/*",
@@ -132,7 +132,7 @@
132132
"name": "Kimi",
133133
"icon": "favicon",
134134
"type": "url",
135-
"data": "https://kimi.moonshot.cn/"
135+
"data": "https://www.kimi.com/"
136136
},
137137
{
138138
"id": "deepseek_ai",

0 commit comments

Comments
 (0)