get image saving / uploading working

This commit is contained in:
Travis Shears 2025-07-22 18:00:14 +02:00
parent fd146d622b
commit a695f791c4
4 changed files with 56 additions and 9 deletions

View file

@ -94,7 +94,7 @@
(defn extract-images [post]
(let [images (get-in post [:embed :images] [])]
(map #(hash-map :url (:fullsize %) :alt (:alt %)) images)))
(map #(vector (:fullsize %) (:alt %)) images)))
(defn run []
(let [session (create-session)
@ -106,5 +106,6 @@
:remoteId (:cid %)
:authorId (get-in % [:author :handle])
:tags (extract-tags %)
:images (extract-images %)
:posted (get-in % [:record :createdAt])))
(map pb/save-post))))