Skip to content

Commit

Permalink
feat: 期刊路由优化,增加 scihub 模式 (DIYgod#4094)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryQW authored Mar 1, 2020
1 parent 70b333c commit 19fa95d
Show file tree
Hide file tree
Showing 25 changed files with 194 additions and 241 deletions.
6 changes: 5 additions & 1 deletion docs/.vuepress/components/Route.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<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"/> <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>
<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>
</p>
<p class="author">
作者: <a v-for="uid in author.split(' ')" :href="`https://github.com/${uid}`" target="_blank"> @{{ uid }} </a>
Expand Down Expand Up @@ -52,6 +52,10 @@ export default {
type: String,
default: null
},
supportScihub: {
type: String,
default: null
},
radar: {
type: String,
default: null
Expand Down
4 changes: 4 additions & 0 deletions docs/en/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,7 @@ Access control includes a whitelist and a blacklist, support IP and route, use `
- discuz cookies

- `DISCUZ_COOKIE_{cid}`: Cookie of a forum powered by discuz, cid can be anything from 00 to 99. When visiting route discuz, using cid to specify this cookie.

- Sci-hub for scientific journal routes:

- `SCIHUB_HOST`: The Sci-hub mirror address that is accssible from your location, default to `https://sci-hub.tw`.
114 changes: 58 additions & 56 deletions docs/en/journal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
pageClass: routes
---

# Sciences Journal
# Scientific Journal

## Online papers
## Cell Journal

### Cell Journal

<RouteEn author="yech1990" example="/cell/cell/current" path="/cell/cell/:category" />
<RouteEn author="yech1990" example="/cell/cell/current" path="/journal/cell/cell/:category" supportScihub="1" />

| `:category` | Query Type | Route |
| :---------: | :---------------------: | ---------------------------------------- |
Expand All @@ -17,17 +15,43 @@ pageClass: routes

</RouteEn>

### eLife - Latest Research-ALL
## eLife

### Latest Research - Research by Subject

<RouteEn author="emdoe" example="/elife/cell-biology" path="/journal/elife/:subject" :paramsDesc="['topic name', 'obtain it from the homepage. `latest` will include all topics.']" supportScihub="1"/>

## Google Scholar

### Keywords Monitoring

<RouteEn author="HenryQW" path="/google/scholar/:query" example="/google/scholar/data+visualization" :paramsDesc="['query statement which supports「Basic」and「Advanced」modes']" anticrawler="1">

::: warning

Google Scholar has strict anti-crawling mechanism implemented, the demo below doesn't guarantee availability. Please deploy your own instance as it might increase the stability.

:::

1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization).

2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5), copy everything after `https://scholar.google.com/scholar?` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5).

</RouteEn>

### Author Citations

<RouteEn author="emdoe" example="/elife/latest" path="/elife/latest" />
<RouteEn author="KellyHwong" example="/google/citations/mlmE4JMAAAAJ" path="/google/citations/:id" anticrawler="1">

The parameter id in the route is the id in the URL of the user ’s Google Scholar reference page,for example `https://scholar.google.com/citations?hl=zh-CN&user=mlmE4JMAAAAJ` to `mlmE4JMAAAAJ`

### eLife - Latest Research-Research by Subject
</RouteEn>

<RouteEn author="emdoe" example="/elife/cell-biology" path="/elife/:subject" :paramsDesc="['topic name', 'obtain it from the homepage']" />
## Nature Journal

### Nature Journal - Latest Research
### Latest Research

<RouteEn author="yech1990" example="/nature/research/ng" path="/nature/research/:journal" :paramsDesc="['short name for a journal']" />
<RouteEn author="yech1990" example="/nature/research/ng" path="/journal/nature/research/:journal" :paramsDesc="['short name for a journal']" />

| `:journal` | Full Name of the Journal | Route |
| :-----------: | :-------------------------: | ---------------------------------------------------------------- |
Expand All @@ -48,9 +72,9 @@ pageClass: routes

</RouteEn>

### Nature Journal - News & Comment
### News & Comment

<RouteEn author="yech1990" example="/nature/news-and-comment/ng" path="/nature/news-and-comment/:journal" :paramsDesc="['short name for a journal']" />
<RouteEn author="yech1990" example="/nature/news-and-comment/ng" path="/journal/nature/news-and-comment/:journal" :paramsDesc="['short name for a journal']" />

| `:journal` | Full Name of the Journal | Route |
| :-----------: | :-------------------------: | -------------------------------------------------------------------------------- |
Expand All @@ -68,25 +92,31 @@ pageClass: routes

</RouteEn>

### Nature Journal - News
### News

<RouteEn author="yech1990" example="/nature/news" path="/journal/nature/news" />

### Research Highlight

<RouteEn author="yech1990" example="/nature/nature/news" path="/nature/nature/news" />
<RouteEn author="yech1990" example="/nature/highlight" path="/journal/nature/highlight" supportScihub="1"/>

### Nature Journal - Research Highlight
## Proceedings of The National Academy of Sciences (PNAS)

<RouteEn author="yech1990" example="/nature/nature/highlight" path="/nature/nature/highlight" />
### Latest Articles - Articles by Topic

