feedscout 1.8.0 → 1.9.0

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 (236) hide show
  1. package/README.md +1 -1
  2. package/dist/blogrolls/defaults.cjs +16 -10
  3. package/dist/blogrolls/defaults.d.cts +1 -2
  4. package/dist/blogrolls/defaults.d.ts +1 -2
  5. package/dist/blogrolls/defaults.js +17 -10
  6. package/dist/blogrolls/extractors.cjs +2 -2
  7. package/dist/blogrolls/extractors.d.cts +2 -2
  8. package/dist/blogrolls/extractors.d.ts +2 -2
  9. package/dist/blogrolls/extractors.js +2 -2
  10. package/dist/blogrolls/index.cjs +9 -10
  11. package/dist/blogrolls/index.js +4 -5
  12. package/dist/blogrolls.cjs +1 -2
  13. package/dist/blogrolls.d.cts +3 -3
  14. package/dist/blogrolls.d.ts +3 -3
  15. package/dist/blogrolls.js +3 -3
  16. package/dist/common/discover/defaults.cjs +46 -0
  17. package/dist/common/discover/defaults.d.cts +6 -0
  18. package/dist/common/discover/defaults.d.ts +6 -0
  19. package/dist/common/discover/defaults.js +44 -0
  20. package/dist/common/discover/index.cjs +7 -7
  21. package/dist/common/discover/index.js +2 -2
  22. package/dist/common/discover/utils.cjs +0 -29
  23. package/dist/common/discover/utils.d.cts +1 -3
  24. package/dist/common/discover/utils.d.ts +1 -3
  25. package/dist/common/discover/utils.js +1 -28
  26. package/dist/common/locales.cjs +214 -10
  27. package/dist/common/locales.js +214 -10
  28. package/dist/common/types.d.cts +3 -2
  29. package/dist/common/types.d.ts +3 -2
  30. package/dist/common/uris/html/handlers.cjs +14 -0
  31. package/dist/common/uris/html/handlers.js +14 -0
  32. package/dist/common/uris/html/index.cjs +17 -1
  33. package/dist/common/uris/html/index.js +17 -1
  34. package/dist/common/uris/html/types.d.cts +5 -4
  35. package/dist/common/uris/html/types.d.ts +5 -4
  36. package/dist/common/utils.cjs +12 -11
  37. package/dist/common/utils.d.cts +6 -4
  38. package/dist/common/utils.d.ts +6 -4
  39. package/dist/common/utils.js +13 -11
  40. package/dist/favicons/extractors.cjs +2 -2
  41. package/dist/favicons/extractors.d.cts +2 -2
  42. package/dist/favicons/extractors.d.ts +2 -2
  43. package/dist/favicons/extractors.js +2 -2
  44. package/dist/favicons/index.cjs +11 -12
  45. package/dist/favicons/index.js +4 -5
  46. package/dist/favicons.cjs +1 -1
  47. package/dist/favicons.d.cts +2 -2
  48. package/dist/favicons.d.ts +2 -2
  49. package/dist/favicons.js +2 -2
  50. package/dist/feeds/defaults.cjs +121 -9
  51. package/dist/feeds/defaults.d.cts +4 -3
  52. package/dist/feeds/defaults.d.ts +4 -3
  53. package/dist/feeds/defaults.js +121 -10
  54. package/dist/feeds/extractors.cjs +6 -6
  55. package/dist/feeds/extractors.d.cts +2 -2
  56. package/dist/feeds/extractors.d.ts +2 -2
  57. package/dist/feeds/extractors.js +4 -4
  58. package/dist/feeds/index.cjs +9 -10
  59. package/dist/feeds/index.js +4 -5
  60. package/dist/feeds/platform/handlers/acast.cjs +26 -0
  61. package/dist/feeds/platform/handlers/acast.js +26 -0
  62. package/dist/feeds/platform/handlers/ameblo.cjs +36 -0
  63. package/dist/feeds/platform/handlers/ameblo.js +36 -0
  64. package/dist/feeds/platform/handlers/applePodcasts.cjs +1 -1
  65. package/dist/feeds/platform/handlers/applePodcasts.js +1 -1
  66. package/dist/feeds/platform/handlers/arena.cjs +42 -0
  67. package/dist/feeds/platform/handlers/arena.js +42 -0
  68. package/dist/feeds/platform/handlers/artstation.cjs +52 -0
  69. package/dist/feeds/platform/handlers/artstation.js +52 -0
  70. package/dist/feeds/platform/handlers/audioboom.cjs +23 -0
  71. package/dist/feeds/platform/handlers/audioboom.js +23 -0
  72. package/dist/feeds/platform/handlers/bearblog.cjs +45 -0
  73. package/dist/feeds/platform/handlers/bearblog.js +45 -0
  74. package/dist/feeds/platform/handlers/behance.cjs +7 -0
  75. package/dist/feeds/platform/handlers/behance.js +7 -0
  76. package/dist/feeds/platform/handlers/blogspot.cjs +38 -2
  77. package/dist/feeds/platform/handlers/blogspot.js +38 -2
  78. package/dist/feeds/platform/handlers/bookwyrm.cjs +48 -0
  79. package/dist/feeds/platform/handlers/bookwyrm.js +48 -0
  80. package/dist/feeds/platform/handlers/buttondown.cjs +43 -0
  81. package/dist/feeds/platform/handlers/buttondown.js +43 -0
  82. package/dist/feeds/platform/handlers/buzzsprout.cjs +22 -0
  83. package/dist/feeds/platform/handlers/buzzsprout.js +22 -0
  84. package/dist/feeds/platform/handlers/codeberg.cjs +5 -5
  85. package/dist/feeds/platform/handlers/codeberg.js +5 -5
  86. package/dist/feeds/platform/handlers/dailymotion.cjs +16 -0
  87. package/dist/feeds/platform/handlers/dailymotion.js +16 -0
  88. package/dist/feeds/platform/handlers/deviantart.cjs +25 -6
  89. package/dist/feeds/platform/handlers/deviantart.js +25 -6
  90. package/dist/feeds/platform/handlers/devto.cjs +8 -0
  91. package/dist/feeds/platform/handlers/devto.js +8 -0
  92. package/dist/feeds/platform/handlers/discourse.cjs +70 -0
  93. package/dist/feeds/platform/handlers/discourse.js +70 -0
  94. package/dist/feeds/platform/handlers/dreamwidth.cjs +48 -0
  95. package/dist/feeds/platform/handlers/dreamwidth.js +48 -0
  96. package/dist/feeds/platform/handlers/exblog.cjs +35 -0
  97. package/dist/feeds/platform/handlers/exblog.js +35 -0
  98. package/dist/feeds/platform/handlers/fireside.cjs +24 -0
  99. package/dist/feeds/platform/handlers/fireside.js +24 -0
  100. package/dist/feeds/platform/handlers/friendica.cjs +44 -0
  101. package/dist/feeds/platform/handlers/friendica.js +44 -0
  102. package/dist/feeds/platform/handlers/ghost.cjs +30 -0
  103. package/dist/feeds/platform/handlers/ghost.js +30 -0
  104. package/dist/feeds/platform/handlers/github.cjs +6 -0
  105. package/dist/feeds/platform/handlers/github.js +6 -0
  106. package/dist/feeds/platform/handlers/githubGist.cjs +16 -5
  107. package/dist/feeds/platform/handlers/githubGist.js +16 -5
  108. package/dist/feeds/platform/handlers/gitlab.cjs +31 -13
  109. package/dist/feeds/platform/handlers/gitlab.js +31 -13
  110. package/dist/feeds/platform/handlers/goodreads.cjs +18 -8
  111. package/dist/feeds/platform/handlers/goodreads.js +18 -8
  112. package/dist/feeds/platform/handlers/hackernews.cjs +21 -0
  113. package/dist/feeds/platform/handlers/hackernews.js +21 -0
  114. package/dist/feeds/platform/handlers/hashnode.cjs +1 -1
  115. package/dist/feeds/platform/handlers/hashnode.js +1 -1
  116. package/dist/feeds/platform/handlers/hatenablog.cjs +4 -1
  117. package/dist/feeds/platform/handlers/hatenablog.js +4 -1
  118. package/dist/feeds/platform/handlers/hearthis.cjs +32 -0
  119. package/dist/feeds/platform/handlers/hearthis.js +32 -0
  120. package/dist/feeds/platform/handlers/heyWorld.cjs +18 -0
  121. package/dist/feeds/platform/handlers/heyWorld.js +18 -0
  122. package/dist/feeds/platform/handlers/insanejournal.cjs +69 -0
  123. package/dist/feeds/platform/handlers/insanejournal.js +69 -0
  124. package/dist/feeds/platform/handlers/itchio.cjs +24 -1
  125. package/dist/feeds/platform/handlers/itchio.js +24 -1
  126. package/dist/feeds/platform/handlers/lemmy.cjs +46 -4
  127. package/dist/feeds/platform/handlers/lemmy.js +46 -4
  128. package/dist/feeds/platform/handlers/letterboxd.cjs +4 -0
  129. package/dist/feeds/platform/handlers/letterboxd.js +4 -0
  130. package/dist/feeds/platform/handlers/libsyn.cjs +25 -0
  131. package/dist/feeds/platform/handlers/libsyn.js +25 -0
  132. package/dist/feeds/platform/handlers/listed.cjs +20 -0
  133. package/dist/feeds/platform/handlers/listed.js +20 -0
  134. package/dist/feeds/platform/handlers/livejournal.cjs +68 -0
  135. package/dist/feeds/platform/handlers/livejournal.js +68 -0
  136. package/dist/feeds/platform/handlers/mastodon.cjs +32 -0
  137. package/dist/feeds/platform/handlers/mastodon.js +32 -0
  138. package/dist/feeds/platform/handlers/mataroa.cjs +16 -0
  139. package/dist/feeds/platform/handlers/mataroa.js +16 -0
  140. package/dist/feeds/platform/handlers/medium.cjs +2 -2
  141. package/dist/feeds/platform/handlers/medium.js +2 -2
  142. package/dist/feeds/platform/handlers/microblog.cjs +55 -0
  143. package/dist/feeds/platform/handlers/microblog.js +55 -0
  144. package/dist/feeds/platform/handlers/misskey.cjs +40 -0
  145. package/dist/feeds/platform/handlers/misskey.js +40 -0
  146. package/dist/feeds/platform/handlers/myanimelist.cjs +43 -0
  147. package/dist/feeds/platform/handlers/myanimelist.js +43 -0
  148. package/dist/feeds/platform/handlers/naverBlog.cjs +21 -0
  149. package/dist/feeds/platform/handlers/naverBlog.js +21 -0
  150. package/dist/feeds/platform/handlers/nebula.cjs +68 -0
  151. package/dist/feeds/platform/handlers/nebula.js +68 -0
  152. package/dist/feeds/platform/handlers/note.cjs +53 -0
  153. package/dist/feeds/platform/handlers/note.js +53 -0
  154. package/dist/feeds/platform/handlers/observable.cjs +34 -0
  155. package/dist/feeds/platform/handlers/observable.js +34 -0
  156. package/dist/feeds/platform/handlers/odysee.cjs +20 -0
  157. package/dist/feeds/platform/handlers/odysee.js +20 -0
  158. package/dist/feeds/platform/handlers/pagecord.cjs +16 -0
  159. package/dist/feeds/platform/handlers/pagecord.js +16 -0
  160. package/dist/feeds/platform/handlers/paragraph.cjs +1 -2
  161. package/dist/feeds/platform/handlers/paragraph.js +1 -2
  162. package/dist/feeds/platform/handlers/pika.cjs +35 -0
  163. package/dist/feeds/platform/handlers/pika.js +35 -0
  164. package/dist/feeds/platform/handlers/pinterest.cjs +13 -0
  165. package/dist/feeds/platform/handlers/pinterest.js +13 -0
  166. package/dist/feeds/platform/handlers/pixelfed.cjs +46 -0
  167. package/dist/feeds/platform/handlers/pixelfed.js +46 -0
  168. package/dist/feeds/platform/handlers/pleroma.cjs +34 -0
  169. package/dist/feeds/platform/handlers/pleroma.js +34 -0
  170. package/dist/feeds/platform/handlers/podbean.cjs +29 -0
  171. package/dist/feeds/platform/handlers/podbean.js +29 -0
  172. package/dist/feeds/platform/handlers/podigee.cjs +29 -0
  173. package/dist/feeds/platform/handlers/podigee.js +29 -0
  174. package/dist/feeds/platform/handlers/posthaven.cjs +24 -0
  175. package/dist/feeds/platform/handlers/posthaven.js +24 -0
  176. package/dist/feeds/platform/handlers/prose.cjs +26 -0
  177. package/dist/feeds/platform/handlers/prose.js +26 -0
  178. package/dist/feeds/platform/handlers/qiita.cjs +58 -0
  179. package/dist/feeds/platform/handlers/qiita.js +58 -0
  180. package/dist/feeds/platform/handlers/reddit.cjs +83 -9
  181. package/dist/feeds/platform/handlers/reddit.js +83 -9
  182. package/dist/feeds/platform/handlers/rssCom.cjs +20 -0
  183. package/dist/feeds/platform/handlers/rssCom.js +20 -0
  184. package/dist/feeds/platform/handlers/seesaa.cjs +22 -0
  185. package/dist/feeds/platform/handlers/seesaa.js +22 -0
  186. package/dist/feeds/platform/handlers/sourceforge.cjs +37 -4
  187. package/dist/feeds/platform/handlers/sourceforge.js +37 -4
  188. package/dist/feeds/platform/handlers/spreaker.cjs +21 -0
  189. package/dist/feeds/platform/handlers/spreaker.js +21 -0
  190. package/dist/feeds/platform/handlers/stackExchange.cjs +26 -2
  191. package/dist/feeds/platform/handlers/stackExchange.js +26 -2
  192. package/dist/feeds/platform/handlers/steam.cjs +7 -0
  193. package/dist/feeds/platform/handlers/steam.js +7 -0
  194. package/dist/feeds/platform/handlers/tildes.cjs +41 -0
  195. package/dist/feeds/platform/handlers/tildes.js +41 -0
  196. package/dist/feeds/platform/handlers/tistory.cjs +16 -0
  197. package/dist/feeds/platform/handlers/tistory.js +16 -0
  198. package/dist/feeds/platform/handlers/transistor.cjs +29 -0
  199. package/dist/feeds/platform/handlers/transistor.js +29 -0
  200. package/dist/feeds/platform/handlers/velog.cjs +24 -0
  201. package/dist/feeds/platform/handlers/velog.js +24 -0
  202. package/dist/feeds/platform/handlers/vimeo.cjs +6 -0
  203. package/dist/feeds/platform/handlers/vimeo.js +6 -0
  204. package/dist/feeds/platform/handlers/weblogLol.cjs +26 -0
  205. package/dist/feeds/platform/handlers/weblogLol.js +26 -0
  206. package/dist/feeds/platform/handlers/weebly.cjs +25 -0
  207. package/dist/feeds/platform/handlers/weebly.js +25 -0
  208. package/dist/feeds/platform/handlers/wordpress.cjs +173 -28
  209. package/dist/feeds/platform/handlers/wordpress.js +173 -28
  210. package/dist/feeds/platform/handlers/writeas.cjs +51 -0
  211. package/dist/feeds/platform/handlers/writeas.js +51 -0
  212. package/dist/feeds/platform/handlers/ximalaya.cjs +1 -1
  213. package/dist/feeds/platform/handlers/ximalaya.js +1 -1
  214. package/dist/feeds/platform/handlers/youtube.cjs +4 -1
  215. package/dist/feeds/platform/handlers/youtube.js +4 -1
  216. package/dist/feeds/platform/handlers/zenn.cjs +54 -0
  217. package/dist/feeds/platform/handlers/zenn.js +54 -0
  218. package/dist/feeds.cjs +2 -1
  219. package/dist/feeds.d.cts +3 -3
  220. package/dist/feeds.d.ts +3 -3
  221. package/dist/feeds.js +3 -3
  222. package/dist/hubs/discover/index.cjs +4 -4
  223. package/dist/hubs/discover/index.js +3 -3
  224. package/dist/hubs/feed/index.cjs +2 -2
  225. package/dist/hubs/feed/index.js +2 -2
  226. package/dist/hubs/headers/index.cjs +2 -2
  227. package/dist/hubs/headers/index.js +2 -2
  228. package/dist/hubs/html/index.cjs +2 -2
  229. package/dist/hubs/html/index.js +2 -2
  230. package/dist/index.cjs +2 -1
  231. package/dist/index.d.cts +2 -1
  232. package/dist/index.d.ts +2 -1
  233. package/dist/index.js +2 -1
  234. package/dist/utils.d.cts +2 -1
  235. package/dist/utils.d.ts +2 -1
  236. package/package.json +6 -7
