diff options
| author | eltrac <hi@eltr.ac> | 2026-10-29 12:42:50 +0100 |
|---|---|---|
| committer | Eltrac <codeberg@eltr.ac> | 2026-10-29 12:42:50 +0100 |
| commit | 573e5f513387ebd34ad9df4b7fe4dc83d7323c8d (patch) | |
| tree | 70e60433aab15f65f19a90a44aa15b7ca3242273 /test/resources | |
| parent | 77ab58d1ed5686b3c1c1685a6cc0bdd68603ab93 (diff) | |
all: use JF2 as a single source of truth, compile microformats/JSON-LD/<meta> to JF2 (#80)
closes #75
This is a large squash commit. For details, see https://codeberg.org/eltrac/weepinbell/pulls/80
Diffstat (limited to 'test/resources')
| -rw-r--r-- | test/resources/webmention-jf2-test.edn | 17 | ||||
| -rw-r--r-- | test/resources/webmention-test.edn | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/test/resources/webmention-jf2-test.edn b/test/resources/webmention-jf2-test.edn new file mode 100644 index 0000000..5ec6a0d --- /dev/null +++ b/test/resources/webmention-jf2-test.edn @@ -0,0 +1,17 @@ +{:webmention {:source "https://alice.example/posts/hello", :target "https://example.com/blog/first-post", :id "0a1b2c3d4e5f60718293a4b5c6d7e8f9", :modified 1700000000000}}
+{:webmention {:source "https://bob.example/notes/re-first-post", :target "https://example.com/blog/first-post", :id "1b2c3d4e5f60718293a4b5c6d7e8f90a", :modified 1700000100000}, :jf2 {:type "entry", :name "Re: first post", :url nil, :published "2023-11-14T22:13:20+00:00", :author {:type "card", :name "Bob", :url "https://bob.example"}, :content {:html "Really enjoyed <em>this</em>.", :text "Really enjoyed this."}, :wm-property :mention}}
+{:webmention {:source "https://carol.example/likes/first-post", :target "https://example.com/blog/first-post", :id "2c3d4e5f60718293a4b5c6d7e8f90a1b", :modified 1700000200000}, :extra {:proxied-photo "http://localhost:3000/avatars/9f8e7d6c5b4a39281706f5e4d3c2b1a0.png"}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name "Carol", :url "https://carol.example", :photo "https://carol.example/avatar.png"}, :like-of ["https://example.com/blog/first-post"], :wm-property :like-of}}
+{:webmention {:source "https://dan.example/reposts", :target "https://example.com/blog/first-post", :id "3d4e5f60718293a4b5c6d7e8f90a1b2c", :modified 1700000300000}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name "Dan", :url "https://dan.example"}, :repost-of ["https://example.com/blog/first-post"], :wm-property :repost-of}}
+{:webmention {:source "https://erin.example/replies/42", :target "https://example.com/blog/second-post", :id "4e5f60718293a4b5c6d7e8f90a1b2c3d", :modified 1700000400000}, :extra {:proxied-photo "http://localhost:3000/avatars/0123456789abcdef0123456789abcdef.jpg"}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name "Erin", :url "https://erin.example", :photo "https://erin.example/media/erin.jpg"}, :content {:text "I disagree, but interesting take."}, :in-reply-to ["https://example.com/blog/second-post"], :wm-property :in-reply-to}}
+{:webmention {:source "https://frank.example/events/attend", :target "https://example.com/events/meetup-2024", :id "5f60718293a4b5c6d7e8f90a1b2c3d4e", :modified 1700000500000}, :jf2 {:type "entry", :name "I will be there", :url nil, :published nil, :author {:type "card", :name "Frank", :url nil}, :rsvp ["yes"], :wm-property :rsvp}}
+{:webmention {:source "https://grace.example/blog/a-link", :target "https://example.com/blog/post-a", :id "60718293a4b5c6d7e8f90a1b2c3d4e5f", :modified 1700000600000}, :jf2 {:type "entry", :name "A link worth sharing", :url nil, :published nil, :author {:type "card", :name "Grace", :url "https://grace.example"}, :wm-property :mention}}
+{:webmention {:source "https://heidi.example/blog/another-link", :target "https://example.com/blog/post-b", :id "718293a4b5c6d7e8f90a1b2c3d4e5f60", :modified 1700000700000}, :jf2 {:type "entry", :name "Also worth sharing", :url nil, :published nil, :author {:type "card", :name "Heidi", :url "https://heidi.example"}, :wm-property :mention}}
+{:webmention {:source "https://ivan.example/about", :target "https://example.com/blog/post-a", :id "8293a4b5c6d7e8f90a1b2c3d4e5f6071", :modified 1700000800000}, :extra {:proxied-photo "http://localhost:3000/avatars/fedcba9876543210fedcba9876543210.webp"}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name "Ivan", :url "https://ivan.example", :photo "https://ivan.example/photo.webp"}, :wm-property :mention}}
+{:webmention {:source "https://judy.example/empty", :target "https://example.com/blog/post-b", :id "93a4b5c6d7e8f90a1b2c3d4e5f607182", :modified 1700000900000}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name nil, :url nil}, :wm-property :mention}}
+{:webmention {:source "https://karl.example/notes/nested", :target "https://example.com/blog/post-c", :id "a4b5c6d7e8f90a1b2c3d4e5f60718293", :modified 1700001000000}, :jf2 {:type "entry", :name "Nested children", :url nil, :published nil, :author {:type "card", :name "Karl", :url nil}, :wm-property :mention}}
+{:webmention {:source "https://laura.example/feed", :target "https://example.com/blog/post-c", :id "b5c6d7e8f90a1b2c3d4e5f60718293a4", :modified 1700001100000}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name "Laura", :url nil}, :like-of ["https://example.com/blog/post-c/"], :wm-property :like-of}}
+{:webmention {:source "https://mallory.example/posts/trailing", :target "https://example.com/blog/post-d/?ref=reader", :id "c6d7e8f90a1b2c3d4e5f60718293a4b5", :modified 1700001200000}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name nil, :url nil}, :content {:text "Citation with trailing slash weblog."}, :in-reply-to ["https://example.com/blog/post-d"], :wm-property :in-reply-to}}
+{:webmention {:source "https://niaj.example/mentions/no-mf", :target "https://example.com/blog/post-d/", :id "d7e8f90a1b2c3d4e5f60718293a4b5c6", :modified 1700001300000}, :extra {:proxied-photo "http://localhost:3000/avatars/mnopqrstuvwxyz0123456789abcdef01.png"}}
+{:webmention {:source "https://olivia.example/notes/older-id", :target "https://example.com/blog/first-post", :id "e8f90a1b2c3d4e5f60718293a4b5c6d7", :modified 1699999999000}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name "Olivia", :url "https://olivia.example"}, :like-of ["https://example.com/blog/first-post"], :wm-property :like-of}}
+{:webmention {:source "https://peggy.example/legacy-hash", :target "https://example.org/notes/legacy", :id "deadbeef", :modified 1699999998000}, :jf2 {:type "entry", :name nil, :url nil, :published nil, :author {:type "card", :name nil, :url nil}, :repost-of ["https://example.org/notes/legacy"], :wm-property :repost-of}}
+{:webmention {:source "https://quinn.example/posts/long-id", :target "https://example.org/notes/legacy", :id "1234567890abcdef1234567890abcdef", :modified 1699999997000}}
diff --git a/test/resources/webmention-test.edn b/test/resources/webmention-test.edn new file mode 100644 index 0000000..e655daf --- /dev/null +++ b/test/resources/webmention-test.edn @@ -0,0 +1,17 @@ +{:webmention {:source "https://alice.example/posts/hello" :target "https://example.com/blog/first-post" :id "0a1b2c3d4e5f60718293a4b5c6d7e8f9" :modified 1700000000000}} +{:webmention {:source "https://bob.example/notes/re-first-post" :target "https://example.com/blog/first-post" :id "1b2c3d4e5f60718293a4b5c6d7e8f90a" :modified 1700000100000} :microformats [{:type ["h-entry"] :properties {:name ["Re: first post"] :content [{:value "Really enjoyed this." :html "Really enjoyed <em>this</em>."}] :author [{:type ["h-card"] :properties {:name ["Bob"] :url ["https://bob.example"]}}] :published ["2023-11-14T22:13:20+00:00"]}}]} +{:webmention {:source "https://carol.example/likes/first-post" :target "https://example.com/blog/first-post" :id "2c3d4e5f60718293a4b5c6d7e8f90a1b" :modified 1700000200000} :microformats [{:type ["h-entry"] :properties {:like-of ["https://example.com/blog/first-post"] :author [{:type ["h-card"] :properties {:name ["Carol"] :photo ["https://carol.example/avatar.png"] :url ["https://carol.example"]}}]}}] :extra {:proxied-photo "http://localhost:3000/avatars/9f8e7d6c5b4a39281706f5e4d3c2b1a0.png"}} +{:webmention {:source "https://dan.example/reposts" :target "https://example.com/blog/first-post" :id "3d4e5f60718293a4b5c6d7e8f90a1b2c" :modified 1700000300000} :microformats [{:type ["h-entry"] :properties {:repost-of ["https://example.com/blog/first-post"] :author [{:type ["h-card"] :properties {:name ["Dan"] :url ["https://dan.example"]}}]}}]} +{:webmention {:source "https://erin.example/replies/42" :target "https://example.com/blog/second-post" :id "4e5f60718293a4b5c6d7e8f90a1b2c3d" :modified 1700000400000} :microformats [{:type ["h-entry"] :properties {:in-reply-to ["https://example.com/blog/second-post"] :content [{:value "I disagree, but interesting take."}] :author [{:type ["h-card"] :properties {:name ["Erin"] :photo [{:value "https://erin.example/media/erin.jpg" :alt "Erin"} ] :url ["https://erin.example"]}}]}}] :extra {:proxied-photo "http://localhost:3000/avatars/0123456789abcdef0123456789abcdef.jpg"}} +{:webmention {:source "https://frank.example/events/attend" :target "https://example.com/events/meetup-2024" :id "5f60718293a4b5c6d7e8f90a1b2c3d4e" :modified 1700000500000} :microformats [{:type ["h-entry"] :properties {:rsvp ["yes"] :name ["I will be there"] :author [{:type ["h-card"] :properties {:name ["Frank"]}}]}}]} +{:webmention {:source "https://grace.example/blog/a-link" :target "https://example.com/blog/post-a" :id "60718293a4b5c6d7e8f90a1b2c3d4e5f" :modified 1700000600000} :microformats [{:type ["h-entry"] :properties {:name ["A link worth sharing"] :author [{:type ["h-card"] :properties {:name ["Grace"] :url ["https://grace.example"]}}]}}]} +{:webmention {:source "https://heidi.example/blog/another-link" :target "https://example.com/blog/post-b" :id "718293a4b5c6d7e8f90a1b2c3d4e5f60" :modified 1700000700000} :microformats [{:type ["h-entry"] :properties {:name ["Also worth sharing"] :author [{:type ["h-card"] :properties {:name ["Heidi"] :url ["https://heidi.example"]}}]}}]} +{:webmention {:source "https://ivan.example/about" :target "https://example.com/blog/post-a" :id "8293a4b5c6d7e8f90a1b2c3d4e5f6071" :modified 1700000800000} :microformats [{:type ["h-card"] :properties {:name ["Ivan"] :url ["https://ivan.example"] :photo ["https://ivan.example/photo.webp"]}}] :extra {:proxied-photo "http://localhost:3000/avatars/fedcba9876543210fedcba9876543210.webp"}} +{:webmention {:source "https://judy.example/empty" :target "https://example.com/blog/post-b" :id "93a4b5c6d7e8f90a1b2c3d4e5f607182" :modified 1700000900000} :microformats []} +{:webmention {:source "https://karl.example/notes/nested" :target "https://example.com/blog/post-c" :id "a4b5c6d7e8f90a1b2c3d4e5f60718293" :modified 1700001000000} :microformats [{:type ["h-entry"] :properties {:name ["Nested children"] :author [{:type ["h-card"] :properties {:name ["Karl"]}}]} :children [{:type ["h-cite"] :properties {:name ["Cited work"] :url ["https://somewhere.example/paper"]}}]}]} +{:webmention {:source "https://laura.example/feed" :target "https://example.com/blog/post-c" :id "b5c6d7e8f90a1b2c3d4e5f60718293a4" :modified 1700001100000} :microformats [{:type ["h-feed"] :properties {:name ["Laura's feed"]} :children [{:type ["h-entry"] :properties {:like-of ["https://example.com/blog/post-c/"] :author [{:type "h-card" :properties {:name ["Laura"]}}]}}]}]} +{:webmention {:source "https://mallory.example/posts/trailing" :target "https://example.com/blog/post-d/?ref=reader" :id "c6d7e8f90a1b2c3d4e5f60718293a4b5" :modified 1700001200000} :microformats [{:type ["h-entry"] :properties {:in-reply-to ["https://example.com/blog/post-d"] :content [{:value "Citation with trailing slash weblog."}]}}]} +{:webmention {:source "https://niaj.example/mentions/no-mf" :target "https://example.com/blog/post-d/" :id "d7e8f90a1b2c3d4e5f60718293a4b5c6" :modified 1700001300000} :extra {:proxied-photo "http://localhost:3000/avatars/mnopqrstuvwxyz0123456789abcdef01.png"}} +{:webmention {:source "https://olivia.example/notes/older-id" :target "https://example.com/blog/first-post" :id "e8f90a1b2c3d4e5f60718293a4b5c6d7" :modified 1699999999000} :microformats [{:type ["h-entry"] :properties {:like-of ["https://example.com/blog/first-post"] :author [{:type ["h-card"] :properties {:name ["Olivia"] :url ["https://olivia.example"]}}]} :children []}]} +{:webmention {:source "https://peggy.example/legacy-hash" :target "https://example.org/notes/legacy" :id "deadbeef" :modified 1699999998000} :microformats [{:type ["h-entry"] :properties {:repost-of ["https://example.org/notes/legacy"]}}]} +{:webmention {:source "https://quinn.example/posts/long-id" :target "https://example.org/notes/legacy" :id "1234567890abcdef1234567890abcdef" :modified 1699999997000}} |
