feedscout 2.0.0-next.2 → 2.0.0-rc.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 (190) hide show
  1. package/README.md +1 -1
  2. package/dist/blogrolls.d.ts +4 -4
  3. package/dist/blogrolls.js +3 -3
  4. package/dist/favicons.d.ts +3 -3
  5. package/dist/favicons.js +2 -2
  6. package/dist/feeds.d.ts +4 -4
  7. package/dist/feeds.js +3 -3
  8. package/dist/hubs.d.ts +1 -1
  9. package/dist/index.d.ts +7 -7
  10. package/dist/index.js +6 -6
  11. package/dist/methods.d.ts +7 -7
  12. package/dist/methods.js +7 -7
  13. package/dist/node_modules/trousse/dist/arrays.js +9 -0
  14. package/dist/node_modules/trousse/dist/is.js +19 -0
  15. package/dist/node_modules/trousse/dist/matching.js +37 -0
  16. package/dist/node_modules/trousse/dist/urls.js +23 -0
  17. package/dist/{blogrolls → src/blogrolls}/defaults.d.ts +1 -2
  18. package/dist/{blogrolls → src/blogrolls}/defaults.js +19 -11
  19. package/dist/{blogrolls → src/blogrolls}/extractors.js +3 -2
  20. package/dist/{common → src/common}/discover/defaults.js +1 -3
  21. package/dist/{common → src/common}/discover/index.js +23 -10
  22. package/dist/{common → src/common}/discover/utils.js +10 -3
  23. package/dist/src/common/locales.js +337 -0
  24. package/dist/{common → src/common}/types.d.ts +9 -1
  25. package/dist/{common → src/common}/uris/feed/index.js +1 -1
  26. package/dist/src/common/uris/guess/index.js +16 -0
  27. package/dist/{common → src/common}/uris/guess/types.d.ts +3 -0
  28. package/dist/{common → src/common}/uris/guess/utils.d.ts +2 -1
  29. package/dist/src/common/uris/guess/utils.js +83 -0
  30. package/dist/src/common/uris/headers/index.js +14 -0
  31. package/dist/{common → src/common}/uris/html/handlers.js +18 -1
  32. package/dist/{common → src/common}/uris/html/index.js +17 -1
  33. package/dist/src/common/uris/html/types.d.ts +14 -0
  34. package/dist/src/common/utils.js +51 -0
  35. package/dist/{favicons → src/favicons}/defaults.js +1 -1
  36. package/dist/{favicons → src/favicons}/extractors.js +3 -8
  37. package/dist/{favicons → src/favicons}/platform/handlers/bluesky.js +3 -2
  38. package/dist/{favicons → src/favicons}/platform/handlers/codeberg.js +2 -1
  39. package/dist/{favicons → src/favicons}/platform/handlers/deviantart.js +2 -1
  40. package/dist/{favicons → src/favicons}/platform/handlers/devto.js +4 -2
  41. package/dist/{favicons → src/favicons}/platform/handlers/github.js +2 -1
  42. package/dist/{favicons → src/favicons}/platform/handlers/githubGist.js +2 -1
  43. package/dist/{favicons → src/favicons}/platform/handlers/gitlab.js +4 -2
  44. package/dist/{favicons → src/favicons}/platform/handlers/lobsters.js +1 -1
  45. package/dist/{favicons → src/favicons}/platform/handlers/mastodon.js +2 -1
  46. package/dist/{favicons → src/favicons}/platform/handlers/reddit.js +3 -2
  47. package/dist/{favicons → src/favicons}/platform/handlers/sourceforge.js +1 -1
  48. package/dist/{favicons → src/favicons}/platform/handlers/tumblr.js +1 -1
  49. package/dist/{favicons → src/favicons}/utils.js +1 -4
  50. package/dist/{feeds → src/feeds}/defaults.d.ts +6 -3
  51. package/dist/src/feeds/defaults.js +300 -0
  52. package/dist/{feeds → src/feeds}/extractors.js +3 -2
  53. package/dist/src/feeds/platform/handlers/acast.js +28 -0
  54. package/dist/src/feeds/platform/handlers/ameblo.js +38 -0
  55. package/dist/{feeds → src/feeds}/platform/handlers/applePodcasts.js +3 -2
  56. package/dist/src/feeds/platform/handlers/arena.js +44 -0
  57. package/dist/src/feeds/platform/handlers/artstation.js +54 -0
  58. package/dist/src/feeds/platform/handlers/audioboom.js +24 -0
  59. package/dist/src/feeds/platform/handlers/bearblog.js +46 -0
  60. package/dist/{feeds → src/feeds}/platform/handlers/behance.js +10 -1
  61. package/dist/src/feeds/platform/handlers/blogspot.js +72 -0
  62. package/dist/{feeds → src/feeds}/platform/handlers/bluesky.js +2 -1
  63. package/dist/src/feeds/platform/handlers/bookwyrm.js +48 -0
  64. package/dist/src/feeds/platform/handlers/buttondown.js +45 -0
  65. package/dist/src/feeds/platform/handlers/buzzsprout.js +23 -0
  66. package/dist/{feeds → src/feeds}/platform/handlers/codeberg.js +8 -6
  67. package/dist/{feeds → src/feeds}/platform/handlers/csdn.js +2 -1
  68. package/dist/{feeds → src/feeds}/platform/handlers/dailymotion.js +19 -1
  69. package/dist/{feeds → src/feeds}/platform/handlers/deviantart.js +28 -7
  70. package/dist/{feeds → src/feeds}/platform/handlers/devto.js +11 -1
  71. package/dist/src/feeds/platform/handlers/discourse.js +66 -0
  72. package/dist/{feeds → src/feeds}/platform/handlers/douban.js +2 -1
  73. package/dist/src/feeds/platform/handlers/dreamwidth.js +49 -0
  74. package/dist/src/feeds/platform/handlers/exblog.js +36 -0
  75. package/dist/src/feeds/platform/handlers/fireside.js +25 -0
  76. package/dist/src/feeds/platform/handlers/friendica.js +44 -0
  77. package/dist/src/feeds/platform/handlers/ghost.js +31 -0
  78. package/dist/{feeds → src/feeds}/platform/handlers/github.js +9 -1
  79. package/dist/{feeds → src/feeds}/platform/handlers/githubGist.js +19 -6
  80. package/dist/{feeds → src/feeds}/platform/handlers/gitlab.js +34 -14
  81. package/dist/{feeds → src/feeds}/platform/handlers/goodreads.js +20 -9
  82. package/dist/src/feeds/platform/handlers/hackernews.js +22 -0
  83. package/dist/{feeds → src/feeds}/platform/handlers/hashnode.js +3 -2
  84. package/dist/{feeds → src/feeds}/platform/handlers/hatenablog.js +6 -2
  85. package/dist/src/feeds/platform/handlers/hearthis.js +34 -0
  86. package/dist/src/feeds/platform/handlers/heyWorld.js +19 -0
  87. package/dist/src/feeds/platform/handlers/insanejournal.js +70 -0
  88. package/dist/{feeds → src/feeds}/platform/handlers/itchio.js +27 -2
  89. package/dist/{feeds → src/feeds}/platform/handlers/kickstarter.js +2 -1
  90. package/dist/src/feeds/platform/handlers/lemmy.js +88 -0
  91. package/dist/{feeds → src/feeds}/platform/handlers/letterboxd.js +7 -1
  92. package/dist/src/feeds/platform/handlers/libsyn.js +26 -0
  93. package/dist/src/feeds/platform/handlers/listed.js +21 -0
  94. package/dist/src/feeds/platform/handlers/livejournal.js +69 -0
  95. package/dist/{feeds → src/feeds}/platform/handlers/lobsters.js +2 -1
  96. package/dist/{feeds → src/feeds}/platform/handlers/mastodon.js +32 -0
  97. package/dist/src/feeds/platform/handlers/mataroa.js +17 -0
  98. package/dist/{feeds → src/feeds}/platform/handlers/medium.js +5 -3
  99. package/dist/src/feeds/platform/handlers/microblog.js +56 -0
  100. package/dist/src/feeds/platform/handlers/misskey.js +40 -0
  101. package/dist/src/feeds/platform/handlers/myanimelist.js +44 -0
  102. package/dist/src/feeds/platform/handlers/naverBlog.js +22 -0
  103. package/dist/src/feeds/platform/handlers/nebula.js +70 -0
  104. package/dist/src/feeds/platform/handlers/note.js +55 -0
  105. package/dist/src/feeds/platform/handlers/observable.js +35 -0
  106. package/dist/src/feeds/platform/handlers/odysee.js +21 -0
  107. package/dist/src/feeds/platform/handlers/pagecord.js +17 -0
  108. package/dist/{feeds → src/feeds}/platform/handlers/paragraph.js +3 -3
  109. package/dist/src/feeds/platform/handlers/pika.js +36 -0
  110. package/dist/{feeds → src/feeds}/platform/handlers/pinterest.js +16 -1
  111. package/dist/src/feeds/platform/handlers/pixelfed.js +46 -0
  112. package/dist/src/feeds/platform/handlers/pleroma.js +34 -0
  113. package/dist/src/feeds/platform/handlers/podbean.js +30 -0
  114. package/dist/src/feeds/platform/handlers/podigee.js +30 -0
  115. package/dist/src/feeds/platform/handlers/posthaven.js +25 -0
  116. package/dist/{feeds → src/feeds}/platform/handlers/producthunt.js +2 -1
  117. package/dist/src/feeds/platform/handlers/prose.js +27 -0
  118. package/dist/src/feeds/platform/handlers/qiita.js +60 -0
  119. package/dist/src/feeds/platform/handlers/reddit.js +150 -0
  120. package/dist/src/feeds/platform/handlers/rssCom.js +21 -0
  121. package/dist/src/feeds/platform/handlers/seesaa.js +23 -0
  122. package/dist/{feeds → src/feeds}/platform/handlers/soundcloud.js +3 -1
  123. package/dist/src/feeds/platform/handlers/sourceforge.js +53 -0
  124. package/dist/src/feeds/platform/handlers/spreaker.js +22 -0
  125. package/dist/{feeds → src/feeds}/platform/handlers/stackExchange.js +28 -3
  126. package/dist/{feeds → src/feeds}/platform/handlers/steam.js +9 -1
  127. package/dist/{feeds → src/feeds}/platform/handlers/substack.js +2 -1
  128. package/dist/src/feeds/platform/handlers/tildes.js +42 -0
  129. package/dist/src/feeds/platform/handlers/tistory.js +17 -0
  130. package/dist/src/feeds/platform/handlers/transistor.js +30 -0
  131. package/dist/{feeds → src/feeds}/platform/handlers/tumblr.js +2 -1
  132. package/dist/{feeds → src/feeds}/platform/handlers/v2ex.js +2 -1
  133. package/dist/src/feeds/platform/handlers/velog.js +25 -0
  134. package/dist/{feeds → src/feeds}/platform/handlers/vimeo.js +9 -1
  135. package/dist/src/feeds/platform/handlers/weblogLol.js +27 -0
  136. package/dist/src/feeds/platform/handlers/weebly.js +26 -0
  137. package/dist/src/feeds/platform/handlers/wordpress.js +210 -0
  138. package/dist/{feeds → src/feeds}/platform/handlers/wpengine.js +1 -1
  139. package/dist/src/feeds/platform/handlers/writeas.js +53 -0
  140. package/dist/{feeds → src/feeds}/platform/handlers/ximalaya.js +3 -2
  141. package/dist/{feeds → src/feeds}/platform/handlers/youtube.js +6 -2
  142. package/dist/src/feeds/platform/handlers/zenn.js +56 -0
  143. package/package.json +10 -11
  144. package/dist/common/locales.js +0 -133
  145. package/dist/common/uris/guess/index.js +0 -8
  146. package/dist/common/uris/guess/utils.js +0 -40
  147. package/dist/common/uris/headers/index.js +0 -26
  148. package/dist/common/uris/html/types.d.ts +0 -12
  149. package/dist/common/utils.d.ts +0 -10
  150. package/dist/common/utils.js +0 -79
  151. package/dist/feeds/defaults.js +0 -168
  152. package/dist/feeds/platform/handlers/blogspot.js +0 -36
  153. package/dist/feeds/platform/handlers/lemmy.js +0 -46
  154. package/dist/feeds/platform/handlers/reddit.js +0 -74
  155. package/dist/feeds/platform/handlers/sourceforge.js +0 -19
  156. package/dist/feeds/platform/handlers/wordpress.js +0 -64
  157. package/dist/utils.d.ts +0 -2
  158. package/dist/utils.js +0 -2
  159. /package/dist/{blogrolls → src/blogrolls}/extractors.d.ts +0 -0
  160. /package/dist/{blogrolls → src/blogrolls}/index.d.ts +0 -0
  161. /package/dist/{blogrolls → src/blogrolls}/index.js +0 -0
  162. /package/dist/{blogrolls → src/blogrolls}/types.d.ts +0 -0
  163. /package/dist/{common → src/common}/discover/defaults.d.ts +0 -0
  164. /package/dist/{common → src/common}/discover/utils.d.ts +0 -0
  165. /package/dist/{common → src/common}/types.js +0 -0
  166. /package/dist/{common → src/common}/uris/feed/index.d.ts +0 -0
  167. /package/dist/{common → src/common}/uris/feed/types.d.ts +0 -0
  168. /package/dist/{common → src/common}/uris/guess/index.d.ts +0 -0
  169. /package/dist/{common → src/common}/uris/headers/index.d.ts +0 -0
  170. /package/dist/{common → src/common}/uris/headers/types.d.ts +0 -0
  171. /package/dist/{common → src/common}/uris/html/index.d.ts +0 -0
  172. /package/dist/{common → src/common}/uris/index.js +0 -0
  173. /package/dist/{common → src/common}/uris/platform/index.d.ts +0 -0
  174. /package/dist/{common → src/common}/uris/platform/index.js +0 -0
  175. /package/dist/{common → src/common}/uris/platform/types.d.ts +0 -0
  176. /package/dist/{favicons → src/favicons}/defaults.d.ts +0 -0
  177. /package/dist/{favicons → src/favicons}/extractors.d.ts +0 -0
  178. /package/dist/{favicons → src/favicons}/index.d.ts +0 -0
  179. /package/dist/{favicons → src/favicons}/index.js +0 -0
  180. /package/dist/{favicons → src/favicons}/types.d.ts +0 -0
  181. /package/dist/{feeds → src/feeds}/extractors.d.ts +0 -0
  182. /package/dist/{feeds → src/feeds}/index.d.ts +0 -0
  183. /package/dist/{feeds → src/feeds}/index.js +0 -0
  184. /package/dist/{feeds → src/feeds}/types.d.ts +0 -0
  185. /package/dist/{hubs → src/hubs}/discover/index.d.ts +0 -0
  186. /package/dist/{hubs → src/hubs}/discover/index.js +0 -0
  187. /package/dist/{hubs → src/hubs}/discover/types.d.ts +0 -0
  188. /package/dist/{hubs → src/hubs}/feed/index.js +0 -0
  189. /package/dist/{hubs → src/hubs}/headers/index.js +0 -0
  190. /package/dist/{hubs → src/hubs}/html/index.js +0 -0
