mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 16:36:27 +00:00
Merge branch 'feat/db' into feat/blocks-action-bar
This commit is contained in:
16
deps/db/script/dump_datoms.cljs
vendored
16
deps/db/script/dump_datoms.cljs
vendored
@@ -1,14 +1,14 @@
|
||||
(ns dump-datoms
|
||||
"An example script that dumps all eavt datoms to a specified edn file
|
||||
"A script that dumps all eavt datoms to a specified edn file
|
||||
|
||||
$ yarn -s nbb-logseq script/dump_datoms.cljs db-name datoms.edn"
|
||||
(:require [datascript.core :as d]
|
||||
[clojure.pprint :as pprint]
|
||||
[logseq.db.sqlite.cli :as sqlite-cli]
|
||||
[nbb.core :as nbb]
|
||||
["path" :as path]
|
||||
(:require ["fs" :as fs]
|
||||
["os" :as os]
|
||||
["fs" :as fs]))
|
||||
["path" :as path]
|
||||
[clojure.pprint :as pprint]
|
||||
[datascript.core :as d]
|
||||
[logseq.db.sqlite.cli :as sqlite-cli]
|
||||
[nbb.core :as nbb]))
|
||||
|
||||
(defn read-graph
|
||||
"The db graph bare version of gp-cli/parse-graph"
|
||||
@@ -28,5 +28,5 @@
|
||||
(println "Writing" (count datoms) "datoms to" file)
|
||||
(fs/writeFileSync file (with-out-str (pprint/pprint datoms)))))
|
||||
|
||||
(when (= nbb/*file* (:file (meta #'-main)))
|
||||
(when (= nbb/*file* (nbb/invoked-file))
|
||||
(-main *command-line-args*))
|
||||
Reference in New Issue
Block a user