feedscout 1.8.1 → 1.9.1

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 (192) hide show
  1. package/README.md +1 -1
  2. package/dist/blogrolls/defaults.cjs +18 -11
  3. package/dist/blogrolls/defaults.d.cts +1 -2
  4. package/dist/blogrolls/defaults.d.ts +1 -2
  5. package/dist/blogrolls/defaults.js +19 -11
  6. package/dist/blogrolls.cjs +0 -1
  7. package/dist/blogrolls.d.cts +2 -2
  8. package/dist/blogrolls.d.ts +2 -2
  9. package/dist/blogrolls.js +2 -2
  10. package/dist/common/locales.cjs +214 -10
  11. package/dist/common/locales.js +214 -10
  12. package/dist/common/types.d.cts +2 -1
  13. package/dist/common/types.d.ts +2 -1
  14. package/dist/common/uris/html/handlers.cjs +18 -0
  15. package/dist/common/uris/html/handlers.js +18 -0
  16. package/dist/common/uris/html/index.cjs +17 -1
  17. package/dist/common/uris/html/index.js +17 -1
  18. package/dist/common/uris/html/types.d.cts +6 -4
  19. package/dist/common/uris/html/types.d.ts +6 -4
  20. package/dist/common/utils.cjs +12 -3
  21. package/dist/common/utils.d.cts +6 -4
  22. package/dist/common/utils.d.ts +6 -4
  23. package/dist/common/utils.js +12 -3
  24. package/dist/feeds/defaults.cjs +129 -10
  25. package/dist/feeds/defaults.d.cts +5 -3
  26. package/dist/feeds/defaults.d.ts +5 -3
  27. package/dist/feeds/defaults.js +128 -11
  28. package/dist/feeds/platform/handlers/acast.cjs +26 -0
  29. package/dist/feeds/platform/handlers/acast.js +26 -0
  30. package/dist/feeds/platform/handlers/ameblo.cjs +36 -0
  31. package/dist/feeds/platform/handlers/ameblo.js +36 -0
  32. package/dist/feeds/platform/handlers/applePodcasts.cjs +1 -1
  33. package/dist/feeds/platform/handlers/applePodcasts.js +1 -1
  34. package/dist/feeds/platform/handlers/arena.cjs +42 -0
  35. package/dist/feeds/platform/handlers/arena.js +42 -0
  36. package/dist/feeds/platform/handlers/artstation.cjs +52 -0
  37. package/dist/feeds/platform/handlers/artstation.js +52 -0
  38. package/dist/feeds/platform/handlers/audioboom.cjs +23 -0
  39. package/dist/feeds/platform/handlers/audioboom.js +23 -0
  40. package/dist/feeds/platform/handlers/bearblog.cjs +45 -0
  41. package/dist/feeds/platform/handlers/bearblog.js +45 -0
  42. package/dist/feeds/platform/handlers/behance.cjs +7 -0
  43. package/dist/feeds/platform/handlers/behance.js +7 -0
  44. package/dist/feeds/platform/handlers/blogspot.cjs +38 -2
  45. package/dist/feeds/platform/handlers/blogspot.js +38 -2
  46. package/dist/feeds/platform/handlers/bookwyrm.cjs +48 -0
  47. package/dist/feeds/platform/handlers/bookwyrm.js +48 -0
  48. package/dist/feeds/platform/handlers/buttondown.cjs +43 -0
  49. package/dist/feeds/platform/handlers/buttondown.js +43 -0
  50. package/dist/feeds/platform/handlers/buzzsprout.cjs +22 -0
  51. package/dist/feeds/platform/handlers/buzzsprout.js +22 -0
  52. package/dist/feeds/platform/handlers/codeberg.cjs +5 -5
  53. package/dist/feeds/platform/handlers/codeberg.js +5 -5
  54. package/dist/feeds/platform/handlers/dailymotion.cjs +16 -0
  55. package/dist/feeds/platform/handlers/dailymotion.js +16 -0
  56. package/dist/feeds/platform/handlers/deviantart.cjs +25 -6
  57. package/dist/feeds/platform/handlers/deviantart.js +25 -6
  58. package/dist/feeds/platform/handlers/devto.cjs +8 -0
  59. package/dist/feeds/platform/handlers/devto.js +8 -0
  60. package/dist/feeds/platform/handlers/discourse.cjs +70 -0
  61. package/dist/feeds/platform/handlers/discourse.js +70 -0
  62. package/dist/feeds/platform/handlers/dreamwidth.cjs +48 -0
  63. package/dist/feeds/platform/handlers/dreamwidth.js +48 -0
  64. package/dist/feeds/platform/handlers/exblog.cjs +35 -0
  65. package/dist/feeds/platform/handlers/exblog.js +35 -0
  66. package/dist/feeds/platform/handlers/fireside.cjs +24 -0
  67. package/dist/feeds/platform/handlers/fireside.js +24 -0
  68. package/dist/feeds/platform/handlers/friendica.cjs +44 -0
  69. package/dist/feeds/platform/handlers/friendica.js +44 -0
  70. package/dist/feeds/platform/handlers/ghost.cjs +30 -0
  71. package/dist/feeds/platform/handlers/ghost.js +30 -0
  72. package/dist/feeds/platform/handlers/github.cjs +6 -0
  73. package/dist/feeds/platform/handlers/github.js +6 -0
  74. package/dist/feeds/platform/handlers/githubGist.cjs +16 -5
  75. package/dist/feeds/platform/handlers/githubGist.js +16 -5
  76. package/dist/feeds/platform/handlers/gitlab.cjs +31 -13
  77. package/dist/feeds/platform/handlers/gitlab.js +31 -13
  78. package/dist/feeds/platform/handlers/goodreads.cjs +18 -8
  79. package/dist/feeds/platform/handlers/goodreads.js +18 -8
  80. package/dist/feeds/platform/handlers/hackernews.cjs +21 -0
  81. package/dist/feeds/platform/handlers/hackernews.js +21 -0
  82. package/dist/feeds/platform/handlers/hashnode.cjs +1 -1
  83. package/dist/feeds/platform/handlers/hashnode.js +1 -1
  84. package/dist/feeds/platform/handlers/hatenablog.cjs +4 -1
  85. package/dist/feeds/platform/handlers/hatenablog.js +4 -1
  86. package/dist/feeds/platform/handlers/hearthis.cjs +32 -0
  87. package/dist/feeds/platform/handlers/hearthis.js +32 -0
  88. package/dist/feeds/platform/handlers/heyWorld.cjs +18 -0
  89. package/dist/feeds/platform/handlers/heyWorld.js +18 -0
  90. package/dist/feeds/platform/handlers/insanejournal.cjs +69 -0
  91. package/dist/feeds/platform/handlers/insanejournal.js +69 -0
  92. package/dist/feeds/platform/handlers/itchio.cjs +24 -1
  93. package/dist/feeds/platform/handlers/itchio.js +24 -1
  94. package/dist/feeds/platform/handlers/lemmy.cjs +46 -4
  95. package/dist/feeds/platform/handlers/lemmy.js +46 -4
  96. package/dist/feeds/platform/handlers/letterboxd.cjs +4 -0
  97. package/dist/feeds/platform/handlers/letterboxd.js +4 -0
  98. package/dist/feeds/platform/handlers/libsyn.cjs +25 -0
  99. package/dist/feeds/platform/handlers/libsyn.js +25 -0
  100. package/dist/feeds/platform/handlers/listed.cjs +20 -0
  101. package/dist/feeds/platform/handlers/listed.js +20 -0
  102. package/dist/feeds/platform/handlers/livejournal.cjs +68 -0
  103. package/dist/feeds/platform/handlers/livejournal.js +68 -0
  104. package/dist/feeds/platform/handlers/mastodon.cjs +32 -0
  105. package/dist/feeds/platform/handlers/mastodon.js +32 -0
  106. package/dist/feeds/platform/handlers/mataroa.cjs +16 -0
  107. package/dist/feeds/platform/handlers/mataroa.js +16 -0
  108. package/dist/feeds/platform/handlers/medium.cjs +2 -2
  109. package/dist/feeds/platform/handlers/medium.js +2 -2
  110. package/dist/feeds/platform/handlers/microblog.cjs +55 -0
  111. package/dist/feeds/platform/handlers/microblog.js +55 -0
  112. package/dist/feeds/platform/handlers/misskey.cjs +40 -0
  113. package/dist/feeds/platform/handlers/misskey.js +40 -0
  114. package/dist/feeds/platform/handlers/myanimelist.cjs +43 -0
  115. package/dist/feeds/platform/handlers/myanimelist.js +43 -0
  116. package/dist/feeds/platform/handlers/naverBlog.cjs +21 -0
  117. package/dist/feeds/platform/handlers/naverBlog.js +21 -0
  118. package/dist/feeds/platform/handlers/nebula.cjs +68 -0
  119. package/dist/feeds/platform/handlers/nebula.js +68 -0
  120. package/dist/feeds/platform/handlers/note.cjs +53 -0
  121. package/dist/feeds/platform/handlers/note.js +53 -0
  122. package/dist/feeds/platform/handlers/observable.cjs +34 -0
  123. package/dist/feeds/platform/handlers/observable.js +34 -0
  124. package/dist/feeds/platform/handlers/odysee.cjs +20 -0
  125. package/dist/feeds/platform/handlers/odysee.js +20 -0
  126. package/dist/feeds/platform/handlers/pagecord.cjs +16 -0
  127. package/dist/feeds/platform/handlers/pagecord.js +16 -0
  128. package/dist/feeds/platform/handlers/paragraph.cjs +1 -2
  129. package/dist/feeds/platform/handlers/paragraph.js +1 -2
  130. package/dist/feeds/platform/handlers/pika.cjs +35 -0
  131. package/dist/feeds/platform/handlers/pika.js +35 -0
  132. package/dist/feeds/platform/handlers/pinterest.cjs +13 -0
  133. package/dist/feeds/platform/handlers/pinterest.js +13 -0
  134. package/dist/feeds/platform/handlers/pixelfed.cjs +46 -0
  135. package/dist/feeds/platform/handlers/pixelfed.js +46 -0
  136. package/dist/feeds/platform/handlers/pleroma.cjs +34 -0
  137. package/dist/feeds/platform/handlers/pleroma.js +34 -0
  138. package/dist/feeds/platform/handlers/podbean.cjs +29 -0
  139. package/dist/feeds/platform/handlers/podbean.js +29 -0
  140. package/dist/feeds/platform/handlers/podigee.cjs +29 -0
  141. package/dist/feeds/platform/handlers/podigee.js +29 -0
  142. package/dist/feeds/platform/handlers/posthaven.cjs +24 -0
  143. package/dist/feeds/platform/handlers/posthaven.js +24 -0
  144. package/dist/feeds/platform/handlers/prose.cjs +26 -0
  145. package/dist/feeds/platform/handlers/prose.js +26 -0
  146. package/dist/feeds/platform/handlers/qiita.cjs +58 -0
  147. package/dist/feeds/platform/handlers/qiita.js +58 -0
  148. package/dist/feeds/platform/handlers/reddit.cjs +83 -9
  149. package/dist/feeds/platform/handlers/reddit.js +83 -9
  150. package/dist/feeds/platform/handlers/rssCom.cjs +20 -0
  151. package/dist/feeds/platform/handlers/rssCom.js +20 -0
  152. package/dist/feeds/platform/handlers/seesaa.cjs +22 -0
  153. package/dist/feeds/platform/handlers/seesaa.js +22 -0
  154. package/dist/feeds/platform/handlers/sourceforge.cjs +37 -4
  155. package/dist/feeds/platform/handlers/sourceforge.js +37 -4
  156. package/dist/feeds/platform/handlers/spreaker.cjs +21 -0
  157. package/dist/feeds/platform/handlers/spreaker.js +21 -0
  158. package/dist/feeds/platform/handlers/stackExchange.cjs +26 -2
  159. package/dist/feeds/platform/handlers/stackExchange.js +26 -2
  160. package/dist/feeds/platform/handlers/steam.cjs +7 -0
  161. package/dist/feeds/platform/handlers/steam.js +7 -0
  162. package/dist/feeds/platform/handlers/tildes.cjs +41 -0
  163. package/dist/feeds/platform/handlers/tildes.js +41 -0
  164. package/dist/feeds/platform/handlers/tistory.cjs +16 -0
  165. package/dist/feeds/platform/handlers/tistory.js +16 -0
  166. package/dist/feeds/platform/handlers/transistor.cjs +29 -0
  167. package/dist/feeds/platform/handlers/transistor.js +29 -0
  168. package/dist/feeds/platform/handlers/velog.cjs +24 -0
  169. package/dist/feeds/platform/handlers/velog.js +24 -0
  170. package/dist/feeds/platform/handlers/vimeo.cjs +6 -0
  171. package/dist/feeds/platform/handlers/vimeo.js +6 -0
  172. package/dist/feeds/platform/handlers/weblogLol.cjs +26 -0
  173. package/dist/feeds/platform/handlers/weblogLol.js +26 -0
  174. package/dist/feeds/platform/handlers/weebly.cjs +25 -0
  175. package/dist/feeds/platform/handlers/weebly.js +25 -0
  176. package/dist/feeds/platform/handlers/wordpress.cjs +173 -28
  177. package/dist/feeds/platform/handlers/wordpress.js +173 -28
  178. package/dist/feeds/platform/handlers/writeas.cjs +51 -0
  179. package/dist/feeds/platform/handlers/writeas.js +51 -0
  180. package/dist/feeds/platform/handlers/ximalaya.cjs +1 -1
  181. package/dist/feeds/platform/handlers/ximalaya.js +1 -1
  182. package/dist/feeds/platform/handlers/youtube.cjs +4 -1
  183. package/dist/feeds/platform/handlers/youtube.js +4 -1
  184. package/dist/feeds/platform/handlers/zenn.cjs +54 -0
  185. package/dist/feeds/platform/handlers/zenn.js +54 -0
  186. package/dist/feeds.cjs +2 -0
  187. package/dist/feeds.d.cts +2 -2
  188. package/dist/feeds.d.ts +2 -2
  189. package/dist/feeds.js +2 -2
  190. package/dist/utils.d.cts +2 -1
  191. package/dist/utils.d.ts +2 -1
  192. package/package.json +6 -7
