feedscout 1.9.0 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/discover/defaults.js +1 -3
- package/dist/common/discover/utils.d.ts +2 -3
- package/dist/common/uris/feed/types.d.ts +2 -2
- package/dist/feeds/extractors.js +2 -2
- package/dist/feeds/platform/handlers/discourse.js +2 -6
- package/dist/feeds/platform/handlers/libsyn.js +1 -1
- package/package.json +23 -62
- package/dist/blogrolls/defaults.cjs +0 -57
- package/dist/blogrolls/defaults.d.cts +0 -16
- package/dist/blogrolls/extractors.cjs +0 -21
- package/dist/blogrolls/extractors.d.cts +0 -7
- package/dist/blogrolls/index.cjs +0 -25
- package/dist/blogrolls/index.d.cts +0 -7
- package/dist/blogrolls/types.d.cts +0 -6
- package/dist/blogrolls.cjs +0 -12
- package/dist/blogrolls.d.cts +0 -4
- package/dist/common/discover/defaults.cjs +0 -46
- package/dist/common/discover/defaults.d.cts +0 -6
- package/dist/common/discover/index.cjs +0 -105
- package/dist/common/discover/utils.cjs +0 -101
- package/dist/common/discover/utils.d.cts +0 -6
- package/dist/common/locales.cjs +0 -348
- package/dist/common/types.cjs +0 -10
- package/dist/common/types.d.cts +0 -90
- package/dist/common/uris/feed/index.cjs +0 -12
- package/dist/common/uris/feed/index.d.cts +0 -6
- package/dist/common/uris/feed/types.d.cts +0 -9
- package/dist/common/uris/guess/index.cjs +0 -8
- package/dist/common/uris/guess/index.d.cts +0 -7
- package/dist/common/uris/guess/types.d.cts +0 -10
- package/dist/common/uris/guess/utils.cjs +0 -42
- package/dist/common/uris/guess/utils.d.cts +0 -8
- package/dist/common/uris/headers/index.cjs +0 -26
- package/dist/common/uris/headers/index.d.cts +0 -6
- package/dist/common/uris/headers/types.d.cts +0 -9
- package/dist/common/uris/html/handlers.cjs +0 -59
- package/dist/common/uris/html/index.cjs +0 -35
- package/dist/common/uris/html/index.d.cts +0 -6
- package/dist/common/uris/html/types.d.cts +0 -13
- package/dist/common/uris/index.cjs +0 -32
- package/dist/common/uris/platform/index.cjs +0 -10
- package/dist/common/uris/platform/index.d.cts +0 -7
- package/dist/common/uris/platform/types.d.cts +0 -13
- package/dist/common/utils.cjs +0 -98
- package/dist/common/utils.d.cts +0 -12
- package/dist/favicons/defaults.cjs +0 -65
- package/dist/favicons/defaults.d.cts +0 -18
- package/dist/favicons/extractors.cjs +0 -25
- package/dist/favicons/extractors.d.cts +0 -7
- package/dist/favicons/index.cjs +0 -29
- package/dist/favicons/index.d.cts +0 -7
- package/dist/favicons/platform/handlers/bluesky.cjs +0 -27
- package/dist/favicons/platform/handlers/codeberg.cjs +0 -19
- package/dist/favicons/platform/handlers/deviantart.cjs +0 -29
- package/dist/favicons/platform/handlers/devto.cjs +0 -31
- package/dist/favicons/platform/handlers/github.cjs +0 -19
- package/dist/favicons/platform/handlers/githubGist.cjs +0 -19
- package/dist/favicons/platform/handlers/gitlab.cjs +0 -38
- package/dist/favicons/platform/handlers/lobsters.cjs +0 -21
- package/dist/favicons/platform/handlers/mastodon.cjs +0 -40
- package/dist/favicons/platform/handlers/reddit.cjs +0 -42
- package/dist/favicons/platform/handlers/sourceforge.cjs +0 -21
- package/dist/favicons/platform/handlers/tumblr.cjs +0 -16
- package/dist/favicons/types.d.cts +0 -4
- package/dist/favicons/utils.cjs +0 -10
- package/dist/favicons.cjs +0 -12
- package/dist/favicons.d.cts +0 -4
- package/dist/feeds/defaults.cjs +0 -290
- package/dist/feeds/defaults.d.cts +0 -21
- package/dist/feeds/extractors.cjs +0 -46
- package/dist/feeds/extractors.d.cts +0 -7
- package/dist/feeds/index.cjs +0 -26
- package/dist/feeds/index.d.cts +0 -7
- package/dist/feeds/platform/handlers/acast.cjs +0 -26
- package/dist/feeds/platform/handlers/ameblo.cjs +0 -36
- package/dist/feeds/platform/handlers/applePodcasts.cjs +0 -26
- package/dist/feeds/platform/handlers/arena.cjs +0 -42
- package/dist/feeds/platform/handlers/artstation.cjs +0 -52
- package/dist/feeds/platform/handlers/audioboom.cjs +0 -23
- package/dist/feeds/platform/handlers/bearblog.cjs +0 -45
- package/dist/feeds/platform/handlers/behance.cjs +0 -56
- package/dist/feeds/platform/handlers/blogspot.cjs +0 -72
- package/dist/feeds/platform/handlers/bluesky.cjs +0 -20
- package/dist/feeds/platform/handlers/bookwyrm.cjs +0 -48
- package/dist/feeds/platform/handlers/buttondown.cjs +0 -43
- package/dist/feeds/platform/handlers/buzzsprout.cjs +0 -22
- package/dist/feeds/platform/handlers/codeberg.cjs +0 -69
- package/dist/feeds/platform/handlers/csdn.cjs +0 -20
- package/dist/feeds/platform/handlers/dailymotion.cjs +0 -86
- package/dist/feeds/platform/handlers/deviantart.cjs +0 -85
- package/dist/feeds/platform/handlers/devto.cjs +0 -58
- package/dist/feeds/platform/handlers/discourse.cjs +0 -70
- package/dist/feeds/platform/handlers/douban.cjs +0 -56
- package/dist/feeds/platform/handlers/dreamwidth.cjs +0 -48
- package/dist/feeds/platform/handlers/exblog.cjs +0 -35
- package/dist/feeds/platform/handlers/fireside.cjs +0 -24
- package/dist/feeds/platform/handlers/friendica.cjs +0 -44
- package/dist/feeds/platform/handlers/ghost.cjs +0 -30
- package/dist/feeds/platform/handlers/github.cjs +0 -122
- package/dist/feeds/platform/handlers/githubGist.cjs +0 -56
- package/dist/feeds/platform/handlers/gitlab.cjs +0 -98
- package/dist/feeds/platform/handlers/goodreads.cjs +0 -49
- package/dist/feeds/platform/handlers/hackernews.cjs +0 -21
- package/dist/feeds/platform/handlers/hashnode.cjs +0 -16
- package/dist/feeds/platform/handlers/hatenablog.cjs +0 -56
- package/dist/feeds/platform/handlers/hearthis.cjs +0 -32
- package/dist/feeds/platform/handlers/heyWorld.cjs +0 -18
- package/dist/feeds/platform/handlers/insanejournal.cjs +0 -69
- package/dist/feeds/platform/handlers/itchio.cjs +0 -111
- package/dist/feeds/platform/handlers/kickstarter.cjs +0 -22
- package/dist/feeds/platform/handlers/lemmy.cjs +0 -88
- package/dist/feeds/platform/handlers/letterboxd.cjs +0 -46
- package/dist/feeds/platform/handlers/libsyn.cjs +0 -25
- package/dist/feeds/platform/handlers/listed.cjs +0 -20
- package/dist/feeds/platform/handlers/livejournal.cjs +0 -68
- package/dist/feeds/platform/handlers/lobsters.cjs +0 -57
- package/dist/feeds/platform/handlers/mastodon.cjs +0 -74
- package/dist/feeds/platform/handlers/mataroa.cjs +0 -16
- package/dist/feeds/platform/handlers/medium.cjs +0 -68
- package/dist/feeds/platform/handlers/microblog.cjs +0 -55
- package/dist/feeds/platform/handlers/misskey.cjs +0 -40
- package/dist/feeds/platform/handlers/myanimelist.cjs +0 -43
- package/dist/feeds/platform/handlers/naverBlog.cjs +0 -21
- package/dist/feeds/platform/handlers/nebula.cjs +0 -68
- package/dist/feeds/platform/handlers/note.cjs +0 -53
- package/dist/feeds/platform/handlers/observable.cjs +0 -34
- package/dist/feeds/platform/handlers/odysee.cjs +0 -20
- package/dist/feeds/platform/handlers/pagecord.cjs +0 -16
- package/dist/feeds/platform/handlers/paragraph.cjs +0 -20
- package/dist/feeds/platform/handlers/pika.cjs +0 -35
- package/dist/feeds/platform/handlers/pinterest.cjs +0 -57
- package/dist/feeds/platform/handlers/pixelfed.cjs +0 -46
- package/dist/feeds/platform/handlers/pleroma.cjs +0 -34
- package/dist/feeds/platform/handlers/podbean.cjs +0 -29
- package/dist/feeds/platform/handlers/podigee.cjs +0 -29
- package/dist/feeds/platform/handlers/posthaven.cjs +0 -24
- package/dist/feeds/platform/handlers/producthunt.cjs +0 -29
- package/dist/feeds/platform/handlers/prose.cjs +0 -26
- package/dist/feeds/platform/handlers/qiita.cjs +0 -58
- package/dist/feeds/platform/handlers/reddit.cjs +0 -149
- package/dist/feeds/platform/handlers/rssCom.cjs +0 -20
- package/dist/feeds/platform/handlers/seesaa.cjs +0 -22
- package/dist/feeds/platform/handlers/soundcloud.cjs +0 -39
- package/dist/feeds/platform/handlers/sourceforge.cjs +0 -53
- package/dist/feeds/platform/handlers/spreaker.cjs +0 -21
- package/dist/feeds/platform/handlers/stackExchange.cjs +0 -64
- package/dist/feeds/platform/handlers/steam.cjs +0 -35
- package/dist/feeds/platform/handlers/substack.cjs +0 -23
- package/dist/feeds/platform/handlers/tildes.cjs +0 -41
- package/dist/feeds/platform/handlers/tistory.cjs +0 -16
- package/dist/feeds/platform/handlers/transistor.cjs +0 -29
- package/dist/feeds/platform/handlers/tumblr.cjs +0 -24
- package/dist/feeds/platform/handlers/v2ex.cjs +0 -35
- package/dist/feeds/platform/handlers/velog.cjs +0 -24
- package/dist/feeds/platform/handlers/vimeo.cjs +0 -75
- package/dist/feeds/platform/handlers/weblogLol.cjs +0 -26
- package/dist/feeds/platform/handlers/weebly.cjs +0 -25
- package/dist/feeds/platform/handlers/wordpress.cjs +0 -209
- package/dist/feeds/platform/handlers/wpengine.cjs +0 -10
- package/dist/feeds/platform/handlers/writeas.cjs +0 -51
- package/dist/feeds/platform/handlers/ximalaya.cjs +0 -20
- package/dist/feeds/platform/handlers/youtube.cjs +0 -97
- package/dist/feeds/platform/handlers/zenn.cjs +0 -54
- package/dist/feeds/types.d.cts +0 -9
- package/dist/feeds.cjs +0 -16
- package/dist/feeds.d.cts +0 -4
- package/dist/hubs/discover/index.cjs +0 -30
- package/dist/hubs/discover/index.d.cts +0 -7
- package/dist/hubs/discover/types.d.cts +0 -15
- package/dist/hubs/feed/index.cjs +0 -32
- package/dist/hubs/headers/index.cjs +0 -17
- package/dist/hubs/html/index.cjs +0 -28
- package/dist/hubs.cjs +0 -0
- package/dist/hubs.d.cts +0 -2
- package/dist/index.cjs +0 -13
- package/dist/index.d.cts +0 -8
- package/dist/methods.cjs +0 -15
- package/dist/methods.d.cts +0 -7
- package/dist/utils.cjs +0 -9
- package/dist/utils.d.cts +0 -3
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/lobsters.ts
|
|
3
|
-
const hosts = ["lobste.rs"];
|
|
4
|
-
const tagRegex = /^\/t\/([a-zA-Z0-9,_-]+)/;
|
|
5
|
-
const domainRegex = /^\/domains\/([^/]+)/;
|
|
6
|
-
const userRegex = /^\/~([a-zA-Z0-9_-]+)/;
|
|
7
|
-
const topRegex = /^\/top(?:\/(1d|3d|1w|1m|1y))?\/?$/;
|
|
8
|
-
const lobstersHandler = {
|
|
9
|
-
match: (url) => {
|
|
10
|
-
return require_utils.isHostOf(url, hosts);
|
|
11
|
-
},
|
|
12
|
-
resolve: (url) => {
|
|
13
|
-
const { pathname } = new URL(url);
|
|
14
|
-
const tagMatch = pathname.match(tagRegex);
|
|
15
|
-
if (tagMatch?.[1]) return [{
|
|
16
|
-
uri: `https://lobste.rs/t/${tagMatch[1]}.rss`,
|
|
17
|
-
hint: require_utils.composeHint("lobsters:tag")
|
|
18
|
-
}];
|
|
19
|
-
const domainMatch = pathname.match(domainRegex);
|
|
20
|
-
if (domainMatch?.[1]) return [{
|
|
21
|
-
uri: `https://lobste.rs/domains/${domainMatch[1]}.rss`,
|
|
22
|
-
hint: require_utils.composeHint("lobsters:domain")
|
|
23
|
-
}];
|
|
24
|
-
const userMatch = pathname.match(userRegex);
|
|
25
|
-
if (userMatch?.[1]) return [{
|
|
26
|
-
uri: `https://lobste.rs/~${userMatch[1]}/stories.rss`,
|
|
27
|
-
hint: require_utils.composeHint("lobsters:stories")
|
|
28
|
-
}];
|
|
29
|
-
const topMatch = pathname.match(topRegex);
|
|
30
|
-
if (topMatch) {
|
|
31
|
-
const period = topMatch[1];
|
|
32
|
-
if (period) return [{
|
|
33
|
-
uri: `https://lobste.rs/top/${period}/rss`,
|
|
34
|
-
hint: require_utils.composeHint("lobsters:top")
|
|
35
|
-
}];
|
|
36
|
-
return [{
|
|
37
|
-
uri: "https://lobste.rs/top/rss",
|
|
38
|
-
hint: require_utils.composeHint("lobsters:top")
|
|
39
|
-
}];
|
|
40
|
-
}
|
|
41
|
-
if (pathname === "/newest" || pathname === "/newest/") return [{
|
|
42
|
-
uri: "https://lobste.rs/newest.rss",
|
|
43
|
-
hint: require_utils.composeHint("lobsters:newest")
|
|
44
|
-
}];
|
|
45
|
-
if (pathname === "/comments" || pathname === "/comments/") return [{
|
|
46
|
-
uri: "https://lobste.rs/comments.rss",
|
|
47
|
-
hint: require_utils.composeHint("lobsters:comments")
|
|
48
|
-
}];
|
|
49
|
-
return [{
|
|
50
|
-
uri: "https://lobste.rs/rss",
|
|
51
|
-
hint: require_utils.composeHint("lobsters:stories")
|
|
52
|
-
}];
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
//#endregion
|
|
56
|
-
exports.hosts = hosts;
|
|
57
|
-
exports.lobstersHandler = lobstersHandler;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
const require_mastodon = require("../../../favicons/platform/handlers/mastodon.cjs");
|
|
3
|
-
//#region src/feeds/platform/handlers/mastodon.ts
|
|
4
|
-
const profileRegex = /^\/@([^/]+)/;
|
|
5
|
-
const taggedProfileRegex = /^\/@([^/]+)\/tagged\/([^/]+)/;
|
|
6
|
-
const repliesProfileRegex = /^\/@([^/]+)\/with_replies/;
|
|
7
|
-
const mediaProfileRegex = /^\/@([^/]+)\/media/;
|
|
8
|
-
const tagRegex = /^\/tags\/([^/]+)/;
|
|
9
|
-
const isProfilePath = (pathname) => {
|
|
10
|
-
const segments = pathname.split("/").filter(Boolean);
|
|
11
|
-
return segments.length > 0 && segments[0].startsWith("@");
|
|
12
|
-
};
|
|
13
|
-
const isTagPath = (pathname) => {
|
|
14
|
-
const segments = pathname.split("/").filter(Boolean);
|
|
15
|
-
return segments.length >= 2 && segments[0] === "tags";
|
|
16
|
-
};
|
|
17
|
-
const mastodonHandler = {
|
|
18
|
-
match: (url, content, headers) => {
|
|
19
|
-
try {
|
|
20
|
-
const { pathname } = new URL(url);
|
|
21
|
-
if (!isProfilePath(pathname) && !isTagPath(pathname)) return false;
|
|
22
|
-
if (content && require_mastodon.isMastodonHtml(content)) return true;
|
|
23
|
-
if (headers && require_mastodon.isMastodonHeaders(headers)) return true;
|
|
24
|
-
} catch {}
|
|
25
|
-
return false;
|
|
26
|
-
},
|
|
27
|
-
resolve: (url) => {
|
|
28
|
-
try {
|
|
29
|
-
const { origin, pathname } = new URL(url);
|
|
30
|
-
const repliesMatch = pathname.match(repliesProfileRegex);
|
|
31
|
-
if (repliesMatch?.[1]) return [{
|
|
32
|
-
uri: `${origin}/@${repliesMatch[1]}/with_replies.rss`,
|
|
33
|
-
hint: require_utils.composeHint("mastodon:replies")
|
|
34
|
-
}, {
|
|
35
|
-
uri: `${origin}/@${repliesMatch[1]}.rss`,
|
|
36
|
-
hint: require_utils.composeHint("mastodon:posts")
|
|
37
|
-
}];
|
|
38
|
-
const mediaMatch = pathname.match(mediaProfileRegex);
|
|
39
|
-
if (mediaMatch?.[1]) return [{
|
|
40
|
-
uri: `${origin}/@${mediaMatch[1]}/media.rss`,
|
|
41
|
-
hint: require_utils.composeHint("mastodon:media")
|
|
42
|
-
}, {
|
|
43
|
-
uri: `${origin}/@${mediaMatch[1]}.rss`,
|
|
44
|
-
hint: require_utils.composeHint("mastodon:posts")
|
|
45
|
-
}];
|
|
46
|
-
const taggedMatch = pathname.match(taggedProfileRegex);
|
|
47
|
-
if (taggedMatch?.[1] && taggedMatch?.[2]) {
|
|
48
|
-
const uris = [];
|
|
49
|
-
uris.push({
|
|
50
|
-
uri: `${origin}/@${taggedMatch[1]}/tagged/${taggedMatch[2]}.rss`,
|
|
51
|
-
hint: require_utils.composeHint("mastodon:tagged")
|
|
52
|
-
});
|
|
53
|
-
uris.push({
|
|
54
|
-
uri: `${origin}/@${taggedMatch[1]}.rss`,
|
|
55
|
-
hint: require_utils.composeHint("mastodon:posts")
|
|
56
|
-
});
|
|
57
|
-
return uris;
|
|
58
|
-
}
|
|
59
|
-
const userMatch = pathname.match(profileRegex);
|
|
60
|
-
if (userMatch?.[1]) return [{
|
|
61
|
-
uri: `${origin}/@${userMatch[1]}.rss`,
|
|
62
|
-
hint: require_utils.composeHint("mastodon:posts")
|
|
63
|
-
}];
|
|
64
|
-
const tagMatch = pathname.match(tagRegex);
|
|
65
|
-
if (tagMatch?.[1]) return [{
|
|
66
|
-
uri: `${origin}/tags/${tagMatch[1]}.rss`,
|
|
67
|
-
hint: require_utils.composeHint("mastodon:tag")
|
|
68
|
-
}];
|
|
69
|
-
} catch {}
|
|
70
|
-
return [];
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
//#endregion
|
|
74
|
-
exports.mastodonHandler = mastodonHandler;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/mataroa.ts
|
|
3
|
-
const mataroaHandler = {
|
|
4
|
-
match: (url) => {
|
|
5
|
-
return require_utils.isSubdomainOf(url, "mataroa.blog");
|
|
6
|
-
},
|
|
7
|
-
resolve: (url) => {
|
|
8
|
-
const { origin } = new URL(url);
|
|
9
|
-
return [{
|
|
10
|
-
uri: `${origin}/rss/`,
|
|
11
|
-
hint: require_utils.composeHint("mataroa:blog")
|
|
12
|
-
}];
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.mataroaHandler = mataroaHandler;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/medium.ts
|
|
3
|
-
const userRegex = /^\/@([^/]+)/;
|
|
4
|
-
const tagRegex = /^\/tag\/([^/]+)/;
|
|
5
|
-
const publicationTagRegex = /^\/([^/@][^/]+)\/tagged\/([^/]+)/;
|
|
6
|
-
const publicationRegex = /^\/([^/@][^/]+)/;
|
|
7
|
-
const subdomainTagRegex = /^\/tagged\/([^/]+)/;
|
|
8
|
-
const hosts = ["medium.com", "www.medium.com"];
|
|
9
|
-
const excludedPaths = [
|
|
10
|
-
"search",
|
|
11
|
-
"me",
|
|
12
|
-
"new-story",
|
|
13
|
-
"plans",
|
|
14
|
-
"membership"
|
|
15
|
-
];
|
|
16
|
-
const mediumHandler = {
|
|
17
|
-
match: (url) => {
|
|
18
|
-
return require_utils.isHostOf(url, hosts) || require_utils.isSubdomainOf(url, "medium.com");
|
|
19
|
-
},
|
|
20
|
-
resolve: (url) => {
|
|
21
|
-
const { hostname, pathname } = new URL(url);
|
|
22
|
-
const lowerHostname = hostname.toLowerCase();
|
|
23
|
-
if (hosts.includes(lowerHostname)) {
|
|
24
|
-
const userMatch = pathname.match(userRegex);
|
|
25
|
-
if (userMatch?.[1]) return [{
|
|
26
|
-
uri: `https://medium.com/feed/@${userMatch[1]}`,
|
|
27
|
-
hint: require_utils.composeHint("medium:posts")
|
|
28
|
-
}];
|
|
29
|
-
const tagMatch = pathname.match(tagRegex);
|
|
30
|
-
if (tagMatch?.[1]) return [{
|
|
31
|
-
uri: `https://medium.com/feed/tag/${tagMatch[1]}`,
|
|
32
|
-
hint: require_utils.composeHint("medium:tag")
|
|
33
|
-
}];
|
|
34
|
-
const pubTagMatch = pathname.match(publicationTagRegex);
|
|
35
|
-
if (pubTagMatch?.[1] && pubTagMatch?.[2]) {
|
|
36
|
-
const publication = pubTagMatch[1];
|
|
37
|
-
const tag = pubTagMatch[2];
|
|
38
|
-
if (!require_utils.isAnyOf(publication, excludedPaths)) return [{
|
|
39
|
-
uri: `https://medium.com/feed/${publication}/tagged/${tag}`,
|
|
40
|
-
hint: require_utils.composeHint("medium:tagged")
|
|
41
|
-
}];
|
|
42
|
-
}
|
|
43
|
-
const pubMatch = pathname.match(publicationRegex);
|
|
44
|
-
if (pubMatch?.[1]) {
|
|
45
|
-
const publication = pubMatch[1];
|
|
46
|
-
if (!require_utils.isAnyOf(publication, excludedPaths)) return [{
|
|
47
|
-
uri: `https://medium.com/feed/${publication}`,
|
|
48
|
-
hint: require_utils.composeHint("medium:publication")
|
|
49
|
-
}];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (lowerHostname.endsWith(".medium.com") && lowerHostname !== "medium.com" && lowerHostname !== "www.medium.com") {
|
|
53
|
-
const subdomain = lowerHostname.replace(".medium.com", "");
|
|
54
|
-
const tagMatch = pathname.match(subdomainTagRegex);
|
|
55
|
-
if (tagMatch?.[1]) return [{
|
|
56
|
-
uri: `https://${subdomain}.medium.com/feed/tagged/${tagMatch[1]}`,
|
|
57
|
-
hint: require_utils.composeHint("medium:tagged")
|
|
58
|
-
}];
|
|
59
|
-
return [{
|
|
60
|
-
uri: `https://${subdomain}.medium.com/feed`,
|
|
61
|
-
hint: require_utils.composeHint("medium:publication")
|
|
62
|
-
}];
|
|
63
|
-
}
|
|
64
|
-
return [];
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
//#endregion
|
|
68
|
-
exports.mediumHandler = mediumHandler;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/microblog.ts
|
|
3
|
-
const categoryRegex = /^\/categories\/([^/]+)/;
|
|
4
|
-
const microblogHandler = {
|
|
5
|
-
match: (url) => {
|
|
6
|
-
return require_utils.isSubdomainOf(url, "micro.blog");
|
|
7
|
-
},
|
|
8
|
-
resolve: (url) => {
|
|
9
|
-
const { origin, pathname } = new URL(url);
|
|
10
|
-
const uris = [];
|
|
11
|
-
const categoryMatch = pathname.match(categoryRegex);
|
|
12
|
-
if (categoryMatch?.[1]) {
|
|
13
|
-
const category = categoryMatch[1];
|
|
14
|
-
uris.push({
|
|
15
|
-
uri: `${origin}/categories/${category}/feed.xml`,
|
|
16
|
-
hint: require_utils.composeHint("microblog:category-rss")
|
|
17
|
-
});
|
|
18
|
-
uris.push({
|
|
19
|
-
uri: `${origin}/categories/${category}/feed.json`,
|
|
20
|
-
hint: require_utils.composeHint("microblog:category-json")
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
if (pathname.startsWith("/archive")) uris.push({
|
|
24
|
-
uri: `${origin}/archive/index.json`,
|
|
25
|
-
hint: require_utils.composeHint("microblog:archive")
|
|
26
|
-
});
|
|
27
|
-
if (pathname.startsWith("/photos")) uris.push({
|
|
28
|
-
uri: `${origin}/photos/index.json`,
|
|
29
|
-
hint: require_utils.composeHint("microblog:photos")
|
|
30
|
-
});
|
|
31
|
-
if (pathname.startsWith("/replies")) uris.push({
|
|
32
|
-
uri: `${origin}/replies.xml`,
|
|
33
|
-
hint: require_utils.composeHint("microblog:replies")
|
|
34
|
-
});
|
|
35
|
-
uris.push({
|
|
36
|
-
uri: `${origin}/feed.xml`,
|
|
37
|
-
hint: require_utils.composeHint("microblog:posts-rss")
|
|
38
|
-
});
|
|
39
|
-
uris.push({
|
|
40
|
-
uri: `${origin}/feed.json`,
|
|
41
|
-
hint: require_utils.composeHint("microblog:posts-json")
|
|
42
|
-
});
|
|
43
|
-
uris.push({
|
|
44
|
-
uri: `${origin}/podcast.xml`,
|
|
45
|
-
hint: require_utils.composeHint("microblog:podcast")
|
|
46
|
-
});
|
|
47
|
-
uris.push({
|
|
48
|
-
uri: `${origin}/podcast.json`,
|
|
49
|
-
hint: require_utils.composeHint("microblog:podcast-json")
|
|
50
|
-
});
|
|
51
|
-
return uris;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
//#endregion
|
|
55
|
-
exports.microblogHandler = microblogHandler;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/misskey.ts
|
|
3
|
-
const profileRegex = /^\/@([^/.]+)/;
|
|
4
|
-
const isMisskeyHtml = (content) => {
|
|
5
|
-
return require_utils.hasMetaContent(content, "application-name", "Misskey");
|
|
6
|
-
};
|
|
7
|
-
const misskeyHandler = {
|
|
8
|
-
match: (url, content) => {
|
|
9
|
-
try {
|
|
10
|
-
if (!content || !isMisskeyHtml(content)) return false;
|
|
11
|
-
const { pathname } = new URL(url);
|
|
12
|
-
return profileRegex.test(pathname);
|
|
13
|
-
} catch {}
|
|
14
|
-
return false;
|
|
15
|
-
},
|
|
16
|
-
resolve: (url) => {
|
|
17
|
-
try {
|
|
18
|
-
const { origin, pathname } = new URL(url);
|
|
19
|
-
const match = pathname.match(profileRegex);
|
|
20
|
-
if (!match?.[1]) return [];
|
|
21
|
-
return [
|
|
22
|
-
{
|
|
23
|
-
uri: `${origin}/@${match[1]}.atom`,
|
|
24
|
-
hint: require_utils.composeHint("misskey:posts-atom")
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
uri: `${origin}/@${match[1]}.rss`,
|
|
28
|
-
hint: require_utils.composeHint("misskey:posts-rss")
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
uri: `${origin}/@${match[1]}.json`,
|
|
32
|
-
hint: require_utils.composeHint("misskey:posts-json")
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
} catch {}
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
//#endregion
|
|
40
|
-
exports.misskeyHandler = misskeyHandler;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/myanimelist.ts
|
|
3
|
-
const hosts = ["myanimelist.net", "www.myanimelist.net"];
|
|
4
|
-
const userRegex = /^\/(?:profile|animelist|mangalist|history)\/([^/]+)/;
|
|
5
|
-
const myanimelistHandler = {
|
|
6
|
-
match: (url) => {
|
|
7
|
-
return require_utils.isHostOf(url, hosts);
|
|
8
|
-
},
|
|
9
|
-
resolve: (url) => {
|
|
10
|
-
const { pathname } = new URL(url);
|
|
11
|
-
if (pathname === "/news" || pathname.startsWith("/news/")) return [{
|
|
12
|
-
uri: "https://myanimelist.net/rss/news.xml",
|
|
13
|
-
hint: require_utils.composeHint("myanimelist:news")
|
|
14
|
-
}];
|
|
15
|
-
if (pathname === "/featured" || pathname.startsWith("/featured/")) return [{
|
|
16
|
-
uri: "https://myanimelist.net/rss/featured.xml",
|
|
17
|
-
hint: require_utils.composeHint("myanimelist:featured")
|
|
18
|
-
}];
|
|
19
|
-
const match = pathname.match(userRegex);
|
|
20
|
-
if (!match?.[1]) return [];
|
|
21
|
-
const user = match[1];
|
|
22
|
-
const uris = [];
|
|
23
|
-
uris.push({
|
|
24
|
-
uri: `https://myanimelist.net/rss.php?type=rw&u=${user}`,
|
|
25
|
-
hint: require_utils.composeHint("myanimelist:anime")
|
|
26
|
-
});
|
|
27
|
-
uris.push({
|
|
28
|
-
uri: `https://myanimelist.net/rss.php?type=rm&u=${user}`,
|
|
29
|
-
hint: require_utils.composeHint("myanimelist:manga")
|
|
30
|
-
});
|
|
31
|
-
uris.push({
|
|
32
|
-
uri: `https://myanimelist.net/rss.php?type=rrw&u=${user}`,
|
|
33
|
-
hint: require_utils.composeHint("myanimelist:recently-watched")
|
|
34
|
-
});
|
|
35
|
-
uris.push({
|
|
36
|
-
uri: `https://myanimelist.net/rss.php?type=rrm&u=${user}`,
|
|
37
|
-
hint: require_utils.composeHint("myanimelist:recently-read")
|
|
38
|
-
});
|
|
39
|
-
return uris;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
|
-
exports.myanimelistHandler = myanimelistHandler;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/naverBlog.ts
|
|
3
|
-
const hosts = ["blog.naver.com", "m.blog.naver.com"];
|
|
4
|
-
const naverBlogHandler = {
|
|
5
|
-
match: (url) => {
|
|
6
|
-
return require_utils.isHostOf(url, hosts);
|
|
7
|
-
},
|
|
8
|
-
resolve: (url) => {
|
|
9
|
-
const { pathname } = new URL(url);
|
|
10
|
-
const pathSegments = pathname.split("/").filter(Boolean);
|
|
11
|
-
if (pathSegments.length === 0) return [];
|
|
12
|
-
const blogId = pathSegments[0];
|
|
13
|
-
if (blogId.includes(".")) return [];
|
|
14
|
-
return [{
|
|
15
|
-
uri: `https://rss.blog.naver.com/${blogId}.xml`,
|
|
16
|
-
hint: require_utils.composeHint("naver-blog:blog")
|
|
17
|
-
}];
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
exports.naverBlogHandler = naverBlogHandler;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/nebula.ts
|
|
3
|
-
const hosts = ["nebula.tv", "www.nebula.tv"];
|
|
4
|
-
const excludedPaths = [
|
|
5
|
-
"about",
|
|
6
|
-
"classes",
|
|
7
|
-
"library",
|
|
8
|
-
"login",
|
|
9
|
-
"originals",
|
|
10
|
-
"pricing",
|
|
11
|
-
"privacy",
|
|
12
|
-
"search",
|
|
13
|
-
"settings",
|
|
14
|
-
"signup",
|
|
15
|
-
"terms"
|
|
16
|
-
];
|
|
17
|
-
const globalPaths = new Set(["videos", "explore"]);
|
|
18
|
-
const nebulaHandler = {
|
|
19
|
-
match: (url) => {
|
|
20
|
-
return require_utils.isHostOf(url, hosts);
|
|
21
|
-
},
|
|
22
|
-
resolve: (url) => {
|
|
23
|
-
const { pathname, searchParams } = new URL(url);
|
|
24
|
-
const pathSegments = pathname.split("/").filter(Boolean);
|
|
25
|
-
if (pathSegments.length === 0 || globalPaths.has(pathSegments[0])) {
|
|
26
|
-
const rawCategory = searchParams.get("category");
|
|
27
|
-
const category = rawCategory ? rawCategory.toLowerCase() : null;
|
|
28
|
-
const uris = [];
|
|
29
|
-
if (category) {
|
|
30
|
-
uris.push({
|
|
31
|
-
uri: `https://rss.nebula.app/video/categories/${category}.rss`,
|
|
32
|
-
hint: require_utils.composeHint("nebula:category")
|
|
33
|
-
});
|
|
34
|
-
uris.push({
|
|
35
|
-
uri: `https://rss.nebula.app/video/categories/${category}.rss?plus=true`,
|
|
36
|
-
hint: require_utils.composeHint("nebula:category-plus")
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
uris.push({
|
|
40
|
-
uri: "https://rss.nebula.app/video.rss",
|
|
41
|
-
hint: require_utils.composeHint("nebula:videos-all")
|
|
42
|
-
});
|
|
43
|
-
uris.push({
|
|
44
|
-
uri: "https://rss.nebula.app/video.rss?plus=true",
|
|
45
|
-
hint: require_utils.composeHint("nebula:videos-all-plus")
|
|
46
|
-
});
|
|
47
|
-
uris.push({
|
|
48
|
-
uri: "https://rss.nebula.app/video/channels.rss",
|
|
49
|
-
hint: require_utils.composeHint("nebula:channels")
|
|
50
|
-
});
|
|
51
|
-
return uris;
|
|
52
|
-
}
|
|
53
|
-
const slug = pathSegments[0];
|
|
54
|
-
if (require_utils.isAnyOf(slug, excludedPaths)) return [];
|
|
55
|
-
const uris = [];
|
|
56
|
-
uris.push({
|
|
57
|
-
uri: `https://rss.nebula.app/video/channels/${slug}.rss`,
|
|
58
|
-
hint: require_utils.composeHint("nebula:videos")
|
|
59
|
-
});
|
|
60
|
-
uris.push({
|
|
61
|
-
uri: `https://rss.nebula.app/video/channels/${slug}.rss?plus=true`,
|
|
62
|
-
hint: require_utils.composeHint("nebula:videos-plus")
|
|
63
|
-
});
|
|
64
|
-
return uris;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
//#endregion
|
|
68
|
-
exports.nebulaHandler = nebulaHandler;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/note.ts
|
|
3
|
-
const hosts = ["note.com", "www.note.com"];
|
|
4
|
-
const excludedPaths = [
|
|
5
|
-
"about",
|
|
6
|
-
"api",
|
|
7
|
-
"explore",
|
|
8
|
-
"hashtag",
|
|
9
|
-
"help",
|
|
10
|
-
"login",
|
|
11
|
-
"m",
|
|
12
|
-
"n",
|
|
13
|
-
"premium",
|
|
14
|
-
"privacy",
|
|
15
|
-
"ranking",
|
|
16
|
-
"search",
|
|
17
|
-
"settings",
|
|
18
|
-
"signup",
|
|
19
|
-
"terms"
|
|
20
|
-
];
|
|
21
|
-
const hashtagRegex = /^\/hashtag\/([^/]+)/;
|
|
22
|
-
const magazineRegex = /^\/([^/]+)\/m\/([^/]+)/;
|
|
23
|
-
const noteHandler = {
|
|
24
|
-
match: (url) => {
|
|
25
|
-
return require_utils.isHostOf(url, hosts);
|
|
26
|
-
},
|
|
27
|
-
resolve: (url) => {
|
|
28
|
-
const { pathname } = new URL(url);
|
|
29
|
-
const hashtagMatch = pathname.match(hashtagRegex);
|
|
30
|
-
if (hashtagMatch?.[1]) return [{
|
|
31
|
-
uri: `https://note.com/hashtag/${hashtagMatch[1]}/rss`,
|
|
32
|
-
hint: require_utils.composeHint("note:hashtag")
|
|
33
|
-
}];
|
|
34
|
-
const magazineMatch = pathname.match(magazineRegex);
|
|
35
|
-
if (magazineMatch?.[1] && magazineMatch?.[2]) return [{
|
|
36
|
-
uri: `https://note.com/${magazineMatch[1]}/m/${magazineMatch[2]}/rss`,
|
|
37
|
-
hint: require_utils.composeHint("note:magazine")
|
|
38
|
-
}];
|
|
39
|
-
const pathSegments = pathname.split("/").filter(Boolean);
|
|
40
|
-
if (pathSegments.length === 0) return [{
|
|
41
|
-
uri: "https://note.com/rss",
|
|
42
|
-
hint: require_utils.composeHint("note:featured")
|
|
43
|
-
}];
|
|
44
|
-
const username = pathSegments[0];
|
|
45
|
-
if (require_utils.isAnyOf(username, excludedPaths)) return [];
|
|
46
|
-
return [{
|
|
47
|
-
uri: `https://note.com/${username}/rss`,
|
|
48
|
-
hint: require_utils.composeHint("note:blog")
|
|
49
|
-
}];
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
//#endregion
|
|
53
|
-
exports.noteHandler = noteHandler;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/observable.ts
|
|
3
|
-
const hosts = ["observablehq.com", "www.observablehq.com"];
|
|
4
|
-
const collectionRegex = /^\/@([^/]+)\/collection\/([^/]+)/;
|
|
5
|
-
const userRegex = /^\/@([^/]+)/;
|
|
6
|
-
const observableHandler = {
|
|
7
|
-
match: (url) => {
|
|
8
|
-
return require_utils.isHostOf(url, hosts);
|
|
9
|
-
},
|
|
10
|
-
resolve: (url) => {
|
|
11
|
-
const { pathname } = new URL(url);
|
|
12
|
-
if (pathname === "/recent" || pathname === "/recent/") return [{
|
|
13
|
-
uri: "https://api.observablehq.com/documents/public.rss",
|
|
14
|
-
hint: require_utils.composeHint("observable:recent")
|
|
15
|
-
}];
|
|
16
|
-
if (pathname === "/trending" || pathname === "/trending/") return [{
|
|
17
|
-
uri: "https://api.observablehq.com/documents/trending.rss",
|
|
18
|
-
hint: require_utils.composeHint("observable:trending")
|
|
19
|
-
}];
|
|
20
|
-
const collectionMatch = pathname.match(collectionRegex);
|
|
21
|
-
if (collectionMatch?.[1] && collectionMatch?.[2]) return [{
|
|
22
|
-
uri: `https://api.observablehq.com/collection/@${collectionMatch[1]}/${collectionMatch[2]}.rss`,
|
|
23
|
-
hint: require_utils.composeHint("observable:collection")
|
|
24
|
-
}];
|
|
25
|
-
const userMatch = pathname.match(userRegex);
|
|
26
|
-
if (!userMatch?.[1]) return [];
|
|
27
|
-
return [{
|
|
28
|
-
uri: `https://api.observablehq.com/documents/@${userMatch[1]}.rss`,
|
|
29
|
-
hint: require_utils.composeHint("observable:notebooks")
|
|
30
|
-
}];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
exports.observableHandler = observableHandler;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/odysee.ts
|
|
3
|
-
const hosts = ["odysee.com", "www.odysee.com"];
|
|
4
|
-
const channelRegex = /^\/(@[^/:]+:[a-f0-9]+)/i;
|
|
5
|
-
const odyseeHandler = {
|
|
6
|
-
match: (url) => {
|
|
7
|
-
return require_utils.isHostOf(url, hosts);
|
|
8
|
-
},
|
|
9
|
-
resolve: (url) => {
|
|
10
|
-
const { pathname } = new URL(url);
|
|
11
|
-
const match = pathname.match(channelRegex);
|
|
12
|
-
if (!match?.[1]) return [];
|
|
13
|
-
return [{
|
|
14
|
-
uri: `https://odysee.com/$/rss/${match[1]}`,
|
|
15
|
-
hint: require_utils.composeHint("odysee:videos")
|
|
16
|
-
}];
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
exports.odyseeHandler = odyseeHandler;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/pagecord.ts
|
|
3
|
-
const pagecordHandler = {
|
|
4
|
-
match: (url) => {
|
|
5
|
-
return require_utils.isSubdomainOf(url, "pagecord.com") && !require_utils.isHostOf(url, "www.pagecord.com");
|
|
6
|
-
},
|
|
7
|
-
resolve: (url) => {
|
|
8
|
-
const { origin } = new URL(url);
|
|
9
|
-
return [{
|
|
10
|
-
uri: `${origin}/feed.xml`,
|
|
11
|
-
hint: require_utils.composeHint("pagecord:blog")
|
|
12
|
-
}];
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.pagecordHandler = pagecordHandler;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/paragraph.ts
|
|
3
|
-
const hosts = ["paragraph.com", "www.paragraph.com"];
|
|
4
|
-
const userRegex = /^\/@([^/]+)/;
|
|
5
|
-
const paragraphHandler = {
|
|
6
|
-
match: (url) => {
|
|
7
|
-
return require_utils.isHostOf(url, hosts);
|
|
8
|
-
},
|
|
9
|
-
resolve: (url) => {
|
|
10
|
-
const { pathname } = new URL(url);
|
|
11
|
-
const userMatch = pathname.match(userRegex);
|
|
12
|
-
if (!userMatch?.[1]) return [];
|
|
13
|
-
return [{
|
|
14
|
-
uri: `https://api.paragraph.com/blogs/rss/@${userMatch[1]}`,
|
|
15
|
-
hint: require_utils.composeHint("paragraph:blog")
|
|
16
|
-
}];
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
exports.paragraphHandler = paragraphHandler;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const require_utils = require("../../../common/utils.cjs");
|
|
2
|
-
//#region src/feeds/platform/handlers/pika.ts
|
|
3
|
-
const tagRegex = /^\/tag\/([^/]+)/;
|
|
4
|
-
const pikaHandler = {
|
|
5
|
-
match: (url) => {
|
|
6
|
-
return require_utils.isSubdomainOf(url, "pika.page");
|
|
7
|
-
},
|
|
8
|
-
resolve: (url) => {
|
|
9
|
-
const { origin, pathname } = new URL(url);
|
|
10
|
-
const uris = [];
|
|
11
|
-
const tagMatch = pathname.match(tagRegex);
|
|
12
|
-
if (tagMatch?.[1]) {
|
|
13
|
-
const tag = tagMatch[1];
|
|
14
|
-
uris.push({
|
|
15
|
-
uri: `${origin}/tag/${tag}/feed`,
|
|
16
|
-
hint: require_utils.composeHint("pika:tag-atom")
|
|
17
|
-
});
|
|
18
|
-
uris.push({
|
|
19
|
-
uri: `${origin}/tag/${tag}/feed.rss`,
|
|
20
|
-
hint: require_utils.composeHint("pika:tag-rss")
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
uris.push({
|
|
24
|
-
uri: `${origin}/posts_feed`,
|
|
25
|
-
hint: require_utils.composeHint("pika:posts-atom")
|
|
26
|
-
});
|
|
27
|
-
uris.push({
|
|
28
|
-
uri: `${origin}/posts_feed.rss`,
|
|
29
|
-
hint: require_utils.composeHint("pika:posts-rss")
|
|
30
|
-
});
|
|
31
|
-
return uris;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
//#endregion
|
|
35
|
-
exports.pikaHandler = pikaHandler;
|