@@ -0,0 +1,20 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/listed.ts
3
+ const hosts = ["listed.to", "www.listed.to"];
4
+ const userRegex = /^\/@([^/]+)/;
5
+ const listedHandler = {
6
+ match: (url) => {
7
+ return require_utils.isHostOf(url, hosts);
8
+ },
9
+ resolve: (url) => {
10
+ const { pathname } = new URL(url);
11
+ const userMatch = pathname.match(userRegex);
12
+ if (!userMatch?.[1]) return [];
13
+ return [{
14
+ uri: `https://listed.to/@${userMatch[1]}/feed.rss`,
15
+ hint: require_utils.composeHint("listed:blog")
16
+ }];
17
+ }
18
+ };
19
+ //#endregion
20
+ exports.listedHandler = listedHandler;
@@ -0,0 +1,20 @@
1
+ import { composeHint, isHostOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/listed.ts
3
+ const hosts = ["listed.to", "www.listed.to"];
4
+ const userRegex = /^\/@([^/]+)/;
5
+ const listedHandler = {
6
+ match: (url) => {
7
+ return isHostOf(url, hosts);
8
+ },
9
+ resolve: (url) => {
10
+ const { pathname } = new URL(url);
11
+ const userMatch = pathname.match(userRegex);
12
+ if (!userMatch?.[1]) return [];
13
+ return [{
14
+ uri: `https://listed.to/@${userMatch[1]}/feed.rss`,
15
+ hint: composeHint("listed:blog")
16
+ }];
17
+ }
18
+ };
19
+ //#endregion
20
+ export { listedHandler };
@@ -0,0 +1,68 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/livejournal.ts
3
+ const wwwUsersPathRegex = /^\/(?:users\/|~)([^/]+)/;
4
+ const legacyUserPathRegex = /^\/([^/]+)/;
5
+ const tagRegex = /^\/tag\/([^/]+)/;
6
+ const reservedHosts = new Set([
7
+ "livejournal.com",
8
+ "www.livejournal.com",
9
+ "users.livejournal.com",
10
+ "community.livejournal.com",
11
+ "syndicated.livejournal.com"
12
+ ]);
13
+ const livejournalHandler = {
14
+ match: (url) => {
15
+ if (!require_utils.isSubdomainOf(url, "livejournal.com")) return false;
16
+ const { hostname, pathname } = new URL(url);
17
+ const lower = hostname.toLowerCase();
18
+ if (reservedHosts.has(lower)) {
19
+ if (lower === "www.livejournal.com") return wwwUsersPathRegex.test(pathname);
20
+ if (lower === "users.livejournal.com" || lower === "community.livejournal.com") return legacyUserPathRegex.test(pathname);
21
+ return false;
22
+ }
23
+ return true;
24
+ },
25
+ resolve: (url) => {
26
+ const { origin, hostname, pathname } = new URL(url);
27
+ const lowerHostname = hostname.toLowerCase();
28
+ const uris = [];
29
+ let userOrigin = origin;
30
+ if (lowerHostname === "www.livejournal.com") {
31
+ const userMatch = pathname.match(wwwUsersPathRegex);
32
+ if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
33
+ else return uris;
34
+ }
35
+ if (lowerHostname === "users.livejournal.com" || lowerHostname === "community.livejournal.com") {
36
+ const userMatch = pathname.match(legacyUserPathRegex);
37
+ if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
38
+ else return uris;
39
+ }
40
+ const tagMatch = pathname.match(tagRegex);
41
+ if (tagMatch?.[1]) {
42
+ const tag = encodeURIComponent(tagMatch[1]);
43
+ uris.push({
44
+ uri: `${userOrigin}/data/rss?tag=${tag}`,
45
+ hint: require_utils.composeHint("livejournal:posts-tag-rss")
46
+ });
47
+ uris.push({
48
+ uri: `${userOrigin}/data/atom?tag=${tag}`,
49
+ hint: require_utils.composeHint("livejournal:posts-tag-atom")
50
+ });
51
+ }
52
+ uris.push({
53
+ uri: `${userOrigin}/data/rss`,
54
+ hint: require_utils.composeHint("livejournal:posts-rss")
55
+ });
56
+ uris.push({
57
+ uri: `${userOrigin}/data/atom`,
58
+ hint: require_utils.composeHint("livejournal:posts-atom")
59
+ });
60
+ uris.push({
61
+ uri: `${userOrigin}/data/userpics`,
62
+ hint: require_utils.composeHint("livejournal:userpics-atom")
63
+ });
64
+ return uris;
65
+ }
66
+ };
67
+ //#endregion
68
+ exports.livejournalHandler = livejournalHandler;
@@ -0,0 +1,68 @@
1
+ import { composeHint, isSubdomainOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/livejournal.ts
3
+ const wwwUsersPathRegex = /^\/(?:users\/|~)([^/]+)/;
4
+ const legacyUserPathRegex = /^\/([^/]+)/;
5
+ const tagRegex = /^\/tag\/([^/]+)/;
6
+ const reservedHosts = new Set([
7
+ "livejournal.com",
8
+ "www.livejournal.com",
9
+ "users.livejournal.com",
10
+ "community.livejournal.com",
11
+ "syndicated.livejournal.com"
12
+ ]);
13
+ const livejournalHandler = {
14
+ match: (url) => {
15
+ if (!isSubdomainOf(url, "livejournal.com")) return false;
16
+ const { hostname, pathname } = new URL(url);
17
+ const lower = hostname.toLowerCase();
18
+ if (reservedHosts.has(lower)) {
19
+ if (lower === "www.livejournal.com") return wwwUsersPathRegex.test(pathname);
20
+ if (lower === "users.livejournal.com" || lower === "community.livejournal.com") return legacyUserPathRegex.test(pathname);
21
+ return false;
22
+ }
23
+ return true;
24
+ },
25
+ resolve: (url) => {
26
+ const { origin, hostname, pathname } = new URL(url);
27
+ const lowerHostname = hostname.toLowerCase();
28
+ const uris = [];
29
+ let userOrigin = origin;
30
+ if (lowerHostname === "www.livejournal.com") {
31
+ const userMatch = pathname.match(wwwUsersPathRegex);
32
+ if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
33
+ else return uris;
34
+ }
35
+ if (lowerHostname === "users.livejournal.com" || lowerHostname === "community.livejournal.com") {
36
+ const userMatch = pathname.match(legacyUserPathRegex);
37
+ if (userMatch?.[1]) userOrigin = `https://${userMatch[1]}.livejournal.com`;
38
+ else return uris;
39
+ }
40
+ const tagMatch = pathname.match(tagRegex);
41
+ if (tagMatch?.[1]) {
42
+ const tag = encodeURIComponent(tagMatch[1]);
43
+ uris.push({
44
+ uri: `${userOrigin}/data/rss?tag=${tag}`,
45
+ hint: composeHint("livejournal:posts-tag-rss")
46
+ });
47
+ uris.push({
48
+ uri: `${userOrigin}/data/atom?tag=${tag}`,
49
+ hint: composeHint("livejournal:posts-tag-atom")
50
+ });
51
+ }
52
+ uris.push({
53
+ uri: `${userOrigin}/data/rss`,
54
+ hint: composeHint("livejournal:posts-rss")
55
+ });
56
+ uris.push({
57
+ uri: `${userOrigin}/data/atom`,
58
+ hint: composeHint("livejournal:posts-atom")
59
+ });
60
+ uris.push({
61
+ uri: `${userOrigin}/data/userpics`,
62
+ hint: composeHint("livejournal:userpics-atom")
63
+ });
64
+ return uris;
65
+ }
66
+ };
67
+ //#endregion
68
+ export { livejournalHandler };
@@ -2,6 +2,9 @@ const require_utils = require("../../../common/utils.cjs");
2
2
  const require_mastodon = require("../../../favicons/platform/handlers/mastodon.cjs");
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: require_utils.composeHint("mastodon:replies")
34
+ }, {
35
+ uri: `${origin}/@${repliesMatch[1]}.rss`,
36
+ hint: require_utils.composeHint("mastodon:posts")
37
+ }];
38
+ const mediaMatch = pathname.match(mediaProfileRegex);
39
+ if (mediaMatch?.[1]) return [{
40
+ uri: `${origin}/@${mediaMatch[1]}/media.rss`,
41
+ hint: require_utils.composeHint("mastodon:media")
42
+ }, {
43
+ uri: `${origin}/@${mediaMatch[1]}.rss`,
44
+ hint: require_utils.composeHint("mastodon:posts")
45
+ }];
46
+ const taggedMatch = pathname.match(taggedProfileRegex);
47
+ if (taggedMatch?.[1] && taggedMatch?.[2]) {
48
+ const uris = [];
49
+ uris.push({
50
+ uri: `${origin}/@${taggedMatch[1]}/tagged/${taggedMatch[2]}.rss`,
51
+ hint: require_utils.composeHint("mastodon:tagged")
52
+ });
53
+ uris.push({
54
+ uri: `${origin}/@${taggedMatch[1]}.rss`,
55
+ hint: require_utils.composeHint("mastodon:posts")
56
+ });
57
+ return uris;
58
+ }
27
59
  const userMatch = pathname.match(profileRegex);
