From 823e0c0e67a3682b7ccac024bb4bbbb1bcc8adca Mon Sep 17 00:00:00 2001 From: memset0 Date: Mon, 22 Jul 2024 10:14:08 +0800 Subject: [PATCH] feat(hdu): init --- package.json | 2 +- src/app.ts | 6 ++++-- src/config.ts | 3 +++ src/modules/hdu/main.ts | 12 ++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 src/modules/hdu/main.ts diff --git a/package.json b/package.json index 2df8ec6..17a9db3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CPAssistant.js", - "version": "1.1.0", + "version": "1.1.1", "description": "", "main": "index.js", "license": "GPL-3.0-only", diff --git a/src/app.ts b/src/app.ts index 33fd22f..693a608 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,9 +1,10 @@ import { Dict } from './utils/type'; import Module from './types/module'; import Feature from './types/feature'; -import ModuleVjudge from './modules/vjudge/main'; -import ModuleQOJ from './modules/qoj/main'; import ModuleCodeforces from './modules/codeforces/main'; +import ModuleHDU from './modules/hdu/main'; +import ModuleQOJ from './modules/qoj/main'; +import ModuleVjudge from './modules/vjudge/main'; export default class App { modules: Dict; @@ -44,3 +45,4 @@ export const app = new App(); app.register(new ModuleVjudge(app)); app.register(new ModuleCodeforces(app)); app.register(new ModuleQOJ(app)); +app.register(new ModuleHDU(app)); diff --git a/src/config.ts b/src/config.ts index 6f62a32..e1de278 100644 --- a/src/config.ts +++ b/src/config.ts @@ -6,6 +6,9 @@ const config: Dict = { 'codeforces.com', 'codeforc.es', ], + hdu: [ + 'acm.hdu.edu.cn', + ], qoj: [ 'qoj.ac', 'pjudge.ac', diff --git a/src/modules/hdu/main.ts b/src/modules/hdu/main.ts new file mode 100644 index 0000000..04a4bff --- /dev/null +++ b/src/modules/hdu/main.ts @@ -0,0 +1,12 @@ +import config from '../../config' +import App from '../../app' +import Module from "../../types/module" + +export default class ModuleHDU extends Module { + run() { + } + + constructor(app: App) { + super(app, 'hdu', config.match.hdu) + } +} \ No newline at end of file