diff --git a/lib/routes/apnews/rss.ts b/lib/routes/apnews/rss.ts index edf24f65b7..3b5f3cc8f0 100644 --- a/lib/routes/apnews/rss.ts +++ b/lib/routes/apnews/rss.ts @@ -5,7 +5,7 @@ const HOME_PAGE = 'https://apnews.com'; export const route: Route = { path: '/rss/:rss?', - categories: ['traditional-media'], + categories: ['traditional-media', 'popular'], example: '/apnews/rss/business', parameters: { rss: 'Route name from the first segment of the corresponding site, or `index` for the front page(default).' }, features: { diff --git a/lib/routes/bilibili/dynamic.ts b/lib/routes/bilibili/dynamic.ts index 487a41e53a..8ec42a6ed1 100644 --- a/lib/routes/bilibili/dynamic.ts +++ b/lib/routes/bilibili/dynamic.ts @@ -10,7 +10,7 @@ import { BilibiliWebDynamicResponse, Item2, Modules } from './api-interface'; export const route: Route = { path: '/user/dynamic/:uid/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/bilibili/user/dynamic/2267573', parameters: { uid: '用户 id, 可在 UP 主主页中找到', routeParams: '额外参数;请参阅以下说明和表格' }, features: { diff --git a/lib/routes/bilibili/ranking.ts b/lib/routes/bilibili/ranking.ts index 800ecbb3a4..a2c1967804 100644 --- a/lib/routes/bilibili/ranking.ts +++ b/lib/routes/bilibili/ranking.ts @@ -6,7 +6,7 @@ export const route: Route = { path: '/ranking/:rid?/:day?/:arc_type?/:disableEmbed?', name: '排行榜', maintainers: ['DIYgod'], - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/bilibili/ranking/0/3/1', parameters: { rid: '排行榜分区 id, 默认 0', diff --git a/lib/routes/bilibili/video.ts b/lib/routes/bilibili/video.ts index 8c8a7d5ed1..7059a2a187 100644 --- a/lib/routes/bilibili/video.ts +++ b/lib/routes/bilibili/video.ts @@ -6,7 +6,7 @@ import logger from '@/utils/logger'; export const route: Route = { path: '/user/video/:uid/:disableEmbed?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/bilibili/user/video/2267573', parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, features: { diff --git a/lib/routes/dockerhub/build.ts b/lib/routes/dockerhub/build.ts index ebbc86d8a0..3b3d432b18 100644 --- a/lib/routes/dockerhub/build.ts +++ b/lib/routes/dockerhub/build.ts @@ -4,7 +4,7 @@ import { hash } from './utils'; export const route: Route = { path: '/build/:owner/:image/:tag?', - categories: ['program-update'], + categories: ['program-update', 'popular'], example: '/dockerhub/build/wangqiru/ttrss', parameters: { owner: 'Image owner', image: 'Image name', tag: 'Image tag,default to latest' }, features: { diff --git a/lib/routes/douban/other/group.ts b/lib/routes/douban/other/group.ts index d710599511..5360275fdd 100644 --- a/lib/routes/douban/other/group.ts +++ b/lib/routes/douban/other/group.ts @@ -5,7 +5,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/group/:groupid/:type?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/douban/group/648102', parameters: { groupid: '豆瓣小组的 id', type: '缺省 最新,essence 最热,elite 精华' }, features: { diff --git a/lib/routes/github/issue.ts b/lib/routes/github/issue.ts index 6f39650c93..1d6eb384ac 100644 --- a/lib/routes/github/issue.ts +++ b/lib/routes/github/issue.ts @@ -11,7 +11,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/issue/:user/:repo/:state?/:labels?', - categories: ['programming'], + categories: ['programming', 'popular'], example: '/github/issue/vuejs/core/all/wontfix', parameters: { user: 'GitHub username', repo: 'GitHub repo name', state: 'the state of the issues. Can be either `open`, `closed`, or `all`. Default: `open`.', labels: 'a list of comma separated label names' }, radar: [ diff --git a/lib/routes/instagram/private-api/index.ts b/lib/routes/instagram/private-api/index.ts index b42a8beda7..137c873f69 100644 --- a/lib/routes/instagram/private-api/index.ts +++ b/lib/routes/instagram/private-api/index.ts @@ -58,7 +58,7 @@ async function loadContent(category, nameOrId, tryGet) { export const route: Route = { path: '/:category/:key', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/instagram/user/stefaniejoosten', parameters: { category: 'Feed category, see table above', key: 'Username / Hashtag name' }, features: { diff --git a/lib/routes/javbus/index.ts b/lib/routes/javbus/index.ts index 37ed73efa2..06209a8f35 100644 --- a/lib/routes/javbus/index.ts +++ b/lib/routes/javbus/index.ts @@ -29,6 +29,7 @@ export const route: Route = { ], name: 'Unknown', maintainers: [], + categories: ['multimedia', 'popular'], handler, url: 'www.seejav.pw/', }; diff --git a/lib/routes/jike/topic.ts b/lib/routes/jike/topic.ts index d1b84bd0b9..88382b42e5 100644 --- a/lib/routes/jike/topic.ts +++ b/lib/routes/jike/topic.ts @@ -9,7 +9,7 @@ const urlRegex = /(https?:\/\/[^\s"'<>]+)/g; export const route: Route = { path: '/topic/:id/:showUid?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/jike/topic/556688fae4b00c57d9dd46ee', parameters: { id: '圈子 id, 可在即刻 web 端圈子页或 APP 分享出来的圈子页 URL 中找到', showUid: '是否在内容中显示用户信息,设置为 1 则开启' }, features: { diff --git a/lib/routes/jike/user.ts b/lib/routes/jike/user.ts index 42441a9ac0..d2736d10e8 100644 --- a/lib/routes/jike/user.ts +++ b/lib/routes/jike/user.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/user/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/jike/user/3EE02BC9-C5B3-4209-8750-4ED1EE0F67BB', parameters: { id: '用户 id, 可在即刻分享出来的单条动态页点击用户头像进入个人主页,然后在个人主页的 URL 中找到,或者在单条动态页使用 RSSHub Radar 插件' }, features: { diff --git a/lib/routes/lofter/user.ts b/lib/routes/lofter/user.ts index 65cc415f05..a9f0a6dc1b 100644 --- a/lib/routes/lofter/user.ts +++ b/lib/routes/lofter/user.ts @@ -6,7 +6,7 @@ import { isValidHost } from '@/utils/valid-host'; export const route: Route = { path: '/user/:name?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/lofter/user/i', parameters: { name: 'Lofter user name, can be found in the URL' }, features: { diff --git a/lib/routes/pixiv/ranking.ts b/lib/routes/pixiv/ranking.ts index 2b231df377..4c70dd3d3a 100644 --- a/lib/routes/pixiv/ranking.ts +++ b/lib/routes/pixiv/ranking.ts @@ -60,7 +60,7 @@ const alias = { export const route: Route = { path: '/ranking/:mode/:date?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/pixiv/ranking/week', parameters: { mode: 'rank type', date: 'format: `2018-4-25`' }, features: { diff --git a/lib/routes/pixiv/search.ts b/lib/routes/pixiv/search.ts index 8d9dda5fa7..3823ae1d02 100644 --- a/lib/routes/pixiv/search.ts +++ b/lib/routes/pixiv/search.ts @@ -10,7 +10,7 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { path: '/search/:keyword/:order?/:mode?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/pixiv/search/Nezuko/popular/2', parameters: { keyword: 'keyword', order: 'rank mode, empty or other for time order, popular for popular order', mode: 'filte R18 content' }, features: { diff --git a/lib/routes/pixiv/user.ts b/lib/routes/pixiv/user.ts index 08243ad2e3..2678c1aa85 100644 --- a/lib/routes/pixiv/user.ts +++ b/lib/routes/pixiv/user.ts @@ -9,7 +9,7 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { path: '/user/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/pixiv/user/15288095', parameters: { id: "user id, available in user's homepage URL" }, features: { diff --git a/lib/routes/rsshub/routes.ts b/lib/routes/rsshub/routes.ts index 26e4cb9af0..f755d8de2e 100644 --- a/lib/routes/rsshub/routes.ts +++ b/lib/routes/rsshub/routes.ts @@ -4,7 +4,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/routes/:lang?', - categories: ['program-update'], + categories: ['program-update', 'popular'], example: '/rsshub/routes/en', parameters: { lang: 'Language, `zh` means Chinese docs, other values or null means English docs, `en` by default' }, radar: [ diff --git a/lib/routes/sehuatang/user.ts b/lib/routes/sehuatang/user.ts index 7046f2f933..26dd329f21 100644 --- a/lib/routes/sehuatang/user.ts +++ b/lib/routes/sehuatang/user.ts @@ -11,7 +11,7 @@ const baseUrl = 'https://sehuatang.org/'; export const route: Route = { path: '/user/:uid', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], example: '/sehuatang/user/411096', parameters: { uid: '用户 uid, 可在用户主页 URL 中找到' }, features: { diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index ea7c3bdfa8..b36b567053 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -57,7 +57,7 @@ const mediaTagDict = { export const route: Route = { path: '/channel/:username/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/telegram/channel/awesomeDIYgod/searchQuery=twitter', parameters: { username: 'channel username', routeParams: 'extra parameters, see the table below' }, features: { diff --git a/lib/routes/twitter/keyword.ts b/lib/routes/twitter/keyword.ts index e20922ebd6..d458989879 100644 --- a/lib/routes/twitter/keyword.ts +++ b/lib/routes/twitter/keyword.ts @@ -4,7 +4,7 @@ import utils from './utils'; export const route: Route = { path: '/keyword/:keyword/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/twitter/keyword/RSSHub', parameters: { keyword: 'keyword', routeParams: 'extra parameters, see the table above' }, features: { diff --git a/lib/routes/twitter/media.ts b/lib/routes/twitter/media.ts index d86d5abc89..979160dcf5 100644 --- a/lib/routes/twitter/media.ts +++ b/lib/routes/twitter/media.ts @@ -4,7 +4,7 @@ import utils from './utils'; export const route: Route = { path: '/media/:id/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/twitter/media/DIYgod', parameters: { id: 'username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', routeParams: 'extra parameters, see the table above.' }, features: { diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index aded0ec34c..7b35743991 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -4,7 +4,7 @@ import api from './api'; export const route: Route = { path: '/user/:id/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/twitter/user/DIYgod', parameters: { id: 'username; in particular, if starts with `+`, it will be recognized as a [unique ID](https://github.com/DIYgod/RSSHub/issues/12221), e.g. `+44196397`', diff --git a/lib/routes/weibo/keyword.ts b/lib/routes/weibo/keyword.ts index df8b1b2cd2..8eb2619c3b 100644 --- a/lib/routes/weibo/keyword.ts +++ b/lib/routes/weibo/keyword.ts @@ -9,7 +9,7 @@ import { config } from '@/config'; export const route: Route = { path: '/keyword/:keyword/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/weibo/keyword/DIYgod', parameters: { keyword: '你想订阅的微博关键词', routeParams: '额外参数;请参阅上面的说明和表格' }, features: { diff --git a/lib/routes/weibo/user.ts b/lib/routes/weibo/user.ts index 153baaad4f..07e508fb87 100644 --- a/lib/routes/weibo/user.ts +++ b/lib/routes/weibo/user.ts @@ -10,7 +10,7 @@ import { fallback, queryToBoolean } from '@/utils/readable-social'; export const route: Route = { path: '/user/:uid/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/weibo/user/1195230310', parameters: { uid: '用户 id, 博主主页打开控制台执行 `$CONFIG.oid` 获取', routeParams: '额外参数;请参阅上面的说明和表格;特别地,当 `routeParams=1` 时开启微博视频显示' }, features: { diff --git a/lib/routes/xiaoyuzhou/podcast.ts b/lib/routes/xiaoyuzhou/podcast.ts index c208e89d9c..d4493aa354 100644 --- a/lib/routes/xiaoyuzhou/podcast.ts +++ b/lib/routes/xiaoyuzhou/podcast.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/podcast/:id', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], example: '/xiaoyuzhou/podcast/6021f949a789fca4eff4492c', parameters: { id: '播客id,可以在小宇宙播客的 URL 中找到' }, features: { diff --git a/lib/routes/ximalaya/album.ts b/lib/routes/ximalaya/album.ts index 519d5a7e3c..ffde92729c 100644 --- a/lib/routes/ximalaya/album.ts +++ b/lib/routes/ximalaya/album.ts @@ -82,8 +82,8 @@ function judgeTrue(str, ...validStrings) { } export const route: Route = { - path: ['/:type/:id/:all?', '/:type/:id/:all/:shownote?'], - categories: ['multimedia'], + path: ['/:type/:id/:all/:shownote?'], + categories: ['multimedia', 'popular'], example: '/ximalaya/album/299146', parameters: { type: '专辑类型, 通常可以使用 `album`,可在对应专辑页面的 URL 中找到', id: '专辑 id, 可在对应专辑页面的 URL 中找到', all: '是否需要获取全部节目,填入 `1`、`true`、`all` 视为获取所有节目,填入其他则不获取。' }, features: { @@ -99,10 +99,10 @@ export const route: Route = { supportPodcast: true, supportScihub: false, }, - name: '专辑(不输出 ShowNote)', + name: '专辑', maintainers: ['lengthmin', 'jjeejj', 'prnake'], handler, - description: `目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。下方有一个新的路径可选获取 ShowNote。 + description: `目前喜马拉雅的 API 只能一集一集的获取各节目上的 ShowNote,会极大的占用系统资源,所以默认为不获取节目的 ShowNote。 :::warning 专辑类型即 url 中的分类拼音,使用通用分类 \`album\` 通常是可行的,专辑 id 是跟在**分类拼音**后的那个 id, 不要输成某集的 id 了 diff --git a/lib/routes/youtube/user.ts b/lib/routes/youtube/user.ts index 71893c868d..e3a3127acc 100644 --- a/lib/routes/youtube/user.ts +++ b/lib/routes/youtube/user.ts @@ -9,7 +9,7 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { path: '/user/:username/:embed?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/youtube/user/@JFlaMusic', parameters: { username: 'YouTuber username with @', embed: 'Default to embed the video, set to any value to disable embedding' }, features: { diff --git a/lib/routes/zhihu/activities.ts b/lib/routes/zhihu/activities.ts index 9ab887444d..ee3738e1cb 100644 --- a/lib/routes/zhihu/activities.ts +++ b/lib/routes/zhihu/activities.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/people/activities/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/zhihu/people/activities/diygod', parameters: { id: '作者 id,可在用户主页 URL 中找到' }, features: { diff --git a/lib/types.ts b/lib/types.ts index a45dc65371..67f20d420b 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -3,6 +3,7 @@ import type { Context } from 'hono'; // Make sure it's synchronise with scripts/workflow/data.ts // and lib/routes/rsshub/routes.ts type Category = + | 'popular' | 'social-media' | 'new-media' | 'traditional-media' diff --git a/scripts/workflow/data.ts b/scripts/workflow/data.ts index dcf4cf8ffe..24726828f7 100644 --- a/scripts/workflow/data.ts +++ b/scripts/workflow/data.ts @@ -1,4 +1,10 @@ export const categories = [ + { + icon: '🌟', + link: '/routes/popular', + en: 'Popular', + zh: '热门', + }, { icon: '💬', link: '/routes/social-media',