28
60
  if (userMatch?.[1]) return [{
29
61
  uri: `${origin}/@${userMatch[1]}.rss`,
@@ -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,16 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/mataroa.ts
3
+ const mataroaHandler = {
4
+ match: (url) => {
5
+ return require_utils.isSubdomainOf(url, "mataroa.blog");
6
+ },
7
+ resolve: (url) => {
8
+ const { origin } = new URL(url);
9
+ return [{
10
+ uri: `${origin}/rss/`,
11
+ hint: require_utils.composeHint("mataroa:blog")
12
+ }];
13
+ }
14
+ };
15
+ //#endregion
16
+ exports.mataroaHandler = mataroaHandler;
@@ -0,0 +1,16 @@
1
+ import { composeHint, isSubdomainOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/mataroa.ts
3
+ const mataroaHandler = {
4
+ match: (url) => {
5
+ return isSubdomainOf(url, "mataroa.blog");
6
+ },
7
+ resolve: (url) => {
8
+ const { origin } = new URL(url);
9
+ return [{
10
+ uri: `${origin}/rss/`,
11
+ hint: composeHint("mataroa:blog")
12
+ }];
13
+ }
14
+ };
15
+ //#endregion
16
+ export { mataroaHandler };
@@ -53,11 +53,11 @@ const mediumHandler = {
53
53
  const subdomain = lowerHostname.replace(".medium.com", "");
54
54
  const tagMatch = pathname.match(subdomainTagRegex);
55
55
  if (tagMatch?.[1]) return [{
56
- uri: `https://medium.com/feed/${subdomain}/tagged/${tagMatch[1]}`,
56
+ uri: `https://${subdomain}.medium.com/feed/tagged/${tagMatch[1]}`,
57
57
  hint: require_utils.composeHint("medium:tagged")
58
58
  }];
59
59
  return [{
60
- uri: `https://medium.com/feed/${subdomain}`,
60
+ uri: `https://${subdomain}.medium.com/feed`,
61
61
  hint: require_utils.composeHint("medium:publication")
62
62
  }];
63
63
  }
@@ -53,11 +53,11 @@ const mediumHandler = {
53
53
  const subdomain = lowerHostname.replace(".medium.com", "");
54
54
  const tagMatch = pathname.match(subdomainTagRegex);
55
55
  if (tagMatch?.[1]) return [{
56
- uri: `https://medium.com/feed/${subdomain}/tagged/${tagMatch[1]}`,
56
+ uri: `https://${subdomain}.medium.com/feed/tagged/${tagMatch[1]}`,
57
57
  hint: composeHint("medium:tagged")
58
58
  }];
59
59
  return [{
60
- uri: `https://medium.com/feed/${subdomain}`,
60
+ uri: `https://${subdomain}.medium.com/feed`,
61
61
  hint: composeHint("medium:publication")
62
62
  }];
63
63
  }
@@ -0,0 +1,55 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/microblog.ts
3
+ const categoryRegex = /^\/categories\/([^/]+)/;
4
+ const microblogHandler = {
5
+ match: (url) => {
6
+ return require_utils.isSubdomainOf(url, "micro.blog");
7
+ },
8
+ resolve: (url) => {
9
+ const { origin, pathname } = new URL(url);
10
+ const uris = [];
11
+ const categoryMatch = pathname.match(categoryRegex);
12
+ if (categoryMatch?.[1]) {
13
+ const category = categoryMatch[1];
14
+ uris.push({
15
+ uri: `${origin}/categories/${category}/feed.xml`,
16
+ hint: require_utils.composeHint("microblog:category-rss")
17
+ });
18
+ uris.push({
19
+ uri: `${origin}/categories/${category}/feed.json`,
20
+ hint: require_utils.composeHint("microblog:category-json")
21
+ });
22
+ }
23
+ if (pathname.startsWith("/archive")) uris.push({
24
+ uri: `${origin}/archive/index.json`,
25
+ hint: require_utils.composeHint("microblog:archive")
26
+ });
27
+ if (pathname.startsWith("/photos")) uris.push({
28
+ uri: `${origin}/photos/index.json`,
29
+ hint: require_utils.composeHint("microblog:photos")
30
+ });
31
+ if (pathname.startsWith("/replies")) uris.push({
32
+ uri: `${origin}/replies.xml`,
33
+ hint: require_utils.composeHint("microblog:replies")
34
+ });
35
+ uris.push({
36
+ uri: `${origin}/feed.xml`,
37
+ hint: require_utils.composeHint("microblog:posts-rss")
38
+ });
39
+ uris.push({
40
+ uri: `${origin}/feed.json`,
41
+ hint: require_utils.composeHint("microblog:posts-json")
42
+ });
43
+ uris.push({
44
+ uri: `${origin}/podcast.xml`,
45
+ hint: require_utils.composeHint("microblog:podcast")
46
+ });
47
+ uris.push({
48
+ uri: `${origin}/podcast.json`,
49
+ hint: require_utils.composeHint("microblog:podcast-json")
50
+ });
51
+ return uris;
52
+ }
53
+ };
54
+ //#endregion
55
+ exports.microblogHandler = microblogHandler;
@@ -0,0 +1,55 @@
1
+ import { composeHint, isSubdomainOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/microblog.ts
3
+ const categoryRegex = /^\/categories\/([^/]+)/;
4
+ const microblogHandler = {
5
+ match: (url) => {
6
+ return isSubdomainOf(url, "micro.blog");
7
+ },
8
+ resolve: (url) => {
9
+ const { origin, pathname } = new URL(url);
10
+ const uris = [];
11
+ const categoryMatch = pathname.match(categoryRegex);
12
+ if (categoryMatch?.[1]) {
13
+ const category = categoryMatch[1];
14
+ uris.push({
15
+ uri: `${origin}/categories/${category}/feed.xml`,
16
+ hint: composeHint("microblog:category-rss")
17
+ });
18
+ uris.push({
19
+ uri: `${origin}/categories/${category}/feed.json`,
20
+ hint: composeHint("microblog:category-json")
21
+ });
22
+ }
23
+ if (pathname.startsWith("/archive")) uris.push({
24
+ uri: `${origin}/archive/index.json`,
25
+ hint: composeHint("microblog:archive")
26
+ });
27
+ if (pathname.startsWith("/photos")) uris.push({
28
+ uri: `${origin}/photos/index.json`,
29
+ hint: composeHint("microblog:photos")
30
+ });
31
+ if (pathname.startsWith("/replies")) uris.push({
32
+ uri: `${origin}/replies.xml`,
33
+ hint: composeHint("microblog:replies")
34
+ });
35
+ uris.push({
36
+ uri: `${origin}/feed.xml`,
37
+ hint: composeHint("microblog:posts-rss")
38
+ });
39
+ uris.push({
40
+ uri: `${origin}/feed.json`,
41
+ hint: composeHint("microblog:posts-json")
42
+ });
43
+ uris.push({
44
+ uri: `${origin}/podcast.xml`,
45
+ hint: composeHint("microblog:podcast")
46
+ });
47
+ uris.push({
48
+ uri: `${origin}/podcast.json`,
49
+ hint: composeHint("microblog:podcast-json")
50
+ });
51
+ return uris;
52
+ }
53
+ };
54
+ //#endregion
55
+ export { microblogHandler };
@@ -0,0 +1,40 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/misskey.ts
3
+ const profileRegex = /^\/@([^/.]+)/;
4
+ const isMisskeyHtml = (content) => {
5
+ return require_utils.hasMetaContent(content, "application-name", "Misskey");
6
+ };
7
+ const misskeyHandler = {
8
+ match: (url, content) => {
9
+ try {
10
+ if (!content || !isMisskeyHtml(content)) return false;
11
+ const { pathname } = new URL(url);
12
+ return profileRegex.test(pathname);
13
+ } catch {}
14
+ return false;
15
+ },
16
+ resolve: (url) => {
17
+ try {
18
+ const { origin, pathname } = new URL(url);
19
+ const match = pathname.match(profileRegex);
20
+ if (!match?.[1]) return [];
21
+ return [
22
+ {
23
+ uri: `${origin}/@${match[1]}.atom`,
24
+ hint: require_utils.composeHint("misskey:posts-atom")
25
+ },
26
+ {
27
+ uri: `${origin}/@${match[1]}.rss`,
28
+ hint: require_utils.composeHint("misskey:posts-rss")
29
+ },
30
+ {
31
+ uri: `${origin}/@${match[1]}.json`,
32
+ hint: require_utils.composeHint("misskey:posts-json")
33
+ }
34
+ ];
35
+ } catch {}
36
+ return [];
37
+ }
38
+ };
39
+ //#endregion
40
+ exports.misskeyHandler = misskeyHandler;
@@ -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,43 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/myanimelist.ts
3
+ const hosts = ["myanimelist.net", "www.myanimelist.net"];
4
+ const userRegex = /^\/(?:profile|animelist|mangalist|history)\/([^/]+)/;
5
+ const myanimelistHandler = {
6
+ match: (url) => {
7
+ return require_utils.isHostOf(url, hosts);
8
+ },
9
+ resolve: (url) => {
10
+ const { pathname } = new URL(url);
11
+ if (pathname === "/news" || pathname.startsWith("/news/")) return [{
12
+ uri: "https://myanimelist.net/rss/news.xml",
13
+ hint: require_utils.composeHint("myanimelist:news")
14
+ }];
15
+ if (pathname === "/featured" || pathname.startsWith("/featured/")) return [{
16
+ uri: "https://myanimelist.net/rss/featured.xml",
17
+ hint: require_utils.composeHint("myanimelist:featured")
18
+ }];
19
+ const match = pathname.match(userRegex);
20
+ if (!match?.[1]) return [];
21
+ const user = match[1];
22
+ const uris = [];
23
+ uris.push({
24
+ uri: `https://myanimelist.net/rss.php?type=rw&u=${user}`,
25
+ hint: require_utils.composeHint("myanimelist:anime")
26
+ });
27
+ uris.push({
28
+ uri: `https://myanimelist.net/rss.php?type=rm&u=${user}`,
29
+ hint: require_utils.composeHint("myanimelist:manga")
30
+ });
31
+ uris.push({
32
+ uri: `https://myanimelist.net/rss.php?type=rrw&u=${user}`,
33
+ hint: require_utils.composeHint("myanimelist:recently-watched")
34
+ });
35
+ uris.push({
36
+ uri: `https://myanimelist.net/rss.php?type=rrm&u=${user}`,
37
+ hint: require_utils.composeHint("myanimelist:recently-read")
38
+ });
39
+ return uris;
40
+ }
41
+ };
42
+ //#endregion
43
+ exports.myanimelistHandler = myanimelistHandler;
@@ -0,0 +1,43 @@
1
+ import { composeHint, isHostOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/myanimelist.ts
3
+ const hosts = ["myanimelist.net", "www.myanimelist.net"];
4
+ const userRegex = /^\/(?:profile|animelist|mangalist|history)\/([^/]+)/;
5
+ const myanimelistHandler = {
6
+ match: (url) => {
7
+ return isHostOf(url, hosts);
8
+ },
9
+ resolve: (url) => {
10
+ const { pathname } = new URL(url);
11
+ if (pathname === "/news" || pathname.startsWith("/news/")) return [{
12
+ uri: "https://myanimelist.net/rss/news.xml",
13
+ hint: composeHint("myanimelist:news")
14
+ }];
15
+ if (pathname === "/featured" || pathname.startsWith("/featured/")) return [{
16
+ uri: "https://myanimelist.net/rss/featured.xml",
17
+ hint: composeHint("myanimelist:featured")
18
+ }];
19
+ const match = pathname.match(userRegex);
20
+ if (!match?.[1]) return [];
21
+ const user = match[1];
22
+ const uris = [];
23
+ uris.push({
24
+ uri: `https://myanimelist.net/rss.php?type=rw&u=${user}`,
25
+ hint: composeHint("myanimelist:anime")
26
+ });
27
+ uris.push({
28
+ uri: `https://myanimelist.net/rss.php?type=rm&u=${user}`,
29
+ hint: composeHint("myanimelist:manga")
30
+ });
31
+ uris.push({
32
+ uri: `https://myanimelist.net/rss.php?type=rrw&u=${user}`,
33
+ hint: composeHint("myanimelist:recently-watched")
34
+ });
35
+ uris.push({
36
+ uri: `https://myanimelist.net/rss.php?type=rrm&u=${user}`,
37
+ hint: composeHint("myanimelist:recently-read")
38
+ });
39
+ return uris;
40
+ }
41
+ };
42
+ //#endregion
43
+ export { myanimelistHandler };
@@ -0,0 +1,21 @@
1
+ const require_utils = require("../../../common/utils.cjs");
2
+ //#region src/feeds/platform/handlers/naverBlog.ts
3
+ const hosts = ["blog.naver.com", "m.blog.naver.com"];
4
+ const naverBlogHandler = {
5
+ match: (url) => {
6
+ return require_utils.isHostOf(url, hosts);
7
+ },
8
+ resolve: (url) => {
9
+ const { pathname } = new URL(url);
10
+ const pathSegments = pathname.split("/").filter(Boolean);
11
+ if (pathSegments.length === 0) return [];
12
+ const blogId = pathSegments[0];
13
+ if (blogId.includes(".")) return [];
14
+ return [{
15
+ uri: `https://rss.blog.naver.com/${blogId}.xml`,
16
+ hint: require_utils.composeHint("naver-blog:blog")
17
+ }];
18
+ }
19
+ };
20
+ //#endregion
21
+ exports.naverBlogHandler = naverBlogHandler;
@@ -0,0 +1,21 @@
1
+ import { composeHint, isHostOf } from "../../../common/utils.js";
2
+ //#region src/feeds/platform/handlers/naverBlog.ts
3
+ const hosts = ["blog.naver.com", "m.blog.naver.com"];
4
+ const naverBlogHandler = {
5
+ match: (url) => {
6
+ return isHostOf(url, hosts);
7
+ },
8
+ resolve: (url) => {
9
+ const { pathname } = new URL(url);
10
+ const pathSegments = pathname.split("/").filter(Boolean);
11
+ if (pathSegments.length === 0) return [];
12
+ const blogId = pathSegments[0];
13
+ if (blogId.includes(".")) return [];
14
+ return [{
15
+ uri: `https://rss.blog.naver.com/${blogId}.xml`,
16
+ hint: composeHint("naver-blog:blog")
17
+ }];
18
+ }
19
+ };
20
+ //#endregion
21
+ export { naverBlogHandler };