@@ -1,4 +1,6 @@
1
- import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
1
+ import { isAnyOf } from "../../../../node_modules/trousse/dist/matching.js";
2
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
3
+ import { composeHint } from "../../../common/utils.js";
2
4
  //#region src/feeds/platform/handlers/letterboxd.ts
3
5
  const hosts = ["letterboxd.com", "www.letterboxd.com"];
4
6
  const excludedPaths = [
@@ -30,6 +32,10 @@ const letterboxdHandler = {
30
32
  const { pathname } = new URL(url);
31
33
  const pathSegments = pathname.split("/").filter(Boolean);
32
34
  if (pathSegments.length === 0) return [];
35
+ if (pathSegments[0] === "journal") return [{
36
+ uri: "https://letterboxd.com/journal/rss/",
37
+ hint: composeHint("letterboxd:journal")
38
+ }];
33
39
  const username = pathSegments[0];
34
40
  if (isAnyOf(username, excludedPaths)) return [];
35
41
  return [{
@@ -0,0 +1,26 @@
1
+ import { isHostOf, isSubdomainOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/libsyn.ts
4
+ const numericRegex = /^\d+$/;
5
+ const libsynHandler = {
6
+ match: (url) => {
7
+ return isSubdomainOf(url, "libsyn.com");
8
+ },
9
+ resolve: (url) => {
10
+ const { origin, pathname } = new URL(url);
11
+ if (isHostOf(url, "feeds.libsyn.com")) {
12
+ const showId = pathname.split("/").find(Boolean);
13
+ if (showId && numericRegex.test(showId)) return [{
14
+ uri: `https://feeds.libsyn.com/${showId}/rss`,
15
+ hint: composeHint("libsyn:podcast")
16
+ }];
17
+ return [];
18
+ }
19
+ return [{
20
+ uri: `${origin}/rss`,
21
+ hint: composeHint("libsyn:podcast")
22
+ }];
23
+ }
24
+ };
25
+ //#endregion
26
+ export { libsynHandler };
@@ -0,0 +1,21 @@
1
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/listed.ts
4
+ const hosts = ["listed.to", "www.listed.to"];
5
+ const userRegex = /^\/@([^/]+)/;
6
+ const listedHandler = {
7
+ match: (url) => {
8
+ return isHostOf(url, hosts);
9
+ },
10
+ resolve: (url) => {
11
+ const { pathname } = new URL(url);
12
+ const userMatch = pathname.match(userRegex);
13
+ if (!userMatch?.[1]) return [];
14
+ return [{
15
+ uri: `https://listed.to/@${userMatch[1]}/feed.rss`,
16
+ hint: composeHint("listed:blog")
17
+ }];
18
+ }
19
+ };
20
+ //#endregion
21
+ export { listedHandler };
@@ -0,0 +1,69 @@
1
+ import { isSubdomainOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/livejournal.ts
4
+ const wwwUsersPathRegex = /^\/(?:users\/|~)([^/]+)/;
5
+ const legacyUserPathRegex = /^\/([^/]+)/;
6
+ const tagRegex = /^\/tag\/([^/]+)/;
7
+ const reservedHosts = /* @__PURE__ */ new Set([
8
+ "livejournal.com",
9
+ "www.livejournal.com",
10
+ "users.livejournal.com",
11
+ "community.livejournal.com",
12
+ "syndicated.livejournal.com"
13
+ ]);
14
+ const livejournalHandler = {
15
+ match: (url) => {
16
+ if (!isSubdomainOf(url, "livejournal.com")) return false;
17
+ const { hostname, pathname } = new URL(url);
18
+ const lower = hostname.toLowerCase();
19
+ if (reservedHosts.has(lower)) {
20
+ if (lower === "www.livejournal.com") return wwwUsersPathRegex.test(pathname);
21
+ if (lower === "users.livejournal.com" || lower === "community.livejournal.com") return legacyUserPathRegex.test(pathname);
22
+ return false;
23
+ }
24
+ return true;
25
+ },
26
+ resolve: (url) => {
27
+ const { origin, hostname, pathname } = new URL(url);
28
+ const lowerHostname = hostname.toLowerCase();
29
+ const uris = [];
30
+ let userOrigin = origin;
31
+ if (lowerHostname === "www.livejournal.com") {
32
+ const userMatch = pathname.match(wwwUsersPathRegex);
33
+ if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
34
+ else return uris;
35
+ }
36
+ if (lowerHostname === "users.livejournal.com" || lowerHostname === "community.livejournal.com") {
37
+ const userMatch = pathname.match(legacyUserPathRegex);
38
+ if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
39
+ else return uris;
40
+ }
41
+ const tagMatch = pathname.match(tagRegex);
42
+ if (tagMatch?.[1]) {
43
+ const tag = encodeURIComponent(tagMatch[1]);
44
+ uris.push({
45
+ uri: `${userOrigin}/data/rss?tag=${tag}`,
46
+ hint: composeHint("livejournal:posts-tag-rss")
47
+ });
48
+ uris.push({
49
+ uri: `${userOrigin}/data/atom?tag=${tag}`,
50
+ hint: composeHint("livejournal:posts-tag-atom")
51
+ });
52
+ }
53
+ uris.push({
54
+ uri: `${userOrigin}/data/rss`,
55
+ hint: composeHint("livejournal:posts-rss")
56
+ });
57
+ uris.push({
58
+ uri: `${userOrigin}/data/atom`,
59
+ hint: composeHint("livejournal:posts-atom")
60
+ });
61
+ uris.push({
62
+ uri: `${userOrigin}/data/userpics`,
63
+ hint: composeHint("livejournal:userpics-atom")
64
+ });
65
+ return uris;
66
+ }
67
+ };
68
+ //#endregion
69
+ export { livejournalHandler };
@@ -1,4 +1,5 @@
1
- import { composeHint, isHostOf } from "../../../common/utils.js";
1
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
2
3
  //#region src/feeds/platform/handlers/lobsters.ts
3
4
  const hosts = ["lobste.rs"];
4
5
  const tagRegex = /^\/t\/([a-zA-Z0-9,_-]+)/;
@@ -2,6 +2,9 @@ import { composeHint } from "../../../common/utils.js";
2
2
  import { isMastodonHeaders, isMastodonHtml } from "../../../favicons/platform/handlers/mastodon.js";
3
3
  //#region src/feeds/platform/handlers/mastodon.ts
4
4
  const profileRegex = /^\/@([^/]+)/;
5
+ const taggedProfileRegex = /^\/@([^/]+)\/tagged\/([^/]+)/;
6
+ const repliesProfileRegex = /^\/@([^/]+)\/with_replies/;
7
+ const mediaProfileRegex = /^\/@([^/]+)\/media/;
5
8
  const tagRegex = /^\/tags\/([^/]+)/;
6
9
  const isProfilePath = (pathname) => {
7
10
  const segments = pathname.split("/").filter(Boolean);
@@ -24,6 +27,35 @@ const mastodonHandler = {
24
27
  resolve: (url) => {
25
28
  try {
26
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: composeHint("mastodon:replies")
34
+ }, {
35
+ uri: `${origin}/@${repliesMatch[1]}.rss`,
36
+ hint: composeHint("mastodon:posts")
37
+ }];
38
+ const mediaMatch = pathname.match(mediaProfileRegex);
39
+ if (mediaMatch?.[1]) return [{
40
+ uri: `${origin}/@${mediaMatch[1]}/media.rss`,
41
+ hint: composeHint("mastodon:media")
42
+ }, {
43
+ uri: `${origin}/@${mediaMatch[1]}.rss`,
44
+ hint: 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: composeHint("mastodon:tagged")
52
+ });
53
+ uris.push({
54
+ uri: `${origin}/@${taggedMatch[1]}.rss`,
55
+ hint: composeHint("mastodon:posts")
56
+ });
57
+ return uris;
58
+ }
27
59
  const userMatch = pathname.match(profileRegex);
28
60
  if (userMatch?.[1]) return [{
29
61
  uri: `${origin}/@${userMatch[1]}.rss`,
@@ -0,0 +1,17 @@
1
+ import { isSubdomainOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/mataroa.ts
4
+ const mataroaHandler = {
5
+ match: (url) => {
6
+ return isSubdomainOf(url, "mataroa.blog");
7
+ },
8
+ resolve: (url) => {
9
+ const { origin } = new URL(url);
10
+ return [{
11
+ uri: `${origin}/rss/`,
12
+ hint: composeHint("mataroa:blog")
13
+ }];
14
+ }
15
+ };
16
+ //#endregion
17
+ export { mataroaHandler };
@@ -1,4 +1,6 @@
1
- import { composeHint, isAnyOf, isHostOf, isSubdomainOf } from "../../../common/utils.js";
1
+ import { isAnyOf } from "../../../../node_modules/trousse/dist/matching.js";
2
+ import { isHostOf, isSubdomainOf } from "../../../../node_modules/trousse/dist/urls.js";
3
+ import { composeHint } from "../../../common/utils.js";
2
4
  //#region src/feeds/platform/handlers/medium.ts
3
5
  const userRegex = /^\/@([^/]+)/;
4
6
  const tagRegex = /^\/tag\/([^/]+)/;
@@ -53,11 +55,11 @@ const mediumHandler = {
53
55
  const subdomain = lowerHostname.replace(".medium.com", "");
54
56
  const tagMatch = pathname.match(subdomainTagRegex);
55
57
  if (tagMatch?.[1]) return [{
56
- uri: `https://medium.com/feed/${subdomain}/tagged/${tagMatch[1]}`,
58
+ uri: `https://${subdomain}.medium.com/feed/tagged/${tagMatch[1]}`,
57
59
  hint: composeHint("medium:tagged")
58
60
  }];
59
61
  return [{
60
- uri: `https://medium.com/feed/${subdomain}`,
62
+ uri: `https://${subdomain}.medium.com/feed`,
61
63
  hint: composeHint("medium:publication")
62
64
  }];
63
65
  }
@@ -0,0 +1,56 @@
1
+ import { isSubdomainOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/microblog.ts
4
+ const categoryRegex = /^\/categories\/([^/]+)/;
5
+ const microblogHandler = {
6
+ match: (url) => {
7
+ return isSubdomainOf(url, "micro.blog");
8
+ },
9
+ resolve: (url) => {
10
+ const { origin, pathname } = new URL(url);
11
+ const uris = [];
12
+ const categoryMatch = pathname.match(categoryRegex);
13
+ if (categoryMatch?.[1]) {
14
+ const category = categoryMatch[1];
15
+ uris.push({
16
+ uri: `${origin}/categories/${category}/feed.xml`,
17
+ hint: composeHint("microblog:category-rss")
18
+ });
19
+ uris.push({
20
+ uri: `${origin}/categories/${category}/feed.json`,
21
+ hint: composeHint("microblog:category-json")
22
+ });
23
+ }
24
+ if (pathname.startsWith("/archive")) uris.push({
25
+ uri: `${origin}/archive/index.json`,
26
+ hint: composeHint("microblog:archive")
27
+ });
28
+ if (pathname.startsWith("/photos")) uris.push({
29
+ uri: `${origin}/photos/index.json`,
30
+ hint: composeHint("microblog:photos")
31
+ });
32
+ if (pathname.startsWith("/replies")) uris.push({
33
+ uri: `${origin}/replies.xml`,
34
+ hint: composeHint("microblog:replies")
35
+ });
36
+ uris.push({
37
+ uri: `${origin}/feed.xml`,
38
+ hint: composeHint("microblog:posts-rss")
39
+ });
40
+ uris.push({
41
+ uri: `${origin}/feed.json`,
42
+ hint: composeHint("microblog:posts-json")
43
+ });
44
+ uris.push({
45
+ uri: `${origin}/podcast.xml`,
46
+ hint: composeHint("microblog:podcast")
47
+ });
48
+ uris.push({
49
+ uri: `${origin}/podcast.json`,
50
+ hint: composeHint("microblog:podcast-json")
51
+ });
52
+ return uris;
53
+ }
54
+ };
55
+ //#endregion
56
+ export { microblogHandler };
@@ -0,0 +1,40 @@
1
+ import { composeHint, hasMetaContent } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/misskey.ts
3
+ const profileRegex = /^\/@([^/.]+)/;
4
+ const isMisskeyHtml = (content) => {
5
+ return 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: composeHint("misskey:posts-atom")
25
+ },
26
+ {
27
+ uri: `${origin}/@${match[1]}.rss`,
28
+ hint: composeHint("misskey:posts-rss")
29
+ },
30
+ {
31
+ uri: `${origin}/@${match[1]}.json`,
32
+ hint: composeHint("misskey:posts-json")
33
+ }
34
+ ];
35
+ } catch {}
36
+ return [];
37
+ }
38
+ };
39
+ //#endregion
40
+ export { misskeyHandler };
@@ -0,0 +1,44 @@
1
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/myanimelist.ts
4
+ const hosts = ["myanimelist.net", "www.myanimelist.net"];
5
+ const userRegex = /^\/(?:profile|animelist|mangalist|history)\/([^/]+)/;
6
+ const myanimelistHandler = {
7
+ match: (url) => {
8
+ return isHostOf(url, hosts);
9
+ },
10
+ resolve: (url) => {
11
+ const { pathname } = new URL(url);
12
+ if (pathname === "/news" || pathname.startsWith("/news/")) return [{
13
+ uri: "https://myanimelist.net/rss/news.xml",
14
+ hint: composeHint("myanimelist:news")
15
+ }];
16
+ if (pathname === "/featured" || pathname.startsWith("/featured/")) return [{
17
+ uri: "https://myanimelist.net/rss/featured.xml",
18
+ hint: composeHint("myanimelist:featured")
19
+ }];
20
+ const match = pathname.match(userRegex);
21
+ if (!match?.[1]) return [];
22
+ const user = match[1];
23
+ const uris = [];
24
+ uris.push({
25
+ uri: `https://myanimelist.net/rss.php?type=rw&u=${user}`,
26
+ hint: composeHint("myanimelist:anime")
27
+ });
28
+ uris.push({
29
+ uri: `https://myanimelist.net/rss.php?type=rm&u=${user}`,
30
+ hint: composeHint("myanimelist:manga")
31
+ });
32
+ uris.push({
33
+ uri: `https://myanimelist.net/rss.php?type=rrw&u=${user}`,
34
+ hint: composeHint("myanimelist:recently-watched")
35
+ });
36
+ uris.push({
37
+ uri: `https://myanimelist.net/rss.php?type=rrm&u=${user}`,
38
+ hint: composeHint("myanimelist:recently-read")
39
+ });
40
+ return uris;
41
+ }
42
+ };
43
+ //#endregion
44
+ export { myanimelistHandler };
@@ -0,0 +1,22 @@
1
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/naverBlog.ts
4
+ const hosts = ["blog.naver.com", "m.blog.naver.com"];
5
+ const naverBlogHandler = {
6
+ match: (url) => {
7
+ return isHostOf(url, hosts);
8
+ },
9
+ resolve: (url) => {
10
+ const { pathname } = new URL(url);
11
+ const pathSegments = pathname.split("/").filter(Boolean);
12
+ if (pathSegments.length === 0) return [];
13
+ const blogId = pathSegments[0];
14
+ if (blogId.includes(".")) return [];
15
+ return [{
16
+ uri: `https://rss.blog.naver.com/${blogId}.xml`,
17
+ hint: composeHint("naver-blog:blog")
18
+ }];
19
+ }
20
+ };
21
+ //#endregion
22
+ export { naverBlogHandler };
@@ -0,0 +1,70 @@
1
+ import { isAnyOf } from "../../../../node_modules/trousse/dist/matching.js";
2
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
3
+ import { composeHint } from "../../../common/utils.js";
4
+ //#region src/feeds/platform/handlers/nebula.ts
5
+ const hosts = ["nebula.tv", "www.nebula.tv"];
6
+ const excludedPaths = [
7
+ "about",
8
+ "classes",
9
+ "library",
10
+ "login",
11
+ "originals",
12
+ "pricing",
13
+ "privacy",
14
+ "search",
15
+ "settings",
16
+ "signup",
17
+ "terms"
18
+ ];
19
+ const globalPaths = /* @__PURE__ */ new Set(["videos", "explore"]);
20
+ const nebulaHandler = {
21
+ match: (url) => {
22
+ return isHostOf(url, hosts);
23
+ },
24
+ resolve: (url) => {
25
+ const { pathname, searchParams } = new URL(url);
26
+ const pathSegments = pathname.split("/").filter(Boolean);
27
+ if (pathSegments.length === 0 || globalPaths.has(pathSegments[0])) {
28
+ const rawCategory = searchParams.get("category");
29
+ const category = rawCategory ? rawCategory.toLowerCase() : null;
30
+ const uris = [];
31
+ if (category) {
32
+ uris.push({
33
+ uri: `https://rss.nebula.app/video/categories/${category}.rss`,
34
+ hint: composeHint("nebula:category")
35
+ });
36
+ uris.push({
37
+ uri: `https://rss.nebula.app/video/categories/${category}.rss?plus=true`,
38
+ hint: composeHint("nebula:category-plus")
39
+ });
40
+ }
41
+ uris.push({
42
+ uri: "https://rss.nebula.app/video.rss",
43
+ hint: composeHint("nebula:videos-all")
44
+ });
45
+ uris.push({
46
+ uri: "https://rss.nebula.app/video.rss?plus=true",
47
+ hint: composeHint("nebula:videos-all-plus")
48
+ });
49
+ uris.push({
50
+ uri: "https://rss.nebula.app/video/channels.rss",
51
+ hint: composeHint("nebula:channels")
52
+ });
53
+ return uris;
54
+ }
55
+ const slug = pathSegments[0];
56
+ if (isAnyOf(slug, excludedPaths)) return [];
57
+ const uris = [];
58
+ uris.push({
59
+ uri: `https://rss.nebula.app/video/channels/${slug}.rss`,
60
+ hint: composeHint("nebula:videos")
61
+ });
62
+ uris.push({
63
+ uri: `https://rss.nebula.app/video/channels/${slug}.rss?plus=true`,
64
+ hint: composeHint("nebula:videos-plus")
65
+ });
66
+ return uris;
67
+ }
68
+ };
69
+ //#endregion
70
+ export { nebulaHandler };
@@ -0,0 +1,55 @@
1
+ import { isAnyOf } from "../../../../node_modules/trousse/dist/matching.js";
2
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
3
+ import { composeHint } from "../../../common/utils.js";
4
+ //#region src/feeds/platform/handlers/note.ts
5
+ const hosts = ["note.com", "www.note.com"];
6
+ const excludedPaths = [
7
+ "about",
8
+ "api",
9
+ "explore",
10
+ "hashtag",
11
+ "help",
12
+ "login",
13
+ "m",
14
+ "n",
15
+ "premium",
16
+ "privacy",
17
+ "ranking",
18
+ "search",
19
+ "settings",
20
+ "signup",
21
+ "terms"
22
+ ];
23
+ const hashtagRegex = /^\/hashtag\/([^/]+)/;
24
+ const magazineRegex = /^\/([^/]+)\/m\/([^/]+)/;
25
+ const noteHandler = {
26
+ match: (url) => {
27
+ return isHostOf(url, hosts);
28
+ },
29
+ resolve: (url) => {
30
+ const { pathname } = new URL(url);
31
+ const hashtagMatch = pathname.match(hashtagRegex);
32
+ if (hashtagMatch?.[1]) return [{
33
+ uri: `https://note.com/hashtag/${hashtagMatch[1]}/rss`,
34
+ hint: composeHint("note:hashtag")
35
+ }];
36
+ const magazineMatch = pathname.match(magazineRegex);
37
+ if (magazineMatch?.[1] && magazineMatch?.[2]) return [{
38
+ uri: `https://note.com/${magazineMatch[1]}/m/${magazineMatch[2]}/rss`,
39
+ hint: composeHint("note:magazine")
40
+ }];
41
+ const pathSegments = pathname.split("/").filter(Boolean);
42
+ if (pathSegments.length === 0) return [{
43
+ uri: "https://note.com/rss",
44
+ hint: composeHint("note:featured")
45
+ }];
46
+ const username = pathSegments[0];
47
+ if (isAnyOf(username, excludedPaths)) return [];
48
+ return [{
49
+ uri: `https://note.com/${username}/rss`,
50
+ hint: composeHint("note:blog")
51
+ }];
52
+ }
53
+ };
54
+ //#endregion
55
+ export { noteHandler };
@@ -0,0 +1,35 @@
1
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/observable.ts
4
+ const hosts = ["observablehq.com", "www.observablehq.com"];
5
+ const collectionRegex = /^\/@([^/]+)\/collection\/([^/]+)/;
6
+ const userRegex = /^\/@([^/]+)/;
7
+ const observableHandler = {
8
+ match: (url) => {
9
+ return isHostOf(url, hosts);
10
+ },
11
+ resolve: (url) => {
12
+ const { pathname } = new URL(url);
13
+ if (pathname === "/recent" || pathname === "/recent/") return [{
14
+ uri: "https://api.observablehq.com/documents/public.rss",
15
+ hint: composeHint("observable:recent")
16
+ }];
17
+ if (pathname === "/trending" || pathname === "/trending/") return [{
18
+ uri: "https://api.observablehq.com/documents/trending.rss",
19
+ hint: composeHint("observable:trending")
20
+ }];
21
+ const collectionMatch = pathname.match(collectionRegex);
22
+ if (collectionMatch?.[1] && collectionMatch?.[2]) return [{
23
+ uri: `https://api.observablehq.com/collection/@${collectionMatch[1]}/${collectionMatch[2]}.rss`,
24
+ hint: composeHint("observable:collection")
25
+ }];
26
+ const userMatch = pathname.match(userRegex);
27
+ if (!userMatch?.[1]) return [];
28
+ return [{
29
+ uri: `https://api.observablehq.com/documents/@${userMatch[1]}.rss`,
30
+ hint: composeHint("observable:notebooks")
31
+ }];
32
+ }
33
+ };
34
+ //#endregion
35
+ export { observableHandler };
@@ -0,0 +1,21 @@
1
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/odysee.ts
4
+ const hosts = ["odysee.com", "www.odysee.com"];
5
+ const channelRegex = /^\/(@[^/:]+:[a-f0-9]+)/i;
6
+ const odyseeHandler = {
7
+ match: (url) => {
8
+ return isHostOf(url, hosts);
9
+ },
10
+ resolve: (url) => {
11
+ const { pathname } = new URL(url);
12
+ const match = pathname.match(channelRegex);
13
+ if (!match?.[1]) return [];
14
+ return [{
15
+ uri: `https://odysee.com/$/rss/${match[1]}`,
16
+ hint: composeHint("odysee:videos")
17
+ }];
18
+ }
19
+ };
20
+ //#endregion
21
+ export { odyseeHandler };
@@ -0,0 +1,17 @@
1
+ import { isHostOf, isSubdomainOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/pagecord.ts
4
+ const pagecordHandler = {
5
+ match: (url) => {
6
+ return isSubdomainOf(url, "pagecord.com") && !isHostOf(url, "www.pagecord.com");
7
+ },
8
+ resolve: (url) => {
9
+ const { origin } = new URL(url);
10
+ return [{
11
+ uri: `${origin}/feed.xml`,
12
+ hint: composeHint("pagecord:blog")
13
+ }];
14
+ }
15
+ };
16
+ //#endregion
17
+ export { pagecordHandler };
@@ -1,4 +1,5 @@
1
- import { composeHint, isHostOf } from "../../../common/utils.js";
1
+ import { isHostOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
2
3
  //#region src/feeds/platform/handlers/paragraph.ts
3
4
  const hosts = ["paragraph.com", "www.paragraph.com"];
4
5
  const userRegex = /^\/@([^/]+)/;
@@ -10,9 +11,8 @@ const paragraphHandler = {
10
11
  const { pathname } = new URL(url);
11
12
  const userMatch = pathname.match(userRegex);
12
13
  if (!userMatch?.[1]) return [];
13
- const username = userMatch[1];
14
14
  return [{
15
- uri: [`https://paragraph.com/@${username}/feed`, `https://paragraph.com/@${username}/rss`],
15
+ uri: `https://api.paragraph.com/blogs/rss/@${userMatch[1]}`,
16
16
  hint: composeHint("paragraph:blog")
17
17
  }];
18
18
  }
@@ -0,0 +1,36 @@
1
+ import { isSubdomainOf } from "../../../../node_modules/trousse/dist/urls.js";
2
+ import { composeHint } from "../../../common/utils.js";
3
+ //#region src/feeds/platform/handlers/pika.ts
4
+ const tagRegex = /^\/tag\/([^/]+)/;
5
+ const pikaHandler = {
6
+ match: (url) => {
7
+ return isSubdomainOf(url, "pika.page");
8
+ },
9
+ resolve: (url) => {
10
+ const { origin, pathname } = new URL(url);
11
+ const uris = [];
12
+ const tagMatch = pathname.match(tagRegex);
13
+ if (tagMatch?.[1]) {
14
+ const tag = tagMatch[1];
15
+ uris.push({
16
+ uri: `${origin}/tag/${tag}/feed`,
17
+ hint: composeHint("pika:tag-atom")
18
+ });
19
+ uris.push({
20
+ uri: `${origin}/tag/${tag}/feed.rss`,
21
+ hint: composeHint("pika:tag-rss")
22
+ });
23
+ }
24
+ uris.push({
25
+ uri: `${origin}/posts_feed`,
26
+ hint: composeHint("pika:posts-atom")
27
+ });
28
+ uris.push({
29
+ uri: `${origin}/posts_feed.rss`,
30
+ hint: composeHint("pika:posts-rss")
31
+ });
32
+ return uris;
33
+ }
34
+ };
35
+ //#endregion
36
+ export { pikaHandler };