@@ -0,0 +1,24 @@
1
+ import { composeHint, isSubdomainOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/fireside.ts
3
+ const domainSuffix = /\.fireside\.fm$/i;
4
+ const firesideHandler = {
5
+ match: (url) => {
6
+ return isSubdomainOf(url, "fireside.fm");
7
+ },
8
+ resolve: (url) => {
9
+ const { hostname } = new URL(url);
10
+ const slug = hostname.replace(domainSuffix, "");
11
+ const uris = [];
12
+ uris.push({
13
+ uri: `https://feeds.fireside.fm/${slug}/rss`,
14
+ hint: composeHint("fireside:podcast-rss")
15
+ });
16
+ uris.push({
17
+ uri: `https://${slug}.fireside.fm/json`,
18
+ hint: composeHint("fireside:podcast-json")
19
+ });
20
+ return uris;
21
+ }
22
+ };
23
+ //#endregion
24
+ export { firesideHandler };
@@ -0,0 +1,44 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/friendica.ts
3
+ const profileRegex = /^\/profile\/([^/]+)/;
4
+ const isFriendicaHtml = (content) => {
5
+ return require_utils.hasMetaContent(content, "generator", "Friendica");
6
+ };
7
+ const friendicaHandler = {
8
+ match: (url, content) => {
9
+ try {
10
+ if (!content || !isFriendicaHtml(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}/feed/${match[1]}`,
24
+ hint: require_utils.composeHint("friendica:posts")
25
+ },
26
+ {
27
+ uri: `${origin}/feed/${match[1]}/comments`,
28
+ hint: require_utils.composeHint("friendica:comments")
29
+ },
30
+ {
31
+ uri: `${origin}/feed/${match[1]}/replies`,
32
+ hint: require_utils.composeHint("friendica:replies")
33
+ },
34
+ {
35
+ uri: `${origin}/feed/${match[1]}/activity`,
36
+ hint: require_utils.composeHint("friendica:activity")
37
+ }
38
+ ];
39
+ } catch {}
40
+ return [];
41
+ }
42
+ };
43
+ //#endregion
44
+ exports.friendicaHandler = friendicaHandler;
@@ -0,0 +1,44 @@
1
+ import { composeHint, hasMetaContent } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/friendica.ts
3
+ const profileRegex = /^\/profile\/([^/]+)/;
4
+ const isFriendicaHtml = (content) => {
5
+ return hasMetaContent(content, "generator", "Friendica");
6
+ };
7
+ const friendicaHandler = {
8
+ match: (url, content) => {
9
+ try {
10
+ if (!content || !isFriendicaHtml(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}/feed/${match[1]}`,
24
+ hint: composeHint("friendica:posts")
25
+ },
26
+ {
27
+ uri: `${origin}/feed/${match[1]}/comments`,
28
+ hint: composeHint("friendica:comments")
29
+ },
30
+ {
31
+ uri: `${origin}/feed/${match[1]}/replies`,
32
+ hint: composeHint("friendica:replies")
33
+ },
34
+ {
35
+ uri: `${origin}/feed/${match[1]}/activity`,
36
+ hint: composeHint("friendica:activity")
37
+ }
38
+ ];
39
+ } catch {}
40
+ return [];
41
+ }
42
+ };
43
+ //#endregion
44
+ export { friendicaHandler };
@@ -0,0 +1,30 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/ghost.ts
3
+ const tagRegex = /^\/tag\/([^/]+)/;
4
+ const authorRegex = /^\/author\/([^/]+)/;
5
+ const ghostHandler = {
6
+ match: (url) => {
7
+ return require_utils.isSubdomainOf(url, "ghost.io");
8
+ },
9
+ resolve: (url) => {
10
+ const { origin, pathname } = new URL(url);
11
+ const uris = [];
12
+ const tagMatch = pathname.match(tagRegex);
13
+ if (tagMatch?.[1]) uris.push({
14
+ uri: `${origin}/tag/${tagMatch[1]}/rss/`,
15
+ hint: require_utils.composeHint("ghost:tag")
16
+ });
17
+ const authorMatch = pathname.match(authorRegex);
18
+ if (authorMatch?.[1]) uris.push({
19
+ uri: `${origin}/author/${authorMatch[1]}/rss/`,
20
+ hint: require_utils.composeHint("ghost:author")
21
+ });
22
+ uris.push({
23
+ uri: `${origin}/rss/`,
24
+ hint: require_utils.composeHint("ghost:blog")
25
+ });
26
+ return uris;
27
+ }
28
+ };
29
+ //#endregion
30
+ exports.ghostHandler = ghostHandler;
@@ -0,0 +1,30 @@
1
+ import { composeHint, isSubdomainOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/ghost.ts
3
+ const tagRegex = /^\/tag\/([^/]+)/;
4
+ const authorRegex = /^\/author\/([^/]+)/;
5
+ const ghostHandler = {
6
+ match: (url) => {
7
+ return isSubdomainOf(url, "ghost.io");
8
+ },
9
+ resolve: (url) => {
10
+ const { origin, pathname } = new URL(url);
11
+ const uris = [];
12
+ const tagMatch = pathname.match(tagRegex);
13
+ if (tagMatch?.[1]) uris.push({
14
+ uri: `${origin}/tag/${tagMatch[1]}/rss/`,
15
+ hint: composeHint("ghost:tag")
16
+ });
17
+ const authorMatch = pathname.match(authorRegex);
18
+ if (authorMatch?.[1]) uris.push({
19
+ uri: `${origin}/author/${authorMatch[1]}/rss/`,
20
+ hint: composeHint("ghost:author")
21
+ });
22
+ uris.push({
23
+ uri: `${origin}/rss/`,
24
+ hint: composeHint("ghost:blog")
25
+ });
26
+ return uris;
27
+ }
28
+ };
29
+ //#endregion
30
+ export { ghostHandler };
@@ -4,6 +4,7 @@ const userRegex = /^\/([^/]+)\/?$/;
4
4
  const repoRegex = /^\/([^/]+)\/([^/]+)/;
5
5
  const wikiRegex = /\/wiki(\/|$)/;
6
6
  const discussionsRegex = /\/discussions(\/|$)/;
7
+ const discussionCategoryRegex = /\/discussions\/categories\/([^/]+)/;
7
8
  const branchRegex = /^\/[^/]+\/[^/]+\/tree\/([^/]+)\/?$/;
8
9
  const fileRegex = /^\/[^/]+\/[^/]+\/(?:blob|commits)\/([^/]+)\/(.+)/;
9
10
  const hosts = ["github.com", "www.github.com"];
@@ -90,6 +91,11 @@ const githubHandler = {
90
91
  uri: `https://github.com/${owner}/${repo}/discussions.atom`,
91
92
  hint: require_utils.composeHint("github:discussions")
92
93
  });
