mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
feat: export both SQLite db and assets
This commit is contained in:
@@ -209,3 +209,12 @@
|
||||
(.then (fn [buf] (js/crypto.subtle.digest "SHA-256" buf)))
|
||||
(.then (fn [dig] (js/Uint8Array. dig)))
|
||||
(.then decode-digest)))
|
||||
|
||||
(defn <get-all-assets
|
||||
[]
|
||||
(when-let [path (config/get-current-repo-assets-root)]
|
||||
(p/let [result (fs/readdir path {:path-only? true})]
|
||||
(p/all (map (fn [path]
|
||||
(p/let [data (fs/read-file path "" {})]
|
||||
(let [path' (util/node-path.join "assets" (util/node-path.basename path))]
|
||||
[path' data]))) result)))))
|
||||
|
||||
Reference in New Issue
Block a user