feat(route): MindMeister (#10095)
This commit is contained in:
+39
-1
@@ -50,6 +50,44 @@ pageClass: routes
|
||||
|
||||
</RouteEn>
|
||||
|
||||
## MindMeister
|
||||
|
||||
### Public Maps
|
||||
|
||||
<RouteEn author="TonyRL" example="/mindmeister/mind-map-examples" path="/mindmeister/:category?/:language?" :paramsDesc="['Categories, see the table below, `mind-map-examples` by default', 'Languages, see the table below, `en` by default']" radar="1" rssbud="1">
|
||||
|
||||
| Categories | parameter |
|
||||
| -------- | --------------- |
|
||||
| Featured Map | mind-map-examples |
|
||||
| Business | business |
|
||||
| Design | design |
|
||||
| Education | education |
|
||||
| Entertainment | entertainment |
|
||||
| Life | life |
|
||||
| Marketing | marketing |
|
||||
| Productivity | productivity |
|
||||
| Summaries | summaries |
|
||||
| Technology | technology |
|
||||
| Other | other |
|
||||
|
||||
| Languages | parameter |
|
||||
| -------- | --------------- |
|
||||
| English | en |
|
||||
| Deutsch | de |
|
||||
| Français | fr |
|
||||
| Español | es |
|
||||
| Português | pt |
|
||||
| Nederlands | nl |
|
||||
| Dansk | da |
|
||||
| Русский | ru |
|
||||
| 日本語 | ja |
|
||||
| Italiano | it |
|
||||
| 简体中文 | zh |
|
||||
| 한국어 | ko |
|
||||
| Other | other |
|
||||
|
||||
</RouteEn>
|
||||
|
||||
## ORCID
|
||||
|
||||
### Works List
|
||||
@@ -60,7 +98,7 @@ pageClass: routes
|
||||
|
||||
### News
|
||||
|
||||
<RouteEn author="cssxsh" example="/x-mol/news/3" path="/x-mol/news/:tag?" :paramsDesc="['数字编号,可从新闻列表URL得到。为空时从新闻主页获取新闻。']" />
|
||||
<RouteEn author="cssxsh" example="/x-mol/news/3" path="/x-mol/news/:tag?" :paramsDesc="['Tag number, can be obtained from news list URL. Empty value means news index.']" />
|
||||
|
||||
## XMind
|
||||
|
||||
|
||||
@@ -123,6 +123,44 @@ path="/ctfhub/upcoming/:limit?"
|
||||
|
||||
<Route author="nczitzk" example="/mind42/search/online" path="/mind42/search/:keyword" :paramsDesc="['关键字']"/>
|
||||
|
||||
## MindMeister
|
||||
|
||||
### 公开思维导图
|
||||
|
||||
<Route author="TonyRL" example="/mindmeister/mind-map-examples" path="/mindmeister/:category?/:language?" :paramsDesc="['分类,见下表,默认为 `mind-map-examples`', '语言,见下表,默认为 `en`']" radar="1" rssbud="1">
|
||||
|
||||
| 分类 | 参数 |
|
||||
| ------ | ----------------- |
|
||||
| 精选思维导图 | mind-map-examples |
|
||||
| 商务 | business |
|
||||
| 设计 | design |
|
||||
| 教育 | education |
|
||||
| 娱乐 | entertainment |
|
||||
| 生活 | life |
|
||||
| 营销 | marketing |
|
||||
| 生产力 | productivity |
|
||||
| 概要 | summaries |
|
||||
| 科技 | technology |
|
||||
| 其他 | other |
|
||||
|
||||
| 语言 | 参数 |
|
||||
| ---------- | ----- |
|
||||
| English | en |
|
||||
| Deutsch | de |
|
||||
| Français | fr |
|
||||
| Español | es |
|
||||
| Português | pt |
|
||||
| Nederlands | nl |
|
||||
| Dansk | da |
|
||||
| Русский | ru |
|
||||
| 日本語 | ja |
|
||||
| Italiano | it |
|
||||
| 简体中文 | zh |
|
||||
| 한국어 | ko |
|
||||
| Other | other |
|
||||
|
||||
</Route>
|
||||
|
||||
## NEEA 中国教育考试网
|
||||
|
||||
### 国家教育考试
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { art } = require('@/utils/render');
|
||||
const path = require('path');
|
||||
const baseUrl = 'https://www.mindmeister.com';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { category = 'mind-map-examples', language = 'en' } = ctx.params;
|
||||
const link = `${baseUrl}${language === 'en' || language === 'other' ? '' : `/${language}`}/${category === 'mind-map-examples' ? category : `mind-maps/${category}?language=${language}`}`;
|
||||
const respsonse = await got(link);
|
||||
|
||||
const $ = cheerio.load(respsonse.data);
|
||||
|
||||
const items = $('#public-listing .map-tile-wrapper')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const imageUrl = new URL(
|
||||
item
|
||||
.find('.map-wrapper')
|
||||
.attr('style')
|
||||
.match(/url\('(.*)'\);/)[1]
|
||||
).href;
|
||||
|
||||
return {
|
||||
title: item.find('.title').text(),
|
||||
description: art(path.join(__dirname, 'templates/image.art'), {
|
||||
src: imageUrl.split('?')[0],
|
||||
alt: item.find('.title').text().trim(),
|
||||
}),
|
||||
link: item.find('.title').attr('href'),
|
||||
author: item.find('.author').text().trim().replace(/^by/, ''),
|
||||
category: item.find('.fw-bold').text(),
|
||||
};
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head title').text(),
|
||||
description: $('head meta[name=description]').text(),
|
||||
link,
|
||||
item: items,
|
||||
language,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/:category?/:language?': ['TonyRL'],
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
'mindmeister.com': {
|
||||
_name: 'MindMeister',
|
||||
'.': [
|
||||
{
|
||||
title: '分类',
|
||||
docs: 'https://docs.rsshub.app/study.html#mindmeister',
|
||||
source: ['/:language/mind-maps/:category', '/:language/:category', '/:category'],
|
||||
target: (params) => `/mindmeister/${params.category}${params.language ? `/${params.language}` : ''}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/:category?/:language?', require('./example'));
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
<img src="{{ src }}" alt="{{ alt }}">
|
||||
Reference in New Issue
Block a user