Skip to content

Commit

Permalink
Merge pull request #585 from DIYgod/master
Browse files Browse the repository at this point in the history
[pull] master from diygod:master
  • Loading branch information
pull[bot] authored Nov 21, 2022
2 parents a6a03b5 + 9892bbe commit d17035b
Show file tree
Hide file tree
Showing 20 changed files with 327 additions and 191 deletions.
14 changes: 14 additions & 0 deletions docs/en/study.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ pageClass: routes

# Study

## Asian Innovation and Entrepreneurship Association

### Seminar Series

<RouteEn author="zxx-457" example="/aiea/seminars/upcoming" path="/aiea/seminars/:period" :paramsDesc="['Time frame']">

| Time frame |
| ----- |
| upcoming |
| past |
| both|

</RouteEn>

## gradCafe

### gradCafe result
Expand Down
8 changes: 6 additions & 2 deletions docs/government.md
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ pageClass: routes

<Route author="hillerliao" example="/csrc/auditstatus/:apply_id" path="/csrc/auditstatus" :paramsDesc="['事项类别id,`https://neris.csrc.gov.cn/alappl/home/xkDetail` 列表中各地址的 appMatrCde 参数']"/>

## 中国政府
## 中国政府网

### 数据

Expand Down Expand Up @@ -1040,7 +1040,7 @@ pageClass: routes

### 最新文件

<Route author="ciaranchen" example="/gov/zhengce/wenjian" path="/gov/zhengce/wenjian/:pcodeJiguan?" :paramsDesc="['文种分类。国令; 国发; 国函; 国发明电; 国办发; 国办函; 国办发明电; 其他']" />
<Route author="ciaranchen" example="/gov/zhengce/wenjian" path="/gov/zhengce/wenjian/:pcodeJiguan?" :paramsDesc="['文种分类。国令、国发、国函、国发明电国办发国办函国办发明电其他']" />

### 信息稿件

Expand All @@ -1059,6 +1059,10 @@ pageClass: routes

</Route>

### 国务院政策文件库

<Route author="zxx-457" example="/gov/zhengce/zhengceku/bmwj" path="/gov/zhengce/zhengceku/:department" :paramsDesc="['库名']" />

### 政府新闻

<Route author="EsuRt" example="/gov/news/:uid" path="/gov/news" :paramsDesc="['分类名']">
Expand Down
22 changes: 18 additions & 4 deletions docs/study.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,26 @@ pageClass: routes
| bilingual | 双语新闻 (Bilingual News) |
| address | 总统演讲 (President Address) |

## Asian Innovation and Entrepreneurship Association

### Seminar Series

<Route author="zxx-457" example="/aiea/seminars/upcoming" path="/aiea/seminars/:period" :paramsDesc="['时间段']">

| 时间段 |
| -------- |
| upcoming |
| past |
| both |

</Route>

## CTFHub Calendar

### 查询国内外 CTF 赛事信息

<Route author="frankli0324" example="/ctfhub/search"
path="/ctfhub/search/:limit?/:form?/:class?/:title?"
<Route author="frankli0324" example="/ctfhub/search"
path="/ctfhub/search/:limit?/:form?/:class?/:title?"
:paramsDesc="['一个整数,筛选最新的limit场比赛,默认为10', '比赛形式', '比赛类型', '通过CTF赛事名称过滤']">

| `:class` | 类型 |
Expand All @@ -65,8 +79,8 @@ path="/ctfhub/search/:limit?/:form?/:class?/:title?"

### 查询近期赛事

<Route author="frankli0324" example="/ctfhub/upcoming"
path="/ctfhub/upcoming/:limit?"
<Route author="frankli0324" example="/ctfhub/upcoming"
path="/ctfhub/upcoming/:limit?"
:paramsDesc="['一个整数,筛选最近的limit场比赛,默认为5']">

</Route>
Expand Down
6 changes: 3 additions & 3 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -1174,9 +1174,9 @@ router.get('/cyzone/author/:id', lazyloadRouteHandler('./routes/cyzone/author'))
router.get('/cyzone/label/:name', lazyloadRouteHandler('./routes/cyzone/label'));

// 政府
router.get('/gov/zhengce/zuixin', lazyloadRouteHandler('./routes/gov/zhengce/zuixin'));
router.get('/gov/zhengce/wenjian/:pcodeJiguan?', lazyloadRouteHandler('./routes/gov/zhengce/wenjian'));
router.get('/gov/zhengce/govall/:advance?', lazyloadRouteHandler('./routes/gov/zhengce/govall'));
// router.get('/gov/zhengce/zuixin', lazyloadRouteHandler('./routes/gov/zhengce/zuixin'));
// router.get('/gov/zhengce/wenjian/:pcodeJiguan?', lazyloadRouteHandler('./routes/gov/zhengce/wenjian'));
// router.get('/gov/zhengce/govall/:advance?', lazyloadRouteHandler('./routes/gov/zhengce/govall'));
router.get('/gov/province/:name/:category', lazyloadRouteHandler('./routes/gov/province'));
router.get('/gov/city/:name/:category', lazyloadRouteHandler('./routes/gov/city'));
router.get('/gov/statecouncil/briefing', lazyloadRouteHandler('./routes/gov/statecouncil/briefing'));
Expand Down
59 changes: 0 additions & 59 deletions lib/routes/gov/zhengce/govall.js

