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.
Files changed (180) hide show
  1. package/dist/common/discover/defaults.js +1 -3
  2. package/dist/common/discover/utils.d.ts +2 -3
  3. package/dist/common/uris/feed/types.d.ts +2 -2
  4. package/dist/feeds/extractors.js +2 -2
  5. package/dist/feeds/platform/handlers/discourse.js +2 -6
  6. package/dist/feeds/platform/handlers/libsyn.js +1 -1
  7. package/package.json +23 -62
  8. package/dist/blogrolls/defaults.cjs +0 -57
  9. package/dist/blogrolls/defaults.d.cts +0 -16
  10. package/dist/blogrolls/extractors.cjs +0 -21
  11. package/dist/blogrolls/extractors.d.cts +0 -7
  12. package/dist/blogrolls/index.cjs +0 -25
  13. package/dist/blogrolls/index.d.cts +0 -7
  14. package/dist/blogrolls/types.d.cts +0 -6
  15. package/dist/blogrolls.cjs +0 -12
  16. package/dist/blogrolls.d.cts +0 -4
  17. package/dist/common/discover/defaults.cjs +0 -46
  18. package/dist/common/discover/defaults.d.cts +0 -6
  19. package/dist/common/discover/index.cjs +0 -105
  20. package/dist/common/discover/utils.cjs +0 -101
  21. package/dist/common/discover/utils.d.cts +0 -6
  22. package/dist/common/locales.cjs +0 -348
  23. package/dist/common/types.cjs +0 -10
  24. package/dist/common/types.d.cts +0 -90
  25. package/dist/common/uris/feed/index.cjs +0 -12
  26. package/dist/common/uris/feed/index.d.cts +0 -6
  27. package/dist/common/uris/feed/types.d.cts +0 -9
  28. package/dist/common/uris/guess/index.cjs +0 -8
  29. package/dist/common/uris/guess/index.d.cts +0 -7
  30. package/dist/common/uris/guess/types.d.cts +0 -10
  31. package/dist/common/uris/guess/utils.cjs +0 -42
  32. package/dist/common/uris/guess/utils.d.cts +0 -8
  33. package/dist/common/uris/headers/index.cjs +0 -26
  34. package/dist/common/uris/headers/index.d.cts +0 -6
  35. package/dist/common/uris/headers/types.d.cts +0 -9
  36. package/dist/common/uris/html/handlers.cjs +0 -59
  37. package/dist/common/uris/html/index.cjs +0 -35
  38. package/dist/common/uris/html/index.d.cts +0 -6
  39. package/dist/common/uris/html/types.d.cts +0 -13
  40. package/dist/common/uris/index.cjs +0 -32
  41. package/dist/common/uris/platform/index.cjs +0 -10
  42. package/dist/common/uris/platform/index.d.cts +0 -7
  43. package/dist/common/uris/platform/types.d.cts +0 -13
  44. package/dist/common/utils.cjs +0 -98
  45. package/dist/common/utils.d.cts +0 -12
  46. package/dist/favicons/defaults.cjs +0 -65
  47. package/dist/favicons/defaults.d.cts +0 -18
  48. package/dist/favicons/extractors.cjs +0 -25
  49. package/dist/favicons/extractors.d.cts +0 -7
  50. package/dist/favicons/index.cjs +0 -29
  51. package/dist/favicons/index.d.cts +0 -7
  52. package/dist/favicons/platform/handlers/bluesky.cjs +0 -27
  53. package/dist/favicons/platform/handlers/codeberg.cjs +0 -19
  54. package/dist/favicons/platform/handlers/deviantart.cjs +0 -29
  55. package/dist/favicons/platform/handlers/devto.cjs +0 -31
  56. package/dist/favicons/platform/handlers/github.cjs +0 -19
  57. package/dist/favicons/platform/handlers/githubGist.cjs +0 -19
  58. package/dist/favicons/platform/handlers/gitlab.cjs +0 -38
  59. package/dist/favicons/platform/handlers/lobsters.cjs +0 -21
  60. package/dist/favicons/platform/handlers/mastodon.cjs +0 -40
  61. package/dist/favicons/platform/handlers/reddit.cjs +0 -42
  62. package/dist/favicons/platform/handlers/sourceforge.cjs +0 -21
  63. package/dist/favicons/platform/handlers/tumblr.cjs +0 -16
  64. package/dist/favicons/types.d.cts +0 -4
  65. package/dist/favicons/utils.cjs +0 -10
  66. package/dist/favicons.cjs +0 -12
  67. package/dist/favicons.d.cts +0 -4
  68. package/dist/feeds/defaults.cjs +0 -290
  69. package/dist/feeds/defaults.d.cts +0 -21
  70. package/dist/feeds/extractors.cjs +0 -46
  71. package/dist/feeds/extractors.d.cts +0 -7
  72. package/dist/feeds/index.cjs +0 -26
  73. package/dist/feeds/index.d.cts +0 -7
  74. package/dist/feeds/platform/handlers/acast.cjs +0 -26
  75. package/dist/feeds/platform/handlers/ameblo.cjs +0 -36
  76. package/dist/feeds/platform/handlers/applePodcasts.cjs +0 -26
  77. package/dist/feeds/platform/handlers/arena.cjs +0 -42
  78. package/dist/feeds/platform/handlers/artstation.cjs +0 -52
  79. package/dist/feeds/platform/handlers/audioboom.cjs +0 -23
  80. package/dist/feeds/platform/handlers/bearblog.cjs +0 -45
  81. package/dist/feeds/platform/handlers/behance.cjs +0 -56
  82. package/dist/feeds/platform/handlers/blogspot.cjs +0 -72
  83. package/dist/feeds/platform/handlers/bluesky.cjs +0 -20
  84. package/dist/feeds/platform/handlers/bookwyrm.cjs +0 -48
  85. package/dist/feeds/platform/handlers/buttondown.cjs +0 -43
  86. package/dist/feeds/platform/handlers/buzzsprout.cjs +0 -22
  87. package/dist/feeds/platform/handlers/codeberg.cjs +0 -69
  88. package/dist/feeds/platform/handlers/csdn.cjs +0 -20
  89. package/dist/feeds/platform/handlers/dailymotion.cjs +0 -86
  90. package/dist/feeds/platform/handlers/deviantart.cjs +0 -85
  91. package/dist/feeds/platform/handlers/devto.cjs +0 -58
  92. package/dist/feeds/platform/handlers/discourse.cjs +0 -70
  93. package/dist/feeds/platform/handlers/douban.cjs +0 -56
  94. package/dist/feeds/platform/handlers/dreamwidth.cjs +0 -48
  95. package/dist/feeds/platform/handlers/exblog.cjs +0 -35
  96. package/dist/feeds/platform/handlers/fireside.cjs +0 -24
  97. package/dist/feeds/platform/handlers/friendica.cjs +0 -44
  98. package/dist/feeds/platform/handlers/ghost.cjs +0 -30
  99. package/dist/feeds/platform/handlers/github.cjs +0 -122
  100. package/dist/feeds/platform/handlers/githubGist.cjs +0 -56
  101. package/dist/feeds/platform/handlers/gitlab.cjs +0 -98
  102. package/dist/feeds/platform/handlers/goodreads.cjs +0 -49
  103. package/dist/feeds/platform/handlers/hackernews.cjs +0 -21
  104. package/dist/feeds/platform/handlers/hashnode.cjs +0 -16
  105. package/dist/feeds/platform/handlers/hatenablog.cjs +0 -56
  106. package/dist/feeds/platform/handlers/hearthis.cjs +0 -32
  107. package/dist/feeds/platform/handlers/heyWorld.cjs +0 -18
  108. package/dist/feeds/platform/handlers/insanejournal.cjs +0 -69
  109. package/dist/feeds/platform/handlers/itchio.cjs +0 -111
  110. package/dist/feeds/platform/handlers/kickstarter.cjs +0 -22
  111. package/dist/feeds/platform/handlers/lemmy.cjs +0 -88
  112. package/dist/feeds/platform/handlers/letterboxd.cjs +0 -46
  113. package/dist/feeds/platform/handlers/libsyn.cjs +0 -25
  114. package/dist/feeds/platform/handlers/listed.cjs +0 -20
  115. package/dist/feeds/platform/handlers/livejournal.cjs +0 -68
  116. package/dist/feeds/platform/handlers/lobsters.cjs +0 -57
  117. package/dist/feeds/platform/handlers/mastodon.cjs +0 -74
  118. package/dist/feeds/platform/handlers/mataroa.cjs +0 -16
  119. package/dist/feeds/platform/handlers/medium.cjs +0 -68
  120. package/dist/feeds/platform/handlers/microblog.cjs +0 -55
  121. package/dist/feeds/platform/handlers/misskey.cjs +0 -40
  122. package/dist/feeds/platform/handlers/myanimelist.cjs +0 -43
  123. package/dist/feeds/platform/handlers/naverBlog.cjs +0 -21
  124. package/dist/feeds/platform/handlers/nebula.cjs +0 -68
  125. package/dist/feeds/platform/handlers/note.cjs +0 -53
  126. package/dist/feeds/platform/handlers/observable.cjs +0 -34
  127. package/dist/feeds/platform/handlers/odysee.cjs +0 -20
  128. package/dist/feeds/platform/handlers/pagecord.cjs +0 -16
  129. package/dist/feeds/platform/handlers/paragraph.cjs +0 -20
  130. package/dist/feeds/platform/handlers/pika.cjs +0 -35
  131. package/dist/feeds/platform/handlers/pinterest.cjs +0 -57
  132. package/dist/feeds/platform/handlers/pixelfed.cjs +0 -46
  133. package/dist/feeds/platform/handlers/pleroma.cjs +0 -34
  134. package/dist/feeds/platform/handlers/podbean.cjs +0 -29
  135. package/dist/feeds/platform/handlers/podigee.cjs +0 -29
  136. package/dist/feeds/platform/handlers/posthaven.cjs +0 -24
  137. package/dist/feeds/platform/handlers/producthunt.cjs +0 -29
  138. package/dist/feeds/platform/handlers/prose.cjs +0 -26
  139. package/dist/feeds/platform/handlers/qiita.cjs +0 -58
  140. package/dist/feeds/platform/handlers/reddit.cjs +0 -149
  141. package/dist/feeds/platform/handlers/rssCom.cjs +0 -20
  142. package/dist/feeds/platform/handlers/seesaa.cjs +0 -22
  143. package/dist/feeds/platform/handlers/soundcloud.cjs +0 -39
  144. package/dist/feeds/platform/handlers/sourceforge.cjs +0 -53
  145. package/dist/feeds/platform/handlers/spreaker.cjs +0 -21
  146. package/dist/feeds/platform/handlers/stackExchange.cjs +0 -64
  147. package/dist/feeds/platform/handlers/steam.cjs +0 -35
  148. package/dist/feeds/platform/handlers/substack.cjs +0 -23
  149. package/dist/feeds/platform/handlers/tildes.cjs +0 -41
  150. package/dist/feeds/platform/handlers/tistory.cjs +0 -16
  151. package/dist/feeds/platform/handlers/transistor.cjs +0 -29
  152. package/dist/feeds/platform/handlers/tumblr.cjs +0 -24
  153. package/dist/feeds/platform/handlers/v2ex.cjs +0 -35
  154. package/dist/feeds/platform/handlers/velog.cjs +0 -24
  155. package/dist/feeds/platform/handlers/vimeo.cjs +0 -75
  156. package/dist/feeds/platform/handlers/weblogLol.cjs +0 -26
  157. package/dist/feeds/platform/handlers/weebly.cjs +0 -25
  158. package/dist/feeds/platform/handlers/wordpress.cjs +0 -209
  159. package/dist/feeds/platform/handlers/wpengine.cjs +0 -10
  160. package/dist/feeds/platform/handlers/writeas.cjs +0 -51
  161. package/dist/feeds/platform/handlers/ximalaya.cjs +0 -20
  162. package/dist/feeds/platform/handlers/youtube.cjs +0 -97
  163. package/dist/feeds/platform/handlers/zenn.cjs +0 -54
  164. package/dist/feeds/types.d.cts +0 -9
  165. package/dist/feeds.cjs +0 -16
  166. package/dist/feeds.d.cts +0 -4
  167. package/dist/hubs/discover/index.cjs +0 -30
  168. package/dist/hubs/discover/index.d.cts +0 -7
  169. package/dist/hubs/discover/types.d.cts +0 -15
  170. package/dist/hubs/feed/index.cjs +0 -32
  171. package/dist/hubs/headers/index.cjs +0 -17
  172. package/dist/hubs/html/index.cjs +0 -28
  173. package/dist/hubs.cjs +0 -0
  174. package/dist/hubs.d.cts +0 -2
  175. package/dist/index.cjs +0 -13
  176. package/dist/index.d.cts +0 -8
  177. package/dist/methods.cjs +0 -15
  178. package/dist/methods.d.cts +0 -7
  179. package/dist/utils.cjs +0 -9
  180. 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/pinterest.ts
