Skip to content

Commit

Permalink
feat: clear popular docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jun 26, 2024
1 parent 1bc8c02 commit a1322b8
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 68 deletions.
27 changes: 12 additions & 15 deletions lib/routes/bilibili/dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ export const route: Route = {
path: '/user/dynamic/:uid/:routeParams?',
categories: ['social-media', 'popular'],
example: '/bilibili/user/dynamic/2267573',
parameters: { uid: '用户 id, 可在 UP 主主页中找到', routeParams: '额外参数;请参阅以下说明和表格' },
parameters: {
uid: '用户 id, 可在 UP 主主页中找到',
routeParams: `
| 键 | 含义 | 接受的值 | 默认值 |
| ------------ | --------------------------------- | -------------- | ------ |
| showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false |
| disableEmbed | 关闭内嵌视频 | 0/1/true/false | false |
| useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false |
| directLink | 使用内容直链 | 0/1/true/false | false |
用例:\`/bilibili/user/dynamic/2267573/showEmoji=1&disableEmbed=1&useAvid=1\``,
},
features: {
requireConfig: [
{
Expand Down Expand Up @@ -40,20 +51,6 @@ export const route: Route = {
name: 'UP 主动态',
maintainers: ['DIYgod', 'zytomorrow', 'CaoMeiYouRen', 'JimenezLi'],
handler,
description: `| 键 | 含义 | 接受的值 | 默认值 |
| ------------ | --------------------------------- | -------------- | ------ |
| showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false |
| disableEmbed | 关闭内嵌视频 | 0/1/true/false | false |
| useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false |
| directLink | 使用内容直链 | 0/1/true/false | false |
用例:\`/bilibili/user/dynamic/2267573/showEmoji=1&disableEmbed=1&useAvid=1\`
:::tip 动态的专栏显示全文
动态的专栏显示全文请使用通用参数里的 \`mode=fulltext\`
举例: bilibili 专栏全文输出 /bilibili/user/dynamic/2267573/?mode=fulltext
:::`,
};

const getTitle = (data: Modules): string => {
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/bilibili/namespace.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Namespace } from '@/types';

export const namespace: Namespace = {
name: 'Bilibili',
name: '哔哩哔哩 bilibili',
url: 'www.bilibili.com',
};
3 changes: 0 additions & 3 deletions lib/routes/bilibili/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export const route: Route = {
name: 'UP 主投稿',
maintainers: ['DIYgod'],
handler,
description: `:::tip 动态的专栏显示全文
可以使用 [UP 主动态](#bilibili-up-zhu-dong-tai)路由作为代替绕过反爬限制
:::`,
};

async function handler(ctx) {
Expand Down
5 changes: 1 addition & 4 deletions lib/routes/dockerhub/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const route: Route = {
categories: ['program-update', 'popular'],
example: '/dockerhub/build/wangqiru/ttrss',
parameters: {
owner: 'Image owner',
owner: 'Image owner, the owner of the official image fills in the library, for example: /dockerhub/build/library/mysql',
image: 'Image name',
tag: {
description: 'Image tag',
Expand All @@ -25,9 +25,6 @@ export const route: Route = {
name: 'Image New Build',
maintainers: ['HenryQW'],
handler,
description: `:::warning
The owner of the official image fills in the library, for example: [https://rsshub.app/dockerhub/build/library/mysql](https://rsshub.app/dockerhub/build/library/mysql)
:::`,
};

async function handler(ctx) {
Expand Down
11 changes: 8 additions & 3 deletions lib/routes/instagram/private-api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ export const route: Route = {
optional: true,
description: '',
},
{
name: 'IG_USERNAME',
description: 'Instagram username',
},
{
name: 'IG_PASSWORD',
description: 'Instagram password, due to [Instagram Private API](https://github.com/dilame/instagram-private-api) restrictions, you have to setup your credentials on the server. 2FA is not supported.',
},
],
requirePuppeteer: false,
antiCrawler: true,
Expand All @@ -78,9 +86,6 @@ export const route: Route = {
name: 'User Profile / Hashtag - Private API',
maintainers: ['oppilate', 'DIYgod'],
handler,
description: `:::warning
Due to [Instagram Private API](https://github.com/dilame/instagram-private-api) restrictions, you have to setup your credentials on the server. 2FA is not supported. See [deployment guide](https://docs.rsshub.app/deploy/) for more.
:::`,
};

async function handler(ctx) {
Expand Down
72 changes: 64 additions & 8 deletions lib/routes/pixiv/ranking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,70 @@ export const route: Route = {
path: '/ranking/:mode/:date?',
categories: ['social-media', 'popular'],
example: '/pixiv/ranking/week',
parameters: { mode: 'rank type', date: 'format: `2018-4-25`' },
parameters: {
mode: {
description: 'rank type',
options: [
{
value: 'day',
label: 'daily rank',
},
{
value: 'week',
label: 'weekly rank',
},
{
value: 'month',
label: 'monthly rank',
},
{
value: 'day_male',
label: 'male rank',
},
{
value: 'day_felame',
label: 'female rank',
},
{
value: 'day_ai',
label: 'AI-generated work Rankings',
},
{
value: 'week_original',
label: 'original rank',
},
{
value: 'week_rookie',
label: 'rookie user rank',
},
{
value: 'day_r18',
label: 'R-18 daily rank',
},
{
value: 'day_r18_ai',
label: 'R-18 AI-generated work',
},
{
value: 'day_male_r18',
label: 'R-18 male rank',
},
{
value: 'day_female_r18',
label: 'R-18 female rank',
},
{
value: 'week_r18',
label: 'R-18 weekly rank',
},
{
value: 'week_r18g',
label: 'R-18G rank',
},
],
},
date: 'format: `2018-4-25`',
},
features: {
requireConfig: false,
requirePuppeteer: false,
Expand All @@ -74,13 +137,6 @@ export const route: Route = {
name: 'Rankings',
maintainers: ['EYHN'],
handler,
description: `| daily rank | weekly rank | monthly rank | male rank | female rank | AI-generated work Rankings | original rank | rookie user rank |
| ---------- | ----------- | ------------ | --------- | ----------- | -------------------------- | -------------- | ---------------- |
| day | week | month | day\_male | day\_female | day\_ai | week\_original | week\_rookie |
| R-18 daily rank | R-18 AI-generated work | R-18 male rank | R-18 female rank | R-18 weekly rank | R-18G rank |
| --------------- | ---------------------- | -------------- | ---------------- | ---------------- | ---------- |
| day\_r18 | day\_r18\_ai | day\_male\_r18 | day\_female\_r18 | week\_r18 | week\_r18g |`,
};

async function handler(ctx) {
Expand Down
59 changes: 31 additions & 28 deletions lib/routes/telegram/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,37 @@ export const route: Route = {
path: '/channel/:username/:routeParams?',
categories: ['social-media', 'popular'],
example: '/telegram/channel/awesomeDIYgod/searchQuery=twitter',
parameters: { username: 'channel username', routeParams: 'extra parameters, see the table below' },
parameters: {
username: 'channel username',
routeParams: `extra parameters, see the table below
| Key | Description | Accepts | Defaults to |
| ---------------------- | --------------------------------------------------------------------- | -------------------------------------------------- | ------------ |
| showLinkPreview | Show the link preview from Telegram | 0/1/true/false | true |
| showViaBot | For messages sent via bot, show the bot | 0/1/true/false | true |
| showReplyTo | For reply messages, show the target of the reply | 0/1/true/false | true |
| showFwdFrom | For forwarded messages, show the forwarding source | 0/1/true/false | true |
| showFwdFromAuthor | For forwarded messages, show the author of the forwarding source | 0/1/true/false | true |
| showInlineButtons | Show inline buttons | 0/1/true/false | false |
| showMediaTagInTitle | Show media tags in the title | 0/1/true/false | true |
| showMediaTagAsEmoji | Show media tags as emoji | 0/1/true/false | true |
| showHashtagAsHyperlink | Show hashtags as hyperlinks (\`https://t.me/s/channel?q=%23hashtag\`) | 0/1/true/false | true |
| includeFwd | Include forwarded messages | 0/1/true/false | true |
| includeReply | Include reply messages | 0/1/true/false | true |
| includeServiceMsg | Include service messages (e.g. message pinned, channel photo updated) | 0/1/true/false | true |
| includeUnsupportedMsg | Include messages unsupported by t.me | 0/1/true/false | false |
| searchQuery | search query | keywords; replace \`#hashtag\` with \`%23hashtag\` | (no keyword) |
Specify different option values than default values can meet different needs, URL
\`\`\`
https://rsshub.app/telegram/channel/NewlearnerChannel/showLinkPreview=0&showViaBot=0&showReplyTo=0&showFwdFrom=0&showFwdFromAuthor=0&showInlineButtons=0&showMediaTagInTitle=1&showMediaTagAsEmoji=1&includeFwd=0&includeReply=1&includeServiceMsg=0&includeUnsupportedMsg=0
\`\`\`
generates an RSS without any link previews and annoying metadata, with emoji media tags in the title, without forwarded messages (but with reply messages), and without messages you don't care about (service messages and unsupported messages), for people who prefer pure subscriptions.
For backward compatibility reasons, invalid \`routeParams\` will be treated as \`searchQuery\` .
`,
},
features: {
requireConfig: false,
requirePuppeteer: false,
Expand All @@ -78,34 +108,7 @@ export const route: Route = {
maintainers: ['DIYgod', 'Rongronggg9'],
handler,
description: `
| Key | Description | Accepts | Defaults to |
| ---------------------- | --------------------------------------------------------------------- | -------------------------------------------------- | ------------ |
| showLinkPreview | Show the link preview from Telegram | 0/1/true/false | true |
| showViaBot | For messages sent via bot, show the bot | 0/1/true/false | true |
| showReplyTo | For reply messages, show the target of the reply | 0/1/true/false | true |
| showFwdFrom | For forwarded messages, show the forwarding source | 0/1/true/false | true |
| showFwdFromAuthor | For forwarded messages, show the author of the forwarding source | 0/1/true/false | true |
| showInlineButtons | Show inline buttons | 0/1/true/false | false |
| showMediaTagInTitle | Show media tags in the title | 0/1/true/false | true |
| showMediaTagAsEmoji | Show media tags as emoji | 0/1/true/false | true |
| showHashtagAsHyperlink | Show hashtags as hyperlinks (\`https://t.me/s/channel?q=%23hashtag\`) | 0/1/true/false | true |
| includeFwd | Include forwarded messages | 0/1/true/false | true |
| includeReply | Include reply messages | 0/1/true/false | true |
| includeServiceMsg | Include service messages (e.g. message pinned, channel photo updated) | 0/1/true/false | true |
| includeUnsupportedMsg | Include messages unsupported by t.me | 0/1/true/false | false |
| searchQuery | search query | keywords; replace \`#hashtag\` with \`%23hashtag\` | (no keyword) |
Specify different option values than default values can meet different needs, URL
\`\`\`
https://rsshub.app/telegram/channel/NewlearnerChannel/showLinkPreview=0&showViaBot=0&showReplyTo=0&showFwdFrom=0&showFwdFromAuthor=0&showInlineButtons=0&showMediaTagInTitle=1&showMediaTagAsEmoji=1&includeFwd=0&includeReply=1&includeServiceMsg=0&includeUnsupportedMsg=0
\`\`\`
generates an RSS without any link previews and annoying metadata, with emoji media tags in the title, without forwarded messages (but with reply messages), and without messages you don't care about (service messages and unsupported messages), for people who prefer pure subscriptions.
:::tip
For backward compatibility reasons, invalid \`routeParams\` will be treated as \`searchQuery\` .
Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting \`https://t.me/s/:username\`.
:::`,
};
Expand Down
1 change: 1 addition & 0 deletions lib/routes/weibo/friends.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const route: Route = {
requireConfig: [
{
name: 'WEIBO_COOKIES',
optional: true,
description: '',
},
],
Expand Down
1 change: 1 addition & 0 deletions lib/routes/weibo/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const route: Route = {
requireConfig: [
{
name: 'WEIBO_COOKIES',
optional: true,
description: '',
},
],
Expand Down
1 change: 1 addition & 0 deletions lib/routes/weibo/user-bookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const route: Route = {
requireConfig: [
{
name: 'WEIBO_COOKIES',
optional: true,
description: '',
},
],
Expand Down
14 changes: 8 additions & 6 deletions lib/routes/weibo/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ export const route: Route = {
example: '/weibo/user/1195230310',
parameters: { uid: '用户 id, 博主主页打开控制台执行 `$CONFIG.oid` 获取', routeParams: '额外参数;请参阅上面的说明和表格;特别地,当 `routeParams=1` 时开启微博视频显示' },
features: {
requireConfig: false,
requireConfig: [
{
name: 'WEIBO_COOKIES',
optional: true,
description: '',
},
],
requirePuppeteer: false,
antiCrawler: true,
supportBT: false,
Expand All @@ -31,11 +37,7 @@ export const route: Route = {
maintainers: ['DIYgod', 'iplusx', 'Rongronggg9'],
handler,
description: `:::warning
部分博主仅登录可见,未提供 Cookie 的情况下不支持订阅,可以通过打开 \`https://m.weibo.cn/u/:uid\` 验证。如需要订阅该部分博主,可配置 Cookie 后订阅。
未提供 Cookie 的情况下偶尔会触发反爬限制,提供 Cookie 可缓解该情况。
微博用户 Cookie 的配置可参照部署文档
部分博主仅登录可见,未提供 Cookie 的情况下不支持订阅,可以通过打开 \`https://m.weibo.cn/u/:uid\` 验证
:::`,
};

Expand Down

0 comments on commit a1322b8

Please sign in to comment.