This file was deleted.

53 changes: 0 additions & 53 deletions lib/routes/gov/zhengce/wenjian.js

This file was deleted.

42 changes: 0 additions & 42 deletions lib/routes/gov/zhengce/zuixin.js

This file was deleted.

39 changes: 39 additions & 0 deletions lib/v2/aiea/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const buildData = require('@/utils/common-config');

module.exports = async (ctx) => {
const link = 'http://www.aiea.org/0504';
const period = ctx.params.period ?? '';

let nth_child = 'n';
switch (period) {
case 'upcoming':
nth_child = '1';
break;

case 'past':
nth_child = '2';
break;

case 'both':
nth_child = 'n';
break;

default:
break;
}

ctx.state.data = await buildData({
link,
url: link,
title: `%title%`,
params: {
title: 'AIEA Seminars',
},
item: {
item: `.seminar-contents .seminar-partWrap:nth-child(${nth_child}) > .seminar-list`,
title: `$('.seminar-list-title > span').text()`,
link: `$('a[href^="/0504"]').attr('href')`,
description: `$('.seminar-list .txt > .title').text()`,
},
});
};
3 changes: 3 additions & 0 deletions lib/v2/aiea/maintainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'/seminars/:period': ['zxx-457'],
};
13 changes: 13 additions & 0 deletions lib/v2/aiea/radar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
'aiea.org': {
_name: 'Asian Innovation and Entrepreneurship Association',
www: [
{
title: 'Seminar Series',
docs: 'https://docs.rsshub.app/study.html#AIEA-Seminar-Series',
source: ['/0504', '/'],
target: '/aiea/seminars/upcoming',
},
],
},
};
3 changes: 3 additions & 0 deletions lib/v2/aiea/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = function (router) {
return router.get('/seminars/:period', require('.'));
};
4 changes: 4 additions & 0 deletions lib/v2/gov/maintainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ module.exports = {
'/pbc/tradeAnnouncement': ['nczitzk'],
'/pbc/zcyj': ['Fatpandac'],
'/stats/:path+': ['bigfei'],
'/zhengce/govall/:advance?': ['ciaranchen'],
'/zhengce/wenjian/:pcodeJiguan?': ['ciaranchen'],
'/zhengce/zhengceku/:department': ['zxx-457'],
'/zhengce/zuixin': ['SettingDust'],
// province
'/anhui/kjt/:path?': ['nczitzk'],
'/beijing/bphc/:channel': ['bigfei'],
Expand Down
29 changes: 29 additions & 0 deletions lib/v2/gov/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,35 @@ module.exports = {
},
],
},
'www.gov.cn': {
_name: '中国政府网',
'.': [
{
title: '最新政策',
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
source: ['/zhengce/zuixin.htm', '/'],
target: '/gov/zhengce/zuixin',
},
{
title: '最新文件',
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
source: ['/'],
target: '/gov/zhengce/wenjian',
},
{
title: '信息稿件',
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
source: ['/'],
target: '/gov/zhengce/govall',
},
{
title: '国务院政策文件库',
docs: 'https://docs.rsshub.app/government.html#zhong-guo-zheng-fu-wang',
source: ['/zhengce/zhengceku/:lib'],
target: (params) => `/gov/zhengce/zhengceku/${params.libs}`,
},
],
},
'xz.gov.cn': {
_name: '徐州市人民政府',
hrss: [
Expand Down
4 changes: 4 additions & 0 deletions lib/v2/gov/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ module.exports = function (router) {
router.get('/pbc/tradeAnnouncement', require('./pbc/tradeAnnouncement'));
router.get('/pbc/zcyj', require('./pbc/zcyj'));
router.get(/stats(\/[\w/-]+)?/, require('./stats'));
router.get('/zhengce/govall/:advance?', require('./zhengce/govall'));
router.get('/zhengce/wenjian/:pcodeJiguan?', require('./zhengce/wenjian'));
router.get('/zhengce/zhengceku/:department', require('./zhengce/zhengceku'));
router.get('/zhengce/zuixin', require('./zhengce/zuixin'));
// province
router.get(/anhui\/kjt\/([\w\d/-]+)?/, require('./anhui/kjt'));
router.get(/beijing\/bphc(\/[\w/-]+)?/, require('./beijing/bphc'));
Expand Down
Loading

1 comment on commit d17035b

@vercel
Copy link

@vercel vercel bot commented on d17035b Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.