Skip to content

Commit

Permalink
[pull] master from diygod:master (#1960)
Browse files Browse the repository at this point in the history
  • Loading branch information
pull[bot] authored May 20, 2022
1 parent 659997e commit 4b23955
Show file tree
Hide file tree
Showing 172 changed files with 3,855 additions and 1,359 deletions.
29 changes: 14 additions & 15 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
node_modules
npm-debug.log
.github
.idea
.vscode
Dockerfile*
docker-compose*
.dockerignore
.gitignore
LICENSE
.vscode
.github
Procfile
app-minimal
assets
coverage
docs
node_modules
test
.codecov.yml
.dockerignore
.editorconfig
.env
.eslint*
.gitignore
.prettier*
.(yarn|npm|nvm)rc
*.md
process.json
app.json
.travis.yml
app-minimal
.idea
.env
.editorconfig
Procfile
now.json
docker-compose*
jsconfig.json
npm-debug.log
process.json
package-lock.json
vercel.json

#git but keep the git commit hash
.git/logs
Expand Down
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ indent_size = 2

[{**.yml,**.yaml}]
indent_size = 2

[*.vue]
indent_size = 2
14 changes: 8 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ body:
Please ensure you have read [documentation](https://docs.rsshub.app/en), and provide all the information required by this template, otherwise the issue will be closed immediately.
Due to the anti-crawling policy implemented by certain websites, some RSS routes provided by the demo will return status code 403. This is not an issue caused by RSSHub and please do not report it.
- type: input
- type: textarea
id: routes
attributes:
label: Routes
description: The involved route, without any parameters
placeholder: /rsshub/routes
description: The involved route, without any parameters, copied directly from the docs "route" field, one link per line. Use `NOROUTE` if it is not route related.
placeholder: /rsshub/someroute/:type?
render: routes
validations:
required: true

- type: input
- type: textarea
id: fullroutes
attributes:
label: Full routes
description: The involved route, with all required and optional parameters
placeholder: /rsshub/routes
description: The involved route, with all required and optional parameters, and could be duplicate if necessary (different parameters)
placeholder: /rsshub/routes/1234?some_extension=mode
render: fullroutes
validations:
required: true

Expand Down
14 changes: 8 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report_zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ body:
请确保已阅读 [文档](https://docs.rsshub.app) 内相关部分,并按照模版提供信息,否则 issue 将被立即关闭。
由于部分源网站反爬缘故,演示地址一些 RSS 会返回 status code 403,该问题不是 RSSHub 所致,请勿提交 issue。
- type: input
- type: textarea
id: routes
attributes:
label: 路由地址
description: 不包含参数
placeholder: /rsshub/routes
description: 不包含参数,复制文档路由参数,一行一个,不要重复。如果和路由没有关系,请写`NOROUTE`
placeholder: /rsshub/someroute/:type?
render: routes
validations:
required: true

- type: input
- type: textarea
id: fullroutes
attributes:
label: 完整路由地址
description: 包含所有必选与可选参数
placeholder: /rsshub/routes
description: 包含所有必选与可选参数,一行一个,可以有重复路由不同参数(如果需要)
placeholder: /rsshub/routes/1234?some_extension=mode
render: fullroutes
validations:
required: true

Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ updates:
versions: ['>=4.0.0']
- dependency-name: remark-gfm
versions: ['>=2.0.0']
- dependency-name: remark-parse
versions: ['>=10.0.0']
- dependency-name: remark-preset-prettier
versions: ['>=1.0.0']
- dependency-name: remark-stringify
versions: ['>=10.0.0']
- dependency-name: string-width
versions: ['>=5.0.0']
- dependency-name: unified
versions: ['>=10.0.0']

- package-ecosystem: 'github-actions'
directory: '/'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
paths:
- 'lib/**'
- 'scripts/workflow/*.js'

jobs:
build:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/comment-on-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Comment on Issue

on:
issues:
types: [opened]

jobs:
testRoute:
name: Call maintainers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # just need its cache
with:
node-version: 16
cache: 'yarn'
- name: Install dependencies (yarn) # needed since we need to parse markdown, so we also use got instead
run: yarn
- name: Generate feedback
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-issue/call-maintainer.js`)
return await script({ github, context, core })
15 changes: 0 additions & 15 deletions .github/workflows/comment-on-pr.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
puppeteer:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 14, 16 ]
chromium:
Expand Down
File renamed without changes.
39 changes: 0 additions & 39 deletions assets/radar-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,29 +129,6 @@
{ title: '仓库 Contributors', docs: 'https://docs.rsshub.app/programming.html#github', source: ['/:user/:repo/graphs/contributors', '/:user/:repo'], target: '/github/contributors/:user/:repo' },
],
},
'zhihu.com': {
_name: '知乎',
www: [
{ title: '收藏夹', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/collection/:id', target: '/zhihu/collection/:id' },
{ title: '用户动态', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/people/:id', target: '/zhihu/people/activities/:id' },
{ title: '用户回答', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/people/:id/answers', target: '/zhihu/people/answers/:id' },
{ title: '用户想法', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/people/:id/pins', target: '/zhihu/people/pins/:id' },
{ title: '用户文章', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/:usertype/:id/posts', target: '/zhihu/posts/:usertype/:id' },
{ title: '热榜', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/hot', target: '/zhihu/hotlist' },
{ title: '想法热榜', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', target: '/zhihu/pin/hotlist' },
{ title: '问题', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/question/:questionId', target: '/zhihu/question/:questionId' },
{ title: '话题', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/topic/:topicId/:type', target: '/zhihu/topic/:topicId' },
{ title: '新书', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/zhihu/bookstore/newest', target: '/zhihu/pin/hotlist' },
{ title: '想法-24 小时新闻汇总', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/pin/special/972884951192113152', target: '/zhihu/pin/daily' },
{ title: '书店-周刊', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/pub/weekly', target: '/zhihu/weekly' },
{ title: '专栏', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/column/:id', target: '/zhihu/zhuanlan/:id' },
],
zhuanlan: [{ title: '专栏', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/:id', target: '/zhihu/zhuanlan/:id' }],
daily: [
{ title: '日报', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '', target: '/zhihu/daily' },
{ title: '日报', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/*tpath', target: '/zhihu/daily' },
],
},
'smzdm.com': {
_name: '什么值得买',
www: [{ title: '排行榜', docs: 'https://docs.rsshub.app/shopping.html#shen-me-zhi-de-mai', source: '/top' }],
Expand All @@ -174,22 +151,6 @@
},
'algocasts.io': { _name: 'AlgoCasts', '.': [{ title: '视频更新', docs: 'https://docs.rsshub.app/programming.html#algocasts', source: '/episodes', target: '/algocasts' }] },
'soulapp.cn': { _name: 'Soul', '.': [{ title: '瞬间更新', docs: 'https://docs.rsshub.app/social-media.html#soul' }] },
'juejin.cn': {
_name: '掘金',
'.': [
{ title: '标签', docs: 'https://docs.rsshub.app/programming.html#jue-jin-biao-qian', source: '/tag/:tag', target: '/juejin/tag/:tag' },
{ title: '小册', docs: 'https://docs.rsshub.app/programming.html#jue-jin-xiao-ce', source: '/books', target: '/juejin/books' },
{
title: '沸点',
docs: 'https://docs.rsshub.app/programming.html#jue-jin-fei-dian',
source: ['/pins/:type', '/pins/topic/:type'],
target: (params) => (params.type !== 'recommended' ? '/juejin/pins/:type' : '/juejin/pins'),
},
{ title: '专栏', docs: 'https://docs.rsshub.app/programming.html#jue-jin-zhuan-lan', source: ['/user/:id', '/user/:id/posts'], target: '/juejin/posts/:id' },
{ title: '收藏集', docs: 'https://docs.rsshub.app/programming.html#jue-jin-shou-cang-ji', source: ['/user/:id', '/user/:id/collections'], target: '/juejin/collections/:id' },
{ title: '单个收藏夹', docs: 'https://docs.rsshub.app/programming.html#jue-jin-dan-ge-shou-cang-jia', source: '/collection/:collectionId', target: '/juejin/collection/:collectionId' },
],
},
'anime1.me': {
_name: 'Anime1',
'.': [
Expand Down
23 changes: 17 additions & 6 deletions docs/.vuepress/components/Route.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<div class="routeBlock" :id="path">
<p class="badge">
<Badge text="支持 BT" type="tip" vertical="middle" v-if="supportBT"/> <Badge text="支持播客" type="tip" vertical="middle" v-if="supportPodcast"/> <Badge text="支持 Scihub" type="tip" vertical="middle" v-if="supportScihub"/> <a target="_blank" href="/faq.html" v-if="anticrawler"><Badge text="反爬严格" vertical="middle" type="warn"/></a> <a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="支持浏览器扩展" vertical="middle" type="tip"/></a> <a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="支持 RSSBud" vertical="middle" type="tip"/></a> <a target="_blank" href="https://docs.rsshub.app/install/" v-if="selfhost"><Badge text="仅支持自建" vertical="middle" type="warn"/></a>
<Badge text="支持 BT" vertical="middle" type="tip" v-if="supportBT"/>
<Badge text="支持播客" vertical="middle" type="tip" v-if="supportPodcast"/>
<Badge text="支持 Sci-Hub" vertical="middle" type="tip" v-if="supportScihub"/>
<Badge text="依赖 Puppeteer" vertical="middle" type="warn" v-if="puppeteer"/>
<a target="_blank" href="/faq.html" v-if="anticrawler"><Badge text="反爬严格" vertical="middle" type="warn"/></a>
<a target="_blank" href="/install/" v-if="selfhost"><Badge text="仅支持自建" vertical="middle" type="warn"/></a>
<a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="支持浏览器扩展" vertical="middle" type="tip"/></a>
<a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="支持 RSSBud" vertical="middle" type="tip"/></a>
</p>
<p class="author">
作者: <a v-for="uid in author.split(' ')" :href="`https://github.com/${uid}`" target="_blank"> @{{ uid }} </a>
Expand Down Expand Up @@ -69,19 +76,23 @@ export default {
type: String,
default: null
},
puppeteer: {
type: String,
default: null
},
},
methods: {
renderMarkdown(item, inline = true) {
const md = require('markdown-it')({
html: true,
html: true,
});
return inline ? md.renderInline(item) : md.render(item);
return inline ? md.renderInline(item) : md.render(item);
},
},
computed: {
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
}
}
</script>
27 changes: 21 additions & 6 deletions docs/.vuepress/components/RouteEn.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<div class="routeBlock" :id="path">
<p class="badge">
<Badge text="support BT" type="tip" vertical="middle" v-if="supportBT"/> <Badge text="support podcast" type="tip" vertical="middle" v-if="supportPodcast"/> <a target="_blank" href="/en/faq.html" v-if="anticrawler"><Badge text="strict anti-crawler policy" vertical="middle" type="warn"/></a> <a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="support browser extension" vertical="middle" type="tip"/></a> <a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="support rssbud" vertical="middle" type="tip"/></a> <a target="_blank" href="https://docs.rsshub.app/en/install/" v-if="selfhost"><Badge text="self-host only" vertical="middle" type="warn"/></a>
<Badge text="Support BT" vertical="middle" type="tip" v-if="supportBT"/>
<Badge text="Support Podcast" vertical="middle" type="tip" v-if="supportPodcast"/>
<Badge text="Support Sci-Hub" vertical="middle" type="tip" v-if="supportScihub"/>
<Badge text="Rely on Puppeteer" vertical="middle" type="warn" v-if="puppeteer"/>
<a target="_blank" href="/en/faq.html" v-if="anticrawler"><Badge text="Strict anti-crawler policy" vertical="middle" type="warn"/></a>
<a target="_blank" href="/en/install/" v-if="selfhost"><Badge text="Self-host only" vertical="middle" type="warn"/></a>
<a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="Support browser extension" vertical="middle" type="tip"/></a>
<a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="Support RSSBud" vertical="middle" type="tip"/></a>
</p>
<p class="author">
Author: <a v-for="uid in author.split(' ')" :href="`https://github.com/${uid}`" target="_blank"> @{{ uid }} </a>
Expand Down Expand Up @@ -53,6 +60,10 @@ export default {
type: String,
default: null
},
supportScihub: {
type: String,
default: null
},
radar: {
type: String,
default: null
Expand All @@ -65,19 +76,23 @@ export default {
type: String,
default: null
},
puppeteer: {
type: String,
default: null
}
},
methods: {
renderMarkdown(item, inline = true) {
const md = require('markdown-it')({
html: true,
html: true,
});
return inline ? md.renderInline(item) : md.render(item);
return inline ? md.renderInline(item) : md.render(item);
},
},
computed: {
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
}
}
</script>
32 changes: 29 additions & 3 deletions docs/bbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,32 @@ pageClass: routes

