mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-19 09:52:21 +08:00
feat(route/tableau): Add route for Tableau viz of the day. (#13528)
* Add new route tableau viz of the day * Add radar.js for tableau viz of the day * fix doc for tableau viz of the day * Add screenshot into description
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/app/discover/viz-of-the-day': ['KaiyoungYu'],
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
'tableau.com': {
|
||||
_name: 'Tableau',
|
||||
public: [
|
||||
{
|
||||
title: 'Viz of the day',
|
||||
docs: 'https://docs.rsshub.app/routes/study#tableau',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/viz-of-the-day', require('./viz-of-the-day'));
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
const got = require('@/utils/got');
|
||||
// const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
// Your logic here
|
||||
const rootUrl = 'https://public.tableau.com/api/gallery?page=0&count=20&galleryType=viz-of-the-day';
|
||||
const { data: response } = await got(rootUrl);
|
||||
|
||||
const items = response.items.map((item) => ({
|
||||
title: item.title,
|
||||
link: item.sourceUrl,
|
||||
pubDate: parseDate(item.galleryItemPublicationDate),
|
||||
author: item.authorName,
|
||||
description: `<div><p>${item.description}</p><img src='${item.screenshot}'></div>`,
|
||||
itunes_item_image: item.screenshot,
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
// Your RSS output here
|
||||
title: 'Tableau Viz of the Day',
|
||||
link: 'https://public.tableau.com/app/discover/viz-of-the-day',
|
||||
image: 'https://help.tableau.com/current/pro/desktop/en-us/Resources/tableau-logo.png',
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -284,6 +284,12 @@ paramsDesc={['一个整数,筛选最近的limit场比赛,默认为5']}>
|
||||
|
||||
<Route author="nczitzk" example="/researchgate/publications/Somsak-Panha" path="/researchgate/publications/:username" paramsDesc={['Username, can be found in URL']} puppeteer="1" anticrawler="1"/>
|
||||
|
||||
## Tableau {#tableau}
|
||||
|
||||
### Viz of the day {#tableau-viz-of-the-day}
|
||||
|
||||
<Route author="KaiyoungYu" example="/tableau/viz-of-the-day" path="/tableau/viz-of-the-day" radar="1" />
|
||||
|
||||
## The Korea Institute of Marine Law {#the-korea-institute-of-marine-law}
|
||||
|
||||
### Thesis {#the-korea-institute-of-marine-law-thesis}
|
||||
|
||||
Reference in New Issue
Block a user