94
+ const discussionCategoryMatch = pathname.match(discussionCategoryRegex);
95
+ if (discussionCategoryMatch?.[1]) uris.push({
96
+ uri: `https://github.com/${owner}/${repo}/discussions/categories/${discussionCategoryMatch[1]}.atom`,
97
+ hint: require_utils.composeHint("github:discussion-category")
98
+ });
93
99
  const branchMatch = pathname.match(branchRegex);
94
100
  if (branchMatch?.[1]) {
95
101
  const branch = branchMatch[1];
@@ -4,6 +4,7 @@ const userRegex = /^\/([^/]+)\/?$/;
4
4
  const repoRegex = /^\/([^/]+)\/([^/]+)/;
5
5
  const wikiRegex = /\/wiki(\/|$)/;
6
6
  const discussionsRegex = /\/discussions(\/|$)/;
7
+ const discussionCategoryRegex = /\/discussions\/categories\/([^/]+)/;
7
8
  const branchRegex = /^\/[^/]+\/[^/]+\/tree\/([^/]+)\/?$/;
8
9
  const fileRegex = /^\/[^/]+\/[^/]+\/(?:blob|commits)\/([^/]+)\/(.+)/;
9
10
  const hosts = ["github.com", "www.github.com"];
@@ -90,6 +91,11 @@ const githubHandler = {
90
91
  uri: `https://github.com/${owner}/${repo}/discussions.atom`,
91
92
  hint: composeHint("github:discussions")
92
93
  });