<Route author="cssxsh" example="/mcbbs/post/915861/3038" path="/mcbbs/post/:tid/:authorid?" :paramsDesc="['贴子id,可在帖子 URL 找到', '用户id,此参数不为空时,只看此作者']"/>

## Mobilism

### 论坛

<Route author="nitezs" example="/mobilism/forums/android/apps" path="/mobilism/forums/:category/:type/:fulltext?" :paramsDesc="['分类', '种类', '是否获取全文,如需获取全文参数传入 `y`']">

| 安卓 | iPhone | iPad |
| ------- | ------ | ---- |
| android | iphone | ipad |

| 应用 | 游戏 |
| ---- | ----- |
| apps | games |

</Route>

### 门户

<Route author="nitezs" example="/mobilism/portal/androidapps" path="/mobilism/portal/:type/:fulltext?" :paramsDesc="['种类', '是否获取全文,如需获取全文参数传入 `y`']">

| 安卓应用 | 安卓游戏 | 图书 | iPad 应用 | iPad 游戏 | iPhone 应用 | iPhone 游戏 |
| ---- | ----- | ----- | ------- | ------- | --------- | --------- |
| aapp | agame | ebook | ipapp | ipgame | iapp | igame |

</Route>

## NGA

### 分区帖子
Expand Down Expand Up @@ -564,19 +590,19 @@ pageClass: routes

