wallabag annotations are now a flat vector
This commit is contained in:
parent
32a7a6750f
commit
40eec17e1a
|
@ -52,10 +52,17 @@
|
|||
(let [useful-keys [:tags :title :url :annotations :id]]
|
||||
(mapv #(select-keys % useful-keys) entries)))
|
||||
|
||||
(defn flatten-annotation
|
||||
[annotations]
|
||||
(-> (mapv #(flatten (seq %)) annotations)
|
||||
(flatten)
|
||||
(->> (filter #(not (keyword? %))))))
|
||||
|
||||
(defn select-useful-annotation-keys
|
||||
[entry]
|
||||
(let [only-useful-annotations (mapv #(select-keys % [:quote]) (get entry :annotations))]
|
||||
(assoc entry :annotations only-useful-annotations)))
|
||||
(let [only-useful-annotations (mapv #(select-keys % [:quote]) (get entry :annotations))
|
||||
flattened-annotations (flatten-annotation only-useful-annotations)]
|
||||
(assoc entry :annotations flattened-annotations)))
|
||||
|
||||
(defn map-useful-annotation-keys
|
||||
[entries]
|
||||
|
|
Loading…
Reference in a new issue