### Proceedings of The National Academy of Sciences (PNAS) - Latest Articles - ALL
<RouteEn author="emdoe HenryQW" example="/pnas/Applied Mathematics" path="/journal/pnas/:topic" :paramsDesc="['topic name', 'obtain it from pnas.org (new research in ...). `Latest` will include all.']" supportScihub="1"/>

<RouteEn author="emdoe" example="/pnas/latest" path="/pnas/latest" />
## PubMed

### Proceedings of The National Academy of Sciences (PNAS) - Latest Articles-Articles by Topic
### Trending

<RouteEn author="emdoe" example="/pnas/Applied Mathematics" path="/pnas/:topic" :paramsDesc="['topic name', 'obtain it from pnas.org (new research in ...)']" />
<RouteEn author="yech1990" example="/pubmed/trending" path="/journal/pubmed/trending" supportScihub="1"/>

### Science Journal - Current Issue
## Science Journal

<RouteEn author="yech1990" example="/sciencemag/current/science" path="/nature/research/:journal" :paramsDesc="['short name for a journal']" />
### Current Issue

<RouteEn author="yech1990" example="/sciencemag/current/science" path="/journal/sciencemag/research/:journal" :paramsDesc="['short name for a journal']" supportScihub="1"/>

| `:journal` | Full Name of the Journal | Route |
| :--------: | :----------------------------: | ---------------------------------------------------------------- |
Expand All @@ -102,44 +132,16 @@ pageClass: routes

</RouteEn>

### Science Journal - First Release
### First Release

<RouteEn author="yech1990" example="/sciencemag/early/science" path="/sciencemag/early/science" />
<RouteEn author="yech1990" example="/sciencemag/early/science" path="/journal/sciencemag/early/science" supportScihub="1"/>

_only support Science Journal_

</RouteEn>

## Search Engine

### PubMed Trending

<RouteEn author="yech1990" example="/pubmed/trending" path="/pubmed/trending" />

### X-MOL Platform - Journal
## X-MOL Platform

<RouteEn author="cssxsh" example="/x-mol/paper/0/9" path="/x-mol/paper/:type/:magazine" :paramsDesc="['类别','机构,两个参数都可从期刊URL获取。']" />

### Google Scholar - Keywords Monitoring

<RouteEn author="HenryQW" path="/google/scholar/:query" example="/google/scholar/data+visualization" :paramsDesc="['query statement which supports「Basic」and「Advanced」modes']" anticrawler="1">

::: warning

Google Scholar has strict anti-crawling mechanism implemented, the demo below doesn't guarantee availability. Please deploy your own instance as it might increase the stability.

:::
### Journal

1. Basic mode, sample query is the keywords desired, eg.「data visualization」, [https://rsshub.app/google/scholar/data+visualization](https://rsshub.app/google/scholar/data+visualization).

2. Advanced mode, visit [Google Scholar](https://scholar.google.com/schhp?hl=en&as_sdt=0,5), click the top left corner and select「Advanced Search」, fill in your conditions and submit the search. The URL should look like this: [https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://scholar.google.com/scholar?as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5), copy everything after `https://scholar.google.com/scholar?` from the URL and use it as the query for this route. The complete URL for the above example should look like this: [https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5](https://rsshub.app/google/scholar/as_q=data+visualization&as_epq=&as_oq=&as_eq=&as_occt=any&as_sauthors=&as_publication=&as_ylo=2018&as_yhi=&hl=en&as_sdt=0%2C5).

</RouteEn>

### Google Scholar - Author Citations

<RouteEn author="KellyHwong" example="/google/citations/mlmE4JMAAAAJ" path="/google/citations/:id" anticrawler="1">

The parameter id in the route is the id in the URL of the user ’s Google Scholar reference page,for example `https://scholar.google.com/citations?hl=zh-CN&user=mlmE4JMAAAAJ` to `mlmE4JMAAAAJ`

</RouteEn>
<RouteEn author="cssxsh" example="/x-mol/paper/0/9" path="/journal/x-mol/paper/:type/:magazine" :paramsDesc="['type','magazine']" />
8 changes: 8 additions & 0 deletions docs/en/parameter.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ Enable Telegram Instant View requires a page template, it can be obtained from T

Eg: <https://rsshub.app/novel/biquge/94_94525?tgiv=bd3c42818a7f7e>

## Sci-hub link

Output Sci-hub link in scientific journal routes, this supports major journals or routes that output DOIs.

- scihub: set to any value

举例: <https://rsshub.app/pnas/latest?scihub=1>

### Output Formats

RSSHub conforms to RSS 2.0 and Atom Standard, simply append `.rss` `.atom` to the end of the feed address to obtain the feed in corresponding format, default to RSS 2.0.
Expand Down
4 changes: 4 additions & 0 deletions docs/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,3 +413,7 @@ RSSHub 支持 `memory` 和 `redis` 两种缓存方式
- discuz cookies 设定

- `DISCUZ_COOKIE_{cid}`: 某 Discuz 驱动的论坛,用户注册后的 Cookie 值 , cid 可自由设定,取值范围[00, 99], 使用 discuz 通用路由时, 通过指定 cid 来调用该 cookie

- Sci-hub 设置,用于科学期刊路由。

- `SCIHUB_HOST`: 可访问的 sci-hub 镜像地址,默认为 `https://sci-hub.tw`
Loading

0 comments on commit 19fa95d

Please sign in to comment.