94
+ const discussionCategoryMatch = pathname.match(discussionCategoryRegex);
95
+ if (discussionCategoryMatch?.[1]) uris.push({
96
+ uri: `https://github.com/${owner}/${repo}/discussions/categories/${discussionCategoryMatch[1]}.atom`,
97
+ hint: composeHint("github:discussion-category")
98
+ });
93
99
  const branchMatch = pathname.match(branchRegex);
94
100
  if (branchMatch?.[1]) {
95
101
  const branch = branchMatch[1];
@@ -2,7 +2,9 @@ const require_utils = require("../../../common/utils.cjs");
2
2
  //#region src/feeds/platform/handlers/githubGist.ts
3
3
  const gistRegex = /^\/([^/]+)\/([a-f0-9]+)/;
4
4
  const starredRegex = /^\/([^/]+)\/starred\/?$/;
5
+ const forksRegex = /^\/([^/]+)\/forks\/?$/;
5
6
  const userRegex = /^\/([^/]+)\/?$/;
7
+ const discoverRegex = /^\/discover\/?$/;
6
8
  const hosts = ["gist.github.com"];
7
9
  const excludedPaths = [
8
10
  "discover",
@@ -17,6 +19,20 @@ const githubGistHandler = {
17
19
  },
18
20
  resolve: (url) => {
19
21
  const { pathname } = new URL(url);
22
+ if (discoverRegex.test(pathname)) return [{
23
+ uri: "https://gist.github.com/discover.atom",
24
+ hint: require_utils.composeHint("github-gist:discover")
25
+ }];
26
+ const starredMatch = pathname.match(starredRegex);
27
+ if (starredMatch?.[1] && !require_utils.isAnyOf(starredMatch[1], excludedPaths)) return [{
28
+ uri: `https://gist.github.com/${starredMatch[1]}/starred.atom`,
29
+ hint: require_utils.composeHint("github-gist:starred")
30
+ }];
31
+ const forksMatch = pathname.match(forksRegex);
32
+ if (forksMatch?.[1] && !require_utils.isAnyOf(forksMatch[1], excludedPaths)) return [{
33
+ uri: `https://gist.github.com/${forksMatch[1]}/forks.atom`,
34
+ hint: require_utils.composeHint("github-gist:forks")
35
+ }];
20
36
  const gistMatch = pathname.match(gistRegex);
21
37
  if (gistMatch?.[1] && gistMatch?.[2]) {
22
38
  const username = gistMatch[1];
@@ -26,11 +42,6 @@ const githubGistHandler = {
26
42
  }];
27
43
  return [];
28
44
  }
29
- const starredMatch = pathname.match(starredRegex);
30
- if (starredMatch?.[1] && !require_utils.isAnyOf(starredMatch[1], excludedPaths)) return [{
31
- uri: `https://gist.github.com/${starredMatch[1]}/starred.atom`,
32
- hint: require_utils.composeHint("github-gist:starred")
33
- }];
34
45
  const userMatch = pathname.match(userRegex);
35
46
  if (userMatch?.[1] && !require_utils.isAnyOf(userMatch[1], excludedPaths)) return [{
36
47
  uri: `https://gist.github.com/${userMatch[1]}.atom`,
@@ -2,7 +2,9 @@ import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
2
  //#region src/feeds/platform/handlers/githubGist.ts
3
3
  const gistRegex = /^\/([^/]+)\/([a-f0-9]+)/;
4
4
  const starredRegex = /^\/([^/]+)\/starred\/?$/;
5
+ const forksRegex = /^\/([^/]+)\/forks\/?$/;
5
6
  const userRegex = /^\/([^/]+)\/?$/;
7
+ const discoverRegex = /^\/discover\/?$/;
6
8
  const hosts = ["gist.github.com"];
7
9
  const excludedPaths = [
8
10
  "discover",
@@ -17,6 +19,20 @@ const githubGistHandler = {
17
19
  },
18
20
  resolve: (url) => {
19
21
  const { pathname } = new URL(url);
22
+ if (discoverRegex.test(pathname)) return [{
23
+ uri: "https://gist.github.com/discover.atom",
24
+ hint: composeHint("github-gist:discover")
25
+ }];
26
+ const starredMatch = pathname.match(starredRegex);
27
+ if (starredMatch?.[1] && !isAnyOf(starredMatch[1], excludedPaths)) return [{
28
+ uri: `https://gist.github.com/${starredMatch[1]}/starred.atom`,
29
+ hint: composeHint("github-gist:starred")
30
+ }];
31
+ const forksMatch = pathname.match(forksRegex);
32
+ if (forksMatch?.[1] && !isAnyOf(forksMatch[1], excludedPaths)) return [{
33
+ uri: `https://gist.github.com/${forksMatch[1]}/forks.atom`,
34
+ hint: composeHint("github-gist:forks")
35
+ }];
20
36
  const gistMatch = pathname.match(gistRegex);
21
37
  if (gistMatch?.[1] && gistMatch?.[2]) {
22
38
  const username = gistMatch[1];
@@ -26,11 +42,6 @@ const githubGistHandler = {
26
42
  }];
27
43
  return [];
28
44
  }
29
- const starredMatch = pathname.match(starredRegex);
30
- if (starredMatch?.[1] && !isAnyOf(starredMatch[1], excludedPaths)) return [{
31
- uri: `https://gist.github.com/${starredMatch[1]}/starred.atom`,
32
- hint: composeHint("github-gist:starred")
33
- }];
34
45
  const userMatch = pathname.match(userRegex);
35
46
  if (userMatch?.[1] && !isAnyOf(userMatch[1], excludedPaths)) return [{
36
47
  uri: `https://gist.github.com/${userMatch[1]}.atom`,
@@ -54,20 +54,38 @@ const gitlabHandler = {
54
54
  if (pathSegments.length >= 2) {
55
55
  const user = pathSegments[0];
56
56
  const repo = pathSegments[1];
57
- if (!require_utils.isAnyOf(user, excludedPaths)) return [
58
- {
59
- uri: `${origin}/${user}/${repo}/-/releases.atom`,
60
- hint: require_utils.composeHint("gitlab:releases")
61
- },
62
- {
63
- uri: `${origin}/${user}/${repo}/-/tags?format=atom`,
64
- hint: require_utils.composeHint("gitlab:tags")
65
- },
66
- {
67
- uri: `${origin}/${user}/${repo}.atom`,
68
- hint: require_utils.composeHint("gitlab:activity")
57
+ if (!require_utils.isAnyOf(user, excludedPaths)) {
58
+ const repoFeeds = [
59
+ {
60
+ uri: `${origin}/${user}/${repo}/-/releases.atom`,
61
+ hint: require_utils.composeHint("gitlab:releases")
62
+ },
63
+ {
64
+ uri: `${origin}/${user}/${repo}/-/tags?format=atom`,
65
+ hint: require_utils.composeHint("gitlab:tags")
66
+ },
67
+ {
68
+ uri: `${origin}/${user}/${repo}/-/issues.atom`,
69
+ hint: require_utils.composeHint("gitlab:issues")
70
+ },
71
+ {
72
+ uri: `${origin}/${user}/${repo}/-/merge_requests.atom`,
73
+ hint: require_utils.composeHint("gitlab:merge-requests")
74
+ },
75
+ {
76
+ uri: `${origin}/${user}/${repo}.atom`,
77
+ hint: require_utils.composeHint("gitlab:activity")
78
+ }
79
+ ];
80
+ if (pathSegments[2] === "-" && (pathSegments[3] === "commits" || pathSegments[3] === "tree") && pathSegments[4]) {
81
+ const branch = pathSegments[4];
82
+ repoFeeds.unshift({
83
+ uri: `${origin}/${user}/${repo}/-/commits/${branch}?format=atom`,
84
+ hint: require_utils.composeHint("gitlab:branch-commits")
85
+ });
69
86
  }
70
- ];
87
+ return repoFeeds;
88
+ }
71
89
  }
72
90
  return [];
73
91
  }
@@ -54,20 +54,38 @@ const gitlabHandler = {
54
54
  if (pathSegments.length >= 2) {
55
55
  const user = pathSegments[0];
56
56
  const repo = pathSegments[1];
57
- if (!isAnyOf(user, excludedPaths)) return [
58
- {
59
- uri: `${origin}/${user}/${repo}/-/releases.atom`,
60
- hint: composeHint("gitlab:releases")
61
- },
62
- {
63
- uri: `${origin}/${user}/${repo}/-/tags?format=atom`,
64
- hint: composeHint("gitlab:tags")
65
- },
66
- {
67
- uri: `${origin}/${user}/${repo}.atom`,
68
- hint: composeHint("gitlab:activity")
57
+ if (!isAnyOf(user, excludedPaths)) {
58
+ const repoFeeds = [
59
+ {
60
+ uri: `${origin}/${user}/${repo}/-/releases.atom`,
61
+ hint: composeHint("gitlab:releases")
62
+ },
63
+ {
64
+ uri: `${origin}/${user}/${repo}/-/tags?format=atom`,
65
+ hint: composeHint("gitlab:tags")
66
+ },
67
+ {
68
+ uri: `${origin}/${user}/${repo}/-/issues.atom`,
69
+ hint: composeHint("gitlab:issues")
70
+ },
71
+ {
72
+ uri: `${origin}/${user}/${repo}/-/merge_requests.atom`,
73
+ hint: composeHint("gitlab:merge-requests")
74
+ },
75
+ {
76
+ uri: `${origin}/${user}/${repo}.atom`,
77
+ hint: composeHint("gitlab:activity")
78
+ }
79
+ ];
80
+ if (pathSegments[2] === "-" && (pathSegments[3] === "commits" || pathSegments[3] === "tree") && pathSegments[4]) {
81
+ const branch = pathSegments[4];
82
+ repoFeeds.unshift({
83
+ uri: `${origin}/${user}/${repo}/-/commits/${branch}?format=atom`,
84
+ hint: composeHint("gitlab:branch-commits")
85
+ });
69
86
  }
70
- ];
87
+ return repoFeeds;
88
+ }
71
89
  }
72
90
  return [];
73
91
  }
@@ -10,8 +10,9 @@ const goodreadsHandler = {
10
10
  return require_utils.isHostOf(url, hosts);
11
11
  },
12
12
  resolve: (url) => {
13
- const { origin, pathname } = new URL(url);
13
+ const { origin, pathname, searchParams } = new URL(url);
14
14
  const pathSegments = pathname.split("/").filter(Boolean);
15
+ const shelf = searchParams.get("shelf");
15
16
  if (pathSegments[0] === "user" && pathSegments[1] === "show" && pathSegments[2]) {
16
17
  const userId = parseUserId(pathSegments[2]);
17
18
  if (userId) return [{
@@ -24,13 +25,22 @@ const goodreadsHandler = {
24
25
  }
25
26
  if (pathSegments[0] === "review" && pathSegments[1] === "list" && pathSegments[2]) {
26
27
  const userId = parseUserId(pathSegments[2]);
27
- if (userId) return [{
28
- uri: `${origin}/review/list_rss/${userId}`,
29
- hint: require_utils.composeHint("goodreads:reviews")
30
- }, {
31
- uri: `${origin}/user/updates_rss/${userId}`,
32
- hint: require_utils.composeHint("goodreads:updates")
33
- }];
28
+ if (userId) {
29
+ const uris = [];
30
+ if (shelf) uris.push({
31
+ uri: `${origin}/review/list_rss/${userId}?shelf=${encodeURIComponent(shelf)}`,
32
+ hint: require_utils.composeHint("goodreads:shelf")
33
+ });
34
+ uris.push({
35
+ uri: `${origin}/review/list_rss/${userId}`,
36
+ hint: require_utils.composeHint("goodreads:reviews")
37
+ });
38
+ uris.push({
39
+ uri: `${origin}/user/updates_rss/${userId}`,
40
+ hint: require_utils.composeHint("goodreads:updates")
41
+ });
42
+ return uris;
43
+ }
34
44
  }
35
45
  return [];
36
46
  }
@@ -10,8 +10,9 @@ const goodreadsHandler = {
10
10
  return isHostOf(url, hosts);
11
11
  },
12
12
  resolve: (url) => {
13
- const { origin, pathname } = new URL(url);
13
+ const { origin, pathname, searchParams } = new URL(url);
14
14
  const pathSegments = pathname.split("/").filter(Boolean);
15
+ const shelf = searchParams.get("shelf");
15
16
  if (pathSegments[0] === "user" && pathSegments[1] === "show" && pathSegments[2]) {
16
17
  const userId = parseUserId(pathSegments[2]);
17
18
  if (userId) return [{
@@ -24,13 +25,22 @@ const goodreadsHandler = {
24
25
  }
25
26
  if (pathSegments[0] === "review" && pathSegments[1] === "list" && pathSegments[2]) {
26
27
  const userId = parseUserId(pathSegments[2]);
27
- if (userId) return [{
28
- uri: `${origin}/review/list_rss/${userId}`,
29
- hint: composeHint("goodreads:reviews")
30
- }, {
31
- uri: `${origin}/user/updates_rss/${userId}`,
32
- hint: composeHint("goodreads:updates")
33
- }];
28
+ if (userId) {
29
+ const uris = [];
30
+ if (shelf) uris.push({
31
+ uri: `${origin}/review/list_rss/${userId}?shelf=${encodeURIComponent(shelf)}`,
32
+ hint: composeHint("goodreads:shelf")
33
+ });
34
+ uris.push({
35
+ uri: `${origin}/review/list_rss/${userId}`,
36
+ hint: composeHint("goodreads:reviews")
37
+ });
38
+ uris.push({
39
+ uri: `${origin}/user/updates_rss/${userId}`,
40
+ hint: composeHint("goodreads:updates")
41
+ });
42
+ return uris;
43
+ }
34
44
  }
35
45
  return [];
36
46
  }
@@ -0,0 +1,21 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/hackernews.ts
3
+ const hosts = ["news.ycombinator.com"];
4
+ const hackernewsHandler = {
5
+ match: (url) => {
6
+ return require_utils.isHostOf(url, hosts);
7
+ },
8
+ resolve: (url) => {
9
+ const { pathname } = new URL(url);
10
+ if (pathname === "/show" || pathname === "/shownew") return [{
11
+ uri: "https://news.ycombinator.com/showrss",
12
+ hint: require_utils.composeHint("hackernews:show")
13
+ }];
14
+ return [{
15
+ uri: "https://news.ycombinator.com/rss",
16
+ hint: require_utils.composeHint("hackernews:front")
17
+ }];
18
+ }
19
+ };
20
+ //#endregion
21
+ exports.hackernewsHandler = hackernewsHandler;
@@ -0,0 +1,21 @@
1
+ import { composeHint, isHostOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/hackernews.ts
3
+ const hosts = ["news.ycombinator.com"];
4
+ const hackernewsHandler = {
5
+ match: (url) => {
6
+ return isHostOf(url, hosts);
7
+ },
8
+ resolve: (url) => {
9
+ const { pathname } = new URL(url);
10
+ if (pathname === "/show" || pathname === "/shownew") return [{
11
+ uri: "https://news.ycombinator.com/showrss",
12
+ hint: composeHint("hackernews:show")
13
+ }];
14
+ return [{
15
+ uri: "https://news.ycombinator.com/rss",
16
+ hint: composeHint("hackernews:front")
17
+ }];
18
+ }
19
+ };
20
+ //#endregion
21
+ export { hackernewsHandler };
@@ -2,7 +2,7 @@ const require_utils = require("../../../common/utils.cjs");
2
2
  //#region src/feeds/platform/handlers/hashnode.ts
3
3
  const hashnodeHandler = {
4
4
  match: (url) => {
5
- return require_utils.isSubdomainOf(url, "hashnode.dev");
5
+ return require_utils.isSubdomainOf(url, ["hashnode.dev", "hashnode.com"]);
6
6
  },
7
7
  resolve: (url) => {
8
8
  const { origin } = new URL(url);
@@ -2,7 +2,7 @@ import { composeHint, isSubdomainOf } from "../../../common/utils.js";
2
2
  //#region src/feeds/platform/handlers/hashnode.ts
3
3
  const hashnodeHandler = {
4
4
  match: (url) => {
5
- return isSubdomainOf(url, "hashnode.dev");
5
+ return isSubdomainOf(url, ["hashnode.dev", "hashnode.com"]);
6
6
  },
7
7
  resolve: (url) => {
8
8
  const { origin } = new URL(url);
@@ -3,7 +3,10 @@ const require_utils = require("../../../common/utils.cjs");
3
3
  const domains = [
4
4
  "hatenablog.com",
5
5
  "hatenablog.jp",
6
- "hateblo.jp"
6
+ "hateblo.jp",
7
+ "hatenadiary.com",
8
+ "hatenadiary.jp",
9
+ "hatenadiary.org"
7
10
  ];
8
11
  const categoryRegex = /^\/archive\/category\/([^/]+)/;
9
12
  const authorRegex = /^\/archive\/author\/([^/]+)/;
@@ -3,7 +3,10 @@ import { composeHint, isSubdomainOf } from "../../../common/utils.js";
3
3
  const domains = [
4
4
  "hatenablog.com",
5
5
  "hatenablog.jp",
6
- "hateblo.jp"
6
+ "hateblo.jp",
7
+ "hatenadiary.com",
8
+ "hatenadiary.jp",
9
+ "hatenadiary.org"
7
10
  ];
8
11
  const categoryRegex = /^\/archive\/category\/([^/]+)/;
9
12
  const authorRegex = /^\/archive\/author\/([^/]+)/;
@@ -0,0 +1,32 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/hearthis.ts
3
+ const hosts = ["hearthis.at", "www.hearthis.at"];
4
+ const excludedPaths = [
5
+ "about",
6
+ "api",
7
+ "feed",
8
+ "login",
9
+ "privacy",
10
+ "search",
11
+ "set",
12
+ "signup",
13
+ "terms"
14
+ ];
15
+ const hearthisHandler = {
16
+ match: (url) => {
17
+ return require_utils.isHostOf(url, hosts);
18
+ },
19
+ resolve: (url) => {
20
+ const { pathname } = new URL(url);
21
+ const pathSegments = pathname.split("/").filter(Boolean);
22
+ if (pathSegments.length === 0) return [];
23
+ const username = pathSegments[0];
24
+ if (require_utils.isAnyOf(username, excludedPaths)) return [];
25
+ return [{
26
+ uri: `https://hearthis.at/${username}/podcast/`,
27
+ hint: require_utils.composeHint("hearthis:tracks")
28
+ }];
29
+ }
30
+ };
31
+ //#endregion
32
+ exports.hearthisHandler = hearthisHandler;
@@ -0,0 +1,32 @@
1
+ import { composeHint, isAnyOf, isHostOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/hearthis.ts
3
+ const hosts = ["hearthis.at", "www.hearthis.at"];
4
+ const excludedPaths = [
5
+ "about",
6
+ "api",
7
+ "feed",
8
+ "login",
9
+ "privacy",
10
+ "search",
11
+ "set",
12
+ "signup",
13
+ "terms"
14
+ ];
15
+ const hearthisHandler = {
16
+ match: (url) => {
17
+ return isHostOf(url, hosts);
18
+ },
19
+ resolve: (url) => {
20
+ const { pathname } = new URL(url);
21
+ const pathSegments = pathname.split("/").filter(Boolean);
22
+ if (pathSegments.length === 0) return [];
23
+ const username = pathSegments[0];
24
+ if (isAnyOf(username, excludedPaths)) return [];
25
+ return [{
26
+ uri: `https://hearthis.at/${username}/podcast/`,
27
+ hint: composeHint("hearthis:tracks")
28
+ }];
29
+ }
30
+ };
31
+ //#endregion
32
+ export { hearthisHandler };