|
2 | 2 | "Export data" |
3 | 3 | (:require [datascript.core :as d] |
4 | 4 | [logseq.cli.common.file :as common-file] |
| 5 | + [logseq.common.util :as common-util] |
5 | 6 | [logseq.db :as ldb] |
6 | 7 | [logseq.graph-parser.property :as gp-property] |
7 | 8 | [logseq.outliner.tree :as otree])) |
|
47 | 48 | (defn get-debug-datoms |
48 | 49 | [conn] |
49 | 50 | (some->> (d/datoms @conn :eavt) |
50 | | - (map (fn [{:keys [e a v t]}] |
51 | | - (cond |
52 | | - (= :url (:logseq.property/type (d/entity @conn a))) |
53 | | - (d/datom e a "https://logseq.com" t) |
| 51 | + (keep (fn [{:keys [e a v t]}] |
| 52 | + (cond |
| 53 | + (and (= a :block/title) (common-util/url? v)) |
| 54 | + (d/datom e a "https://logseq.com/debug" t) |
54 | 55 |
|
55 | | - (and (contains? #{:block/title :block/name} a) |
56 | | - (let [entity (d/entity @conn e)] |
57 | | - (and (not (:db/ident entity)) |
58 | | - (not (ldb/journal? entity)) |
59 | | - (not (:logseq.property/built-in? entity)) |
60 | | - (not (= :logseq.property/query (:db/ident (:logseq.property/created-from-property entity))))))) |
61 | | - (d/datom e a (str "debug " e) t) |
| 56 | + (and (contains? #{:block/title :block/name} a) |
| 57 | + (let [entity (d/entity @conn e)] |
| 58 | + (and (not (:db/ident entity)) |
| 59 | + (not (ldb/journal? entity)) |
| 60 | + (not (:logseq.property/built-in? entity)) |
| 61 | + (not (= :logseq.property/query (:db/ident (:logseq.property/created-from-property entity))))))) |
| 62 | + (d/datom e a (str "debug " e) t) |
62 | 63 |
|
63 | | - :else |
64 | | - (d/datom e a v t)))))) |
| 64 | + :else |
| 65 | + (d/datom e a v t)))))) |
0 commit comments