refactor: use template (#178)

This commit is contained in:
AIsouler
2024-04-21 18:18:03 +08:00
committed by GitHub
parent 022f6ccbf6
commit 384d0c7f50
1469 changed files with 2335 additions and 17772 deletions

31
src/subscription.ts Normal file
View File

@@ -0,0 +1,31 @@
import { defineGkdSubscription } from '@gkd-kit/define';
import categories from './categories';
import globalGroups from './globalGroups';
import { RawApp, RawAppGroup } from '@gkd-kit/api';
import { batchImportApps } from '@gkd-kit/tools';
import { OPEN_AD_ORDER } from './globalGroups';
const apps = await batchImportApps(`${import.meta.dirname}/apps`);
const rawApps: RawApp[] = [];
apps.forEach((appConfig) => {
appConfig.groups?.forEach((g: RawAppGroup) => {
if (!g.name.startsWith('开屏广告')) {
g.enable = false;
} else {
g.order = OPEN_AD_ORDER;
}
});
rawApps.push(appConfig);
});
export default defineGkdSubscription({
id: 666,
name: 'AIsouler的GKD订阅',
version: 0,
author: 'AIsouler',
checkUpdateUrl: './AIsouler_gkd.version.json5',
supportUri: 'https://github.com/AIsouler/GKD_subscription',
categories,
globalGroups,
apps: rawApps,
});