3
- const hosts = [
4
- "pinterest.com",
5
- "www.pinterest.com",
6
- "pin.it"
7
- ];
8
- const excludedPaths = [
9
- "_",
10
- "about",
11
- "business",
12
- "convert",
13
- "explore",
14
- "ideas",
15
- "login",
16
- "news_hub",
17
- "password",
18
- "pin",
19
- "privacy",
20
- "resource",
21
- "search",
22
- "settings",
23
- "terms",
24
- "today",
25
- "topics"
26
- ];
27
- const pinterestHandler = {
28
- match: (url) => {
29
- return require_utils.isHostOf(url, hosts);
30
- },
31
- resolve: (url) => {
32
- const { pathname } = new URL(url);
33
- const pathSegments = pathname.split("/").filter(Boolean);
34
- if (pathSegments.length === 0) return [];
35
- const username = pathSegments[0];
36
- if (require_utils.isAnyOf(username, excludedPaths)) return [];
37
- const reservedBoardSlugs = new Set([
38
- "pins",
39
- "boards",
40
- "_saved",
41
- "_created",
42
- "followers",
43
- "following"
44
- ]);
45
- const board = pathSegments[1];
46
- if (board && !reservedBoardSlugs.has(board)) return [{
47
- uri: `https://www.pinterest.com/${username}/${board}.rss`,
48
- hint: require_utils.composeHint("pinterest:board")
49
- }];
50
- return [{
51
- uri: `https://www.pinterest.com/${username}/feed.rss`,
52
- hint: require_utils.composeHint("pinterest:pins")
53
- }];
54
- }
55
- };
56
- //#endregion
57
- exports.pinterestHandler = pinterestHandler;
@@ -1,46 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/pixelfed.ts
3
- const profileRegex = /^\/(?:users\/)?([a-zA-Z0-9_]+)\/?$/;
4
- const excludedPaths = [
5
- "admin",
6
- "api",
7
- "discover",
8
- "i",
9
- "login",
10
- "notifications",
11
- "p",
12
- "register",
13
- "settings",
14
- "site",
15
- "storage",
16
- "timeline",
17
- "users"
18
- ];
19
- const isPixelfedHtml = (content) => {
20
- return require_utils.hasMetaContent(content, "generator", "pixelfed");
21
- };
22
- const pixelfedHandler = {
23
- match: (url, content) => {
24
- try {
25
- if (!content || !isPixelfedHtml(content)) return false;
26
- const { pathname } = new URL(url);
27
- const match = pathname.match(profileRegex);
28
- return Boolean(match?.[1] && !excludedPaths.includes(match[1]));
29
- } catch {}
30
- return false;
31
- },
32
- resolve: (url) => {
33
- try {
34
- const { origin, pathname } = new URL(url);
35
- const match = pathname.match(profileRegex);
36
- if (!match?.[1] || excludedPaths.includes(match[1])) return [];
37
- return [{
38
- uri: `${origin}/users/${match[1]}.atom`,
39
- hint: require_utils.composeHint("pixelfed:posts")
40
- }];
41
- } catch {}
42
- return [];
43
- }
44
- };
45
- //#endregion
46
- exports.pixelfedHandler = pixelfedHandler;
@@ -1,34 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/pleroma.ts
3
- const profileRegex = /^\/users\/([^/]+)/;
4
- const pleromaApiRegex = /\/api\/pleroma\//i;
5
- const isPleromaHtml = (content) => {
6
- return pleromaApiRegex.test(content);
7
- };
8
- const pleromaHandler = {
9
- match: (url, content) => {
10
- try {
11
- if (!content || !isPleromaHtml(content)) return false;
12
- const { pathname } = new URL(url);
13
- return profileRegex.test(pathname);
14
- } catch {}
15
- return false;
16
- },
17
- resolve: (url) => {
18
- try {
19
- const { origin, pathname } = new URL(url);
20
- const match = pathname.match(profileRegex);
21
- if (!match?.[1]) return [];
22
- return [{
23
- uri: `${origin}/users/${match[1]}/feed.atom`,
24
- hint: require_utils.composeHint("pleroma:posts")
25
- }, {
26
- uri: `${origin}/users/${match[1]}/feed.rss`,
27
- hint: require_utils.composeHint("pleroma:posts-rss")
28
- }];
29
- } catch {}
30
- return [];
31
- }
32
- };
33
- //#endregion
34
- exports.pleromaHandler = pleromaHandler;
@@ -1,29 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/podbean.ts
3
- const domainSuffix = /\.podbean\.com$/i;
4
- const reservedSlugs = new Set([
5
- "www",
6
- "feed",
7
- "pbcdn1",
8
- "sponsorship",
9
- "podads",
10
- "help",
11
- "blog",
12
- "support"
13
- ]);
14
- const podbeanHandler = {
15
- match: (url) => {
16
- if (!require_utils.isSubdomainOf(url, "podbean.com")) return false;
17
- const slug = new URL(url).hostname.toLowerCase().replace(domainSuffix, "");
18
- return !reservedSlugs.has(slug);
19
- },
20
- resolve: (url) => {
21
- const { hostname } = new URL(url);
22
- return [{
23
- uri: `https://feed.podbean.com/${hostname.replace(domainSuffix, "")}/feed.xml`,
24
- hint: require_utils.composeHint("podbean:podcast")
25
- }];
26
- }
27
- };
28
- //#endregion
29
- exports.podbeanHandler = podbeanHandler;
@@ -1,29 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/podigee.ts
3
- const domainSuffix = /\.podigee\.io$/i;
4
- const reservedSlugs = new Set([
5
- "www",
6
- "app",
7
- "help",
8
- "hilfe",
9
- "blog",
10
- "status",
11
- "player",
12
- "cdn"
13
- ]);
14
- const podigeeHandler = {
15
- match: (url) => {
16
- if (!require_utils.isSubdomainOf(url, "podigee.io")) return false;
17
- const slug = new URL(url).hostname.toLowerCase().replace(domainSuffix, "");
18
- return !reservedSlugs.has(slug);
19
- },
20
- resolve: (url) => {
21
- const { origin } = new URL(url);
22
- return [{
23
- uri: `${origin}/feed/mp3`,
24
- hint: require_utils.composeHint("podigee:podcast")
25
- }];
26
- }
27
- };
28
- //#endregion
29
- exports.podigeeHandler = podigeeHandler;
@@ -1,24 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/posthaven.ts
3
- const tagRegex = /^\/tag\/([^/]+)/;
4
- const posthavenHandler = {
5
- match: (url) => {
6
- return require_utils.isSubdomainOf(url, "posthaven.com");
7
- },
8
- resolve: (url) => {
9
- const { origin, pathname } = new URL(url);
10
- const uris = [];
11
- const tagMatch = pathname.match(tagRegex);
12
- if (tagMatch?.[1]) uris.push({
13
- uri: `${origin}/tag/${tagMatch[1]}.atom`,
14
- hint: require_utils.composeHint("posthaven:tag")
15
- });
16
- uris.push({
17
- uri: `${origin}/posts.atom`,
18
- hint: require_utils.composeHint("posthaven:posts")
19
- });
20
- return uris;
21
- }
22
- };
23
- //#endregion
24
- exports.posthavenHandler = posthavenHandler;
@@ -1,29 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/producthunt.ts
3
- const hosts = ["producthunt.com", "www.producthunt.com"];
4
- const topicRegex = /^\/topics\/([a-zA-Z0-9_-]+)/;
5
- const categoryRegex = /^\/categories\/([a-zA-Z0-9_-]+)/;
6
- const producthuntHandler = {
7
- match: (url) => {
8
- return require_utils.isHostOf(url, hosts);
9
- },
10
- resolve: (url) => {
11
- const { pathname } = new URL(url);
12
- const topicMatch = pathname.match(topicRegex);
13
- if (topicMatch?.[1]) return [{
14
- uri: `https://www.producthunt.com/feed?topic=${topicMatch[1]}`,
15
- hint: require_utils.composeHint("producthunt:topic")
16
- }];
17
- const categoryMatch = pathname.match(categoryRegex);
18
- if (categoryMatch?.[1]) return [{
19
- uri: `https://www.producthunt.com/feed?category=${categoryMatch[1]}`,
20
- hint: require_utils.composeHint("producthunt:category")
21
- }];
22
- return [{
23
- uri: "https://www.producthunt.com/feed",
24
- hint: require_utils.composeHint("producthunt:products")
25
- }];
26
- }
27
- };
28
- //#endregion
29
- exports.producthuntHandler = producthuntHandler;
@@ -1,26 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/prose.ts
3
- const apexHosts = ["prose.sh", "www.prose.sh"];
4
- const proseHandler = {
5
- match: (url) => {
6
- return require_utils.isSubdomainOf(url, "prose.sh") || require_utils.isHostOf(url, apexHosts);
7
- },
8
- resolve: (url) => {
9
- const { origin, searchParams } = new URL(url);
10
- if (require_utils.isHostOf(url, apexHosts)) return [{
11
- uri: "https://prose.sh/rss",
12
- hint: require_utils.composeHint("prose:discovery")
13
- }];
14
- const tag = searchParams.get("tag");
15
- if (tag) return [{
16
- uri: `${origin}/rss?tag=${encodeURIComponent(tag)}`,
17
- hint: require_utils.composeHint("prose:tag")
18
- }];
19
- return [{
20
- uri: `${origin}/rss`,
21
- hint: require_utils.composeHint("prose:blog")
22
- }];
23
- }
24
- };
25
- //#endregion
26
- exports.proseHandler = proseHandler;
@@ -1,58 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/qiita.ts
3
- const hosts = ["qiita.com", "www.qiita.com"];
4
- const excludedPaths = [
5
- "about",
6
- "api",
7
- "login",
8
- "official-columns",
9
- "organizations",
10
- "popular-items",
11
- "privacy",
12
- "search",
13
- "settings",
14
- "signup",
15
- "tags",
16
- "terms",
17
- "trend"
18
- ];
19
- const tagRegex = /^\/tags\/([^/]+)/;
20
- const organizationRegex = /^\/organizations\/([^/]+)/;
21
- const popularItemsRegex = /^\/popular-items(\/|$)/;
22
- const officialColumnsRegex = /^\/official-columns(\/|$)/;
23
- const qiitaHandler = {
24
- match: (url) => {
25
- return require_utils.isHostOf(url, hosts);
26
- },
27
- resolve: (url) => {
28
- const { pathname } = new URL(url);
29
- const tagMatch = pathname.match(tagRegex);
30
- if (tagMatch?.[1]) return [{
31
- uri: `https://qiita.com/tags/${tagMatch[1]}/feed.atom`,
32
- hint: require_utils.composeHint("qiita:tag")
33
- }];
34
- const orgMatch = pathname.match(organizationRegex);
35
- if (orgMatch?.[1]) return [{
36
- uri: `https://qiita.com/organizations/${orgMatch[1]}/activities.atom`,
37
- hint: require_utils.composeHint("qiita:organization")
38
- }];
39
- if (popularItemsRegex.test(pathname)) return [{
40
- uri: "https://qiita.com/popular-items/feed.atom",
41
- hint: require_utils.composeHint("qiita:popular")
42
- }];
43
- if (officialColumnsRegex.test(pathname)) return [{
44
- uri: "https://qiita.com/official-columns/feed/",
45
- hint: require_utils.composeHint("qiita:zine")
46
- }];
47
- const pathSegments = pathname.split("/").filter(Boolean);
48
- if (pathSegments.length === 0) return [];
49
- const username = pathSegments[0];
50
- if (require_utils.isAnyOf(username, excludedPaths)) return [];
51
- return [{
52
- uri: `https://qiita.com/${username}/feed.atom`,
53
- hint: require_utils.composeHint("qiita:posts")
54
- }];
55
- }
56
- };
57
- //#endregion
58
- exports.qiitaHandler = qiitaHandler;
@@ -1,149 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/reddit.ts
3
- const commentsRegex = /^\/r\/([^/]+)\/comments\/([^/]+)/;
4
- const subredditWikiRegex = /^\/r\/([^/]+)\/wiki/;
5
- const subredditSearchRegex = /^\/r\/([^/]+)\/search/;
6
- const subredditRegex = /^\/r\/([^/]+)(?:\/([^/]+))?/;
7
- const multiredditRegex = /^\/user\/([^/]+)\/m\/([^/]+)/;
8
- const userRegex = /^\/(?:u|user)\/([^/]+)(?:\/(submitted|comments))?/;
9
- const domainRegex = /^\/domain\/([^/]+)/;
10
- const subredditsRegex = /^\/(?:subreddits|reddits)(?:\/(new|popular))?/;
11
- const hosts = [
12
- "reddit.com",
13
- "www.reddit.com",
14
- "old.reddit.com",
15
- "new.reddit.com"
16
- ];
17
- const sortOptions = [
18
- "hot",
19
- "new",
20
- "rising",
21
- "controversial",
22
- "top",
23
- "best"
24
- ];
25
- const timeOptions = new Set([
26
- "hour",
27
- "day",
28
- "week",
29
- "month",
30
- "year",
31
- "all"
32
- ]);
33
- const timeFilteredSorts = new Set(["top", "controversial"]);
34
- const getTimeframeSuffix = (sort, searchParams) => {
35
- if (!timeFilteredSorts.has(sort)) return "";
36
- const timeframe = searchParams.get("t");
37
- if (timeframe && timeOptions.has(timeframe)) return `?t=${timeframe}`;
38
- return "";
39
- };
40
- const redditHandler = {
41
- match: (url) => {
42
- return require_utils.isHostOf(url, hosts);
43
- },
44
- resolve: (url) => {
45
- const { pathname, searchParams } = new URL(url);
46
- const pathSegments = pathname.split("/").filter(Boolean);
47
- if (pathSegments.length === 0) return [{
48
- uri: "https://www.reddit.com/.rss",
49
- hint: require_utils.composeHint("reddit:posts")
50
- }];
51
- if (pathSegments.length === 1 && require_utils.isAnyOf(pathSegments[0], sortOptions)) {
52
- const sort = pathSegments[0];
53
- return [{
54
- uri: `https://www.reddit.com/${sort}/.rss${getTimeframeSuffix(sort, searchParams)}`,
55
- hint: require_utils.composeHint("reddit:posts")
56
- }];
57
- }
58
- if (pathSegments[0] === "search") {
59
- const query = searchParams.get("q");
60
- if (query) return [{
61
- uri: `https://www.reddit.com/search.rss?q=${encodeURIComponent(query)}`,
62
- hint: require_utils.composeHint("reddit:search")
63
- }];
64
- }
65
- const subredditsMatch = pathname.match(subredditsRegex);
66
- if (subredditsMatch) {
67
- const sort = subredditsMatch[1];
68
- return [{
69
- uri: `https://www.reddit.com/${sort ? `subreddits/${sort}` : "subreddits"}/.rss`,
70
- hint: require_utils.composeHint("reddit:subreddits")
71
- }];
72
- }
73
- const subredditSearchMatch = pathname.match(subredditSearchRegex);
74
- if (subredditSearchMatch?.[1]) {
75
- const subreddit = subredditSearchMatch[1];
76
- const query = searchParams.get("q");
77
- if (query) return [{
78
- uri: `https://www.reddit.com/r/${subreddit}/search.rss?q=${encodeURIComponent(query)}&restrict_sr=on`,
79
- hint: require_utils.composeHint("reddit:search")
80
- }];
81
- }
82
- const subredditWikiMatch = pathname.match(subredditWikiRegex);
83
- if (subredditWikiMatch?.[1]) return [{
84
- uri: `https://www.reddit.com/r/${subredditWikiMatch[1]}/wiki/index.rss`,
85
- hint: require_utils.composeHint("reddit:wiki")
86
- }];
87
- const commentsMatch = pathname.match(commentsRegex);
88
- if (commentsMatch?.[1] && commentsMatch?.[2]) return [{
89
- uri: `https://www.reddit.com/r/${commentsMatch[1]}/comments/${commentsMatch[2]}/.rss`,
90
- hint: require_utils.composeHint("reddit:post-comments")
91
- }];
92
- const subredditMatch = pathname.match(subredditRegex);
93
- if (subredditMatch?.[1]) {
94
- const subreddit = subredditMatch[1];
95
- const sort = subredditMatch[2];
96
- const uris = [];
97
- if (sort && require_utils.isAnyOf(sort, sortOptions)) uris.push({
98
- uri: `https://www.reddit.com/r/${subreddit}/${sort}/.rss${getTimeframeSuffix(sort, searchParams)}`,
99
- hint: require_utils.composeHint("reddit:posts")
100
- });
101
- else uris.push({
102
- uri: `https://www.reddit.com/r/${subreddit}/.rss`,
103
- hint: require_utils.composeHint("reddit:posts")
104
- });
105
- uris.push({
106
- uri: `https://www.reddit.com/r/${subreddit}/comments/.rss`,
107
- hint: require_utils.composeHint("reddit:comments")
108
- });
109
- return uris;
110
- }
111
- const multiredditMatch = pathname.match(multiredditRegex);
112
- if (multiredditMatch?.[1] && multiredditMatch?.[2]) return [{
113
- uri: `https://www.reddit.com/user/${multiredditMatch[1]}/m/${multiredditMatch[2]}/.rss`,
114
- hint: require_utils.composeHint("reddit:multireddit")
115
- }];
116
- const userMatch = pathname.match(userRegex);
117
- if (userMatch?.[1]) {
118
- const username = userMatch[1];
119
- const filter = userMatch[2];
120
- if (filter === "submitted") return [{
121
- uri: `https://www.reddit.com/user/${username}/submitted/.rss`,
122
- hint: require_utils.composeHint("reddit:user-submitted")
123
- }, {
124
- uri: `https://www.reddit.com/user/${username}/.rss`,
125
- hint: require_utils.composeHint("reddit:posts")
126
- }];
127
- if (filter === "comments") return [{
128
- uri: `https://www.reddit.com/user/${username}/comments/.rss`,
129
- hint: require_utils.composeHint("reddit:user-comments")
130
- }, {
131
- uri: `https://www.reddit.com/user/${username}/.rss`,
132
- hint: require_utils.composeHint("reddit:posts")
133
- }];
134
- return [{
135
- uri: `https://www.reddit.com/user/${username}/.rss`,
136
- hint: require_utils.composeHint("reddit:posts")
137
- }];
138
- }
139
- const domainMatch = pathname.match(domainRegex);
140
- if (domainMatch?.[1]) return [{
141
- uri: `https://www.reddit.com/domain/${domainMatch[1]}/.rss`,
142
- hint: require_utils.composeHint("reddit:posts")
143
- }];
144
- return [];
145
- }
146
- };
147
- //#endregion
148
- exports.hosts = hosts;
149
- exports.redditHandler = redditHandler;
@@ -1,20 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/rssCom.ts
3
- const hosts = ["rss.com", "www.rss.com"];
4
- const podcastRegex = /^\/(?:[a-z]{2}\/)?podcasts\/([^/]+)/;
5
- const rssComHandler = {
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(podcastRegex);
12
- if (!match?.[1]) return [];
13
- return [{
14
- uri: `https://media.rss.com/${match[1]}/feed.xml`,
15
- hint: require_utils.composeHint("rss-com:podcast")
16
- }];
17
- }
18
- };
19
- //#endregion
20
- exports.rssComHandler = rssComHandler;
@@ -1,22 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/seesaa.ts
3
- const seesaaHandler = {
4
- match: (url) => {
5
- return require_utils.isSubdomainOf(url, "seesaa.net");
6
- },
7
- resolve: (url) => {
8
- const { origin } = new URL(url);
9
- const uris = [];
10
- uris.push({
11
- uri: `${origin}/index20.rdf`,
12
- hint: require_utils.composeHint("seesaa:posts-rss2")
13
- });
14
- uris.push({
15
- uri: `${origin}/index.rdf`,
16
- hint: require_utils.composeHint("seesaa:posts-rdf")
17
- });
18
- return uris;
19
- }
20
- };
21
- //#endregion
22
- exports.seesaaHandler = seesaaHandler;
@@ -1,39 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/soundcloud.ts
3
- const userIdRegex = /soundcloud:\/\/users:(\d+)/;
4
- const hosts = [
5
- "soundcloud.com",
6
- "www.soundcloud.com",
7
- "m.soundcloud.com"
8
- ];
9
- const excludedPaths = [
10
- "discover",
11
- "stream",
12
- "search",
13
- "upload",
14
- "you",
15
- "settings",
16
- "messages"
17
- ];
18
- const extractUserIdFromContent = (content) => {
19
- return content.match(userIdRegex)?.[1];
20
- };
21
- const soundcloudHandler = {
22
- match: (url) => {
23
- if (!require_utils.isHostOf(url, hosts)) return false;
24
- const { pathname } = new URL(url);
25
- const pathSegments = pathname.split("/").filter(Boolean);
26
- return pathSegments.length > 0 && !require_utils.isAnyOf(pathSegments[0], excludedPaths);
27
- },
28
- resolve: (_url, content) => {
29
- if (!content) return [];
30
- const userId = extractUserIdFromContent(content);
31
- if (!userId) return [];
32
- return [{
33
- uri: `https://feeds.soundcloud.com/users/soundcloud:users:${userId}/sounds.rss`,
34
- hint: require_utils.composeHint("soundcloud:tracks")
35
- }];
36
- }
37
- };
38
- //#endregion
39
- exports.soundcloudHandler = soundcloudHandler;
@@ -1,53 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/sourceforge.ts
3
- const hosts = ["sourceforge.net", "www.sourceforge.net"];
4
- const sourceforgeHandler = {
5
- match: (url) => {
6
- return require_utils.isHostOf(url, hosts);
7
- },
8
- resolve: (url) => {
9
- const { origin, pathname } = new URL(url);
10
- const pathSegments = pathname.split("/").filter(Boolean);
11
- if ((pathSegments[0] === "projects" || pathSegments[0] === "p") && pathSegments[1]) {
12
- const project = pathSegments[1];
13
- return [
14
- {
15
- uri: `${origin}/p/${project}/activity/feed`,
16
- hint: require_utils.composeHint("sourceforge:activity")
17
- },
18
- {
19
- uri: `${origin}/p/${project}/feed`,
20
- hint: require_utils.composeHint("sourceforge:project-feed")
21
- },
22
- {
23
- uri: `${origin}/projects/${project}/rss`,
24
- hint: require_utils.composeHint("sourceforge:files")
25
- },
26
- {
27
- uri: `${origin}/p/${project}/news/feed.rss`,
28
- hint: require_utils.composeHint("sourceforge:news-rss")
29
- },
30
- {
31
- uri: `${origin}/p/${project}/news/feed.atom`,
32
- hint: require_utils.composeHint("sourceforge:news-atom")
33
- },
34
- {
35
- uri: `${origin}/p/${project}/discussion/feed`,
36
- hint: require_utils.composeHint("sourceforge:discussion")
37
- },
38
- {
39
- uri: `${origin}/p/${project}/discussion/feed.atom`,
40
- hint: require_utils.composeHint("sourceforge:discussion-atom")
41
- },
42
- {
43
- uri: `${origin}/p/${project}/bugs/feed`,
44
- hint: require_utils.composeHint("sourceforge:bugs")
45
- }
46
- ];
47
- }
48
- return [];
49
- }
50
- };
51
- //#endregion
52
- exports.hosts = hosts;
53
- exports.sourceforgeHandler = sourceforgeHandler;
@@ -1,21 +0,0 @@
1
- const require_utils = require("../../../common/utils.cjs");
2
- //#region src/feeds/platform/handlers/spreaker.ts
3
- const hosts = ["spreaker.com", "www.spreaker.com"];
4
- const podcastRegex = /^\/podcast\/[\w-]+--(\d+)/;
5
- const showRegex = /^\/show\/(\d+)(?:\/|$)/;
6
- const spreakerHandler = {
7
- match: (url) => {
8
- return require_utils.isHostOf(url, hosts);
9
- },
10
- resolve: (url) => {
11
- const { pathname } = new URL(url);
12
- const id = pathname.match(podcastRegex)?.[1] ?? pathname.match(showRegex)?.[1];
13
- if (!id) return [];
14
- return [{
15
- uri: `https://www.spreaker.com/show/${id}/episodes/feed`,
16
- hint: require_utils.composeHint("spreaker:podcast")
17
- }];
18
- }
19
- };
20
- //#endregion
21
- exports.spreakerHandler = spreakerHandler;