### 发现

<Route author="zphw" example="/pincong/category/1/new" path="/pincong/category/:category?/:sort?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部', '排序方式,参数可见下表,默认为推荐']" anticrawler="1" />
<Route author="zphw" example="/pincong/category/1/new" path="/pincong/category/:category?/:sort?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部', '排序方式,参数可见下表,默认为推荐']" anticrawler="1" puppeteer="1"/>

| 最新 | 推荐 | 热门 |
| --- | --------- | --- |
| new | recommend | hot |

### 精选

<Route author="zphw" example="/pincong/hot" path="/pincong/hot/:category?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部']" anticrawler="1" />
<Route author="zphw" example="/pincong/hot" path="/pincong/hot/:category?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部']" anticrawler="1" puppeteer="1"/>

### 话题

<Route author="zphw" example="/pincong/topic/美国" path="/pincong/topic/:topic?" :paramsDesc="['话题,可在官网获取']" anticrawler="1" />
<Route author="zphw" example="/pincong/topic/美国" path="/pincong/topic/:topic?" :paramsDesc="['话题,可在官网获取']" anticrawler="1" puppeteer="1"/>

## 三星盖乐世社区

Expand Down
Loading

1 comment on commit 4b23955

@vercel
Copy link

@vercel vercel bot commented on 4b23955 May 20, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

rsshub – ./

rsshub-git-master-henryqw.vercel.app
rsshub-livid-rho.vercel.app
rsshub-henryqw.vercel.app

Please sign in to comment.