Initial import of LogDarioSeq baseline
Establishes version control for the personal Logseq DB fork before starting the server-client architecture migration and domain features described in docs/agent-guide and the approved implementation plan. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
171
deps/graph-parser/test/logseq/graph_parser/block_test.cljs
vendored
Normal file
171
deps/graph-parser/test/logseq/graph_parser/block_test.cljs
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
(ns logseq.graph-parser.block-test
|
||||
(:require [cljs.test :refer [deftest are testing is]]
|
||||
[datascript.core :as d]
|
||||
[logseq.common.uuid :as common-uuid]
|
||||
[logseq.db.test.helper :as db-test]
|
||||
[logseq.graph-parser.block :as gp-block]
|
||||
[logseq.graph-parser.mldoc :as gp-mldoc]))
|
||||
|
||||
(defn- extract-properties
|
||||
[properties user-config]
|
||||
(gp-block/extract-properties
|
||||
(map
|
||||
(fn [[k v]]
|
||||
(let [mldoc-ast (gp-mldoc/get-references v (gp-mldoc/default-config :markdown))]
|
||||
[k v mldoc-ast]))
|
||||
properties)
|
||||
user-config))
|
||||
|
||||
(deftest test-fix-duplicate-id
|
||||
(are [x y]
|
||||
(let [result (gp-block/fix-duplicate-id (gp-block/block-keywordize x))]
|
||||
(and (:block/uuid result)
|
||||
(not= (:uuid x) (:block/uuid result))
|
||||
(= (select-keys result
|
||||
[:block/properties :block/title :block/properties-text-values :block/properties-order]) (gp-block/block-keywordize y))))
|
||||
{:properties {:id "63f199bc-c737-459f-983d-84acfcda14fe"}, :tags [], :format :markdown, :meta {:start_pos 51, :end_pos 101}, :macros [], :title "bar\nid:: 63f199bc-c737-459f-983d-84acfcda14fe", :properties-text-values {:id "63f199bc-c737-459f-983d-84acfcda14fe"}, :level 1, :uuid #uuid "63f199bc-c737-459f-983d-84acfcda14fe", :properties-order [:id]}
|
||||
{:properties {},
|
||||
:title "bar",
|
||||
:properties-text-values {},
|
||||
:properties-order []}
|
||||
|
||||
{:properties {:id "63f199bc-c737-459f-983d-84acfcda14fe"}, :tags [], :format :org, :meta {:start_pos 51, :end_pos 101}, :macros [], :title "bar\n:id: 63f199bc-c737-459f-983d-84acfcda14fe", :properties-text-values {:id "63f199bc-c737-459f-983d-84acfcda14fe"}, :level 1, :uuid #uuid "63f199bc-c737-459f-983d-84acfcda14fe", :properties-order [:id]}
|
||||
{:properties {},
|
||||
:title "bar",
|
||||
:properties-text-values {},
|
||||
:properties-order []}
|
||||
|
||||
{:properties {:id "63f199bc-c737-459f-983d-84acfcda14fe"}, :tags [], :format :markdown, :meta {:start_pos 51, :end_pos 101}, :macros [], :title "bar\n \n id:: 63f199bc-c737-459f-983d-84acfcda14fe\nblock body", :properties-text-values {:id "63f199bc-c737-459f-983d-84acfcda14fe"}, :level 1, :uuid #uuid "63f199bc-c737-459f-983d-84acfcda14fe", :properties-order [:id]}
|
||||
{:properties {},
|
||||
:title "bar\nblock body",
|
||||
:properties-text-values {},
|
||||
:properties-order []}))
|
||||
|
||||
(deftest test-extract-properties
|
||||
(are [x y] (= (:properties (extract-properties x {})) y)
|
||||
;; Built-in properties
|
||||
[["background-color" "#000000"]] {:background-color "#000000"}
|
||||
[["alias" "[[name/with space]]"]] {:alias #{"name/with space"}}
|
||||
[["tags" "[[foo]], [[bar]]"]] {:tags #{"foo" "bar"}}
|
||||
[["tags" "[[foo]] [[bar]]"]] {:tags #{"foo" "bar"}}
|
||||
[["tags" "bar"]] {:tags #{"bar"}}
|
||||
[["file-path" "file:///home/x, y.pdf"]] {:file-path "file:///home/x, y.pdf"}
|
||||
|
||||
;; User properties
|
||||
[["year" "1000"]] {:year 1000}
|
||||
[["year" "\"1000\""]] {:year "\"1000\""}
|
||||
[["year" "1000"] ["alias" "[[name/with space]]"]] {:year 1000, :alias #{"name/with space"}}
|
||||
[["year" "1000"] ["tags" "[[name/with space]]"]] {:year 1000, :tags #{"name/with space"}}
|
||||
[["year" "1000"] ["tags" "[[name/with space]], [[another]]"]] {:year 1000, :tags #{"name/with space" "another"}}
|
||||
[["year" "1000"] ["alias" "[[name/with space]], [[another]]"]] {:year 1000, :alias #{"name/with space" "another"}}
|
||||
[["year" "1000"] ["alias" "[[name/with space]], [[another [[nested]]]]"]] {:year 1000, :alias #{"name/with space" "another [[nested]]"}}
|
||||
[["year" "1000"] ["alias" "[[name/with space]], [[[[nested]] another]]"]] {:year 1000, :alias #{"name/with space" "[[nested]] another"}}
|
||||
[["foo" "bar"]] {:foo "bar"}
|
||||
[["foo" "[[bar]], [[baz]]"]] {:foo #{"bar" "baz"}}
|
||||
[["foo" "[[bar]], [[baz]]"]] {:foo #{"bar" "baz"}}
|
||||
[["foo" "[[bar]], [[baz]]"]] {:foo #{"bar" "baz"}}
|
||||
[["foo" "[[bar]], [[nested [[baz]]]]"]] {:foo #{"bar" "nested [[baz]]"}}
|
||||
[["foo" "[[bar]], [[nested [[baz]]]]"]] {:foo #{"bar" "nested [[baz]]"}}
|
||||
[["foo" "[[bar]], [[baz, test]]"]] {:foo #{"bar" "baz, test"}}
|
||||
[["foo" "[[bar]], [[baz, test, [[nested]]]]"]] {:foo #{"bar" "baz, test, [[nested]]"}})
|
||||
|
||||
(testing "page-refs"
|
||||
(are [x y] (= (vec (:page-refs
|
||||
(extract-properties x {:property-pages/enabled? true}))) y)
|
||||
[["year" "1000"]] ["year"]
|
||||
[["year" "\"1000\""]] ["year"]
|
||||
[["year" "1000"] ["month" "12"]] ["year" "month"]
|
||||
[["foo" "[[bar]] test"]] ["bar" "foo"]
|
||||
[["foo" "[[bar]] test [[baz]]"]] ["bar" "baz" "foo"]
|
||||
[["foo" "[[bar]] test [[baz]] [[nested [[baz]]]]"]] ["bar" "baz" "nested [[baz]]" "foo"]
|
||||
[["foo" "#bar, #baz"]] ["bar" "baz" "foo"]
|
||||
[["foo" "[[nested [[page]]]], test"]] ["nested [[page]]" "foo"])
|
||||
|
||||
(are [x y] (= (vec (:page-refs
|
||||
(extract-properties x {:property-pages/enabled? false}))) y)
|
||||
[["year" "1000"]] []
|
||||
[["year" "1000"] ["month" "12"]] []
|
||||
[["foo" "[[bar]] test"]] ["bar"])
|
||||
|
||||
(is (= ["year"]
|
||||
(:page-refs
|
||||
(extract-properties [["year" "1000"] ["month" "12"]]
|
||||
{:property-pages/enabled? true
|
||||
:property-pages/excludelist #{:month :day}})))
|
||||
":property-pages/exclude-list excludes specified properties")
|
||||
|
||||
(is (= ["year"]
|
||||
(:page-refs
|
||||
(extract-properties [["year" "1000"]]
|
||||
{})))
|
||||
"Default to enabled when :property-pages/enabled? is not in config")
|
||||
|
||||
(is (= ["foo" "bar" "tags"]
|
||||
(:page-refs
|
||||
(extract-properties
|
||||
;; tags is linkable and background-color is not
|
||||
[["tags" "[[foo]], [[bar]]"] ["background-color" "#008000"]]
|
||||
{:property-pages/enabled? true})))
|
||||
"Only editable linkable built-in properties have page-refs in property values")))
|
||||
|
||||
(deftest test-page-name-map-namespace-for-slash-journals
|
||||
(testing "slash-formatted journals do not keep namespace metadata"
|
||||
(let [journal (gp-block/page-name->map "2026/05/18" nil false "yyyy/MM/dd")]
|
||||
(is (= 20260518 (:block/journal-day journal)))
|
||||
(is (= "2026/05/18" (:block/title journal)))
|
||||
(is (= "may 18th, 2026" (:block/name journal)))
|
||||
(is (= (common-uuid/gen-uuid :journal-page-uuid 20260518)
|
||||
(:block/uuid journal)))
|
||||
(is (nil? (:block/namespace journal)))))
|
||||
(testing "non-journal slash pages keep namespace metadata"
|
||||
(is (= {:block/name "project"}
|
||||
(:block/namespace (gp-block/page-name->map "project/child" nil false "yyyy/MM/dd"))))))
|
||||
|
||||
(deftest existing-journal-reference-reuses-stored-identity-test
|
||||
(testing "a legacy journal name is not rewritten while parsing a reference"
|
||||
(let [conn (db-test/create-conn-with-blocks
|
||||
{:pages-and-blocks [{:page {:build/journal 20260727}}]})
|
||||
journal (db-test/find-journal-by-journal-day @conn 20260727)
|
||||
journal-uuid (:block/uuid journal)]
|
||||
(d/transact! conn [[:db/add :logseq.class/Journal
|
||||
:logseq.property.journal/title-format "yyyy-MM-dd"]
|
||||
{:db/id (:db/id journal)
|
||||
:block/title "2026-07-27"
|
||||
:block/name "2026-07-27"}])
|
||||
(let [reference (gp-block/page-name->map "2026-07-27" @conn false "yyyy-MM-dd")]
|
||||
(is (= {:block/uuid journal-uuid
|
||||
:block/title "2026-07-27"
|
||||
:block/name "2026-07-27"
|
||||
:block/journal-day 20260727}
|
||||
(select-keys reference
|
||||
[:block/uuid :block/title :block/name :block/journal-day]))))))
|
||||
|
||||
(testing "an existing journal is found by day after the configured format changes"
|
||||
(let [conn (db-test/create-conn-with-blocks
|
||||
{:pages-and-blocks [{:page {:build/journal 20260727}}]})
|
||||
journal (db-test/find-journal-by-journal-day @conn 20260727)
|
||||
journal-uuid (:block/uuid journal)]
|
||||
(d/transact! conn [[:db/add :logseq.class/Journal
|
||||
:logseq.property.journal/title-format "yyyy-MM-dd"]
|
||||
{:db/id (:db/id journal)
|
||||
:block/title "2026-07-27"
|
||||
:block/name "2026-07-27"}])
|
||||
(d/transact! conn [[:db/add :logseq.class/Journal
|
||||
:logseq.property.journal/title-format "dd/MM/yyyy"]])
|
||||
(let [reference (gp-block/page-name->map "27/07/2026" @conn false "dd/MM/yyyy")]
|
||||
(is (= {:block/uuid journal-uuid
|
||||
:block/title "2026-07-27"
|
||||
:block/name "2026-07-27"
|
||||
:block/journal-day 20260727}
|
||||
(select-keys reference
|
||||
[:block/uuid :block/title :block/name :block/journal-day])))))))
|
||||
|
||||
(defn find-block-for-content
|
||||
[db content]
|
||||
(->> (d/q '[:find (pull ?b [* {:block/refs [:block/uuid]}])
|
||||
:in $ ?content
|
||||
:where [?b :block/title ?content]]
|
||||
db
|
||||
content)
|
||||
(map first)
|
||||
first))
|
||||
2484
deps/graph-parser/test/logseq/graph_parser/exporter_test.cljs
vendored
Normal file
2484
deps/graph-parser/test/logseq/graph_parser/exporter_test.cljs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
131
deps/graph-parser/test/logseq/graph_parser/extract_test.cljs
vendored
Normal file
131
deps/graph-parser/test/logseq/graph_parser/extract_test.cljs
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
(ns logseq.graph-parser.extract-test
|
||||
(:require [cljs.test :refer [deftest is are]]
|
||||
[datascript.core :as d]
|
||||
[logseq.graph-parser.extract :as extract]))
|
||||
|
||||
;; This is a copy of frontend.components.repo/multiplatform-reserved-chars for reserved chars testing
|
||||
(def multiplatform-reserved-chars ":\\*\\?\"<>|\\#\\\\")
|
||||
|
||||
;; Stuffs should be parsable (don't crash) when users dump some random files
|
||||
(deftest page-name-parsing-tests
|
||||
(is (string? (#'extract/tri-lb-title-parsing "___-_-_-_---___----")))
|
||||
(is (string? (#'extract/tri-lb-title-parsing "_____///____---___----")))
|
||||
(is (string? (#'extract/tri-lb-title-parsing "/_/////---/_----")))
|
||||
(is (string? (#'extract/tri-lb-title-parsing "/\\#*%lasdf\\//__--dsll_____----....-._0x2B")))
|
||||
(is (string? (#'extract/tri-lb-title-parsing "/\\#*%l;;&&;&\\//__--dsll_____----....-._0x2B")))
|
||||
(is (string? (#'extract/tri-lb-title-parsing multiplatform-reserved-chars)))
|
||||
(is (string? (#'extract/tri-lb-title-parsing "dsa&;l dsalfjk jkl"))))
|
||||
|
||||
(deftest uri-decoding-tests
|
||||
(is (= (#'extract/safe-url-decode "%*-sd%%%saf%=lks") "%*-sd%%%saf%=lks")) ;; Contains %, but invalid
|
||||
(is (= (#'extract/safe-url-decode "%2FDownloads%2FCNN%3AIs%5CAll%3AYou%20Need.pdf") "/Downloads/CNN:Is\\All:You Need.pdf"))
|
||||
(is (= (#'extract/safe-url-decode "asldkflksdaf啦放假啦睡觉啦啊啥的都撒娇浪费;dla") "asldkflksdaf啦放假啦睡觉啦啊啥的都撒娇浪费;dla")))
|
||||
|
||||
(deftest page-name-sanitization-backward-tests
|
||||
(is (= "abc.def.ghi.jkl" (#'extract/tri-lb-title-parsing "abc.def.ghi.jkl")))
|
||||
(is (= "abc/def/ghi/jkl" (#'extract/tri-lb-title-parsing "abc%2Fdef%2Fghi%2Fjkl")))
|
||||
(is (= "abc%/def/ghi/jkl" (#'extract/tri-lb-title-parsing "abc%25%2Fdef%2Fghi%2Fjkl")))
|
||||
(is (= "abc%2——ef/ghi/jkl" (#'extract/tri-lb-title-parsing "abc%2——ef%2Fghi%2Fjkl")))
|
||||
(is (= "abc&2Fghi/jkl" (#'extract/tri-lb-title-parsing "abc&2Fghi%2Fjkl")))
|
||||
(is (= "abc<2Fghi/jkl" (#'extract/tri-lb-title-parsing "abc<2Fghi%2Fjkl")))
|
||||
(is (= "abc%2Fghi/jkl" (#'extract/tri-lb-title-parsing "abc%2Fghi%2Fjkl")))
|
||||
(is (= "abc;&;2Fghi/jkl" (#'extract/tri-lb-title-parsing "abc;&;2Fghi%2Fjkl")))
|
||||
;; happens when importing some compatible files on *nix / macOS
|
||||
(is (= multiplatform-reserved-chars (#'extract/tri-lb-title-parsing multiplatform-reserved-chars))))
|
||||
|
||||
(deftest path-utils-tests
|
||||
(is (= "asldk lakls " (#'extract/path->file-body "/data/app/asldk lakls .lsad")))
|
||||
(is (= "asldk lakls " (#'extract/path->file-body "asldk lakls .lsad")))
|
||||
(is (= "asldk lakls" (#'extract/path->file-body "asldk lakls")))
|
||||
(is (= "asldk lakls" (#'extract/path->file-body "/data/app/asldk lakls")))
|
||||
(is (= "asldk lakls" (#'extract/path->file-body "file://data/app/asldk lakls.as")))
|
||||
(is (= "中文asldk lakls" (#'extract/path->file-body "file://中文data/app/中文asldk lakls.as"))))
|
||||
|
||||
;; Bare minimum schema to test extract
|
||||
(def file-schema
|
||||
{:block/uuid {:db/unique :db.unique/identity}
|
||||
:block/name {:db/unique :db.unique/identity}})
|
||||
|
||||
(defn- extract [file content & [options]]
|
||||
(extract/extract file
|
||||
content
|
||||
(merge {:block-pattern "-" :db (d/empty-db file-schema)
|
||||
:verbose false}
|
||||
options)))
|
||||
|
||||
(defn- extract-block-content
|
||||
[text]
|
||||
(let [{:keys [blocks]} (extract "a.md" text)]
|
||||
(mapv :block/title blocks)))
|
||||
|
||||
(defn- extract-title [file text]
|
||||
(-> (extract file text) :pages first :block/properties :title))
|
||||
|
||||
(deftest extract-blocks-for-headings
|
||||
(is (= ["a" "b" "c"]
|
||||
(extract-block-content
|
||||
"- a
|
||||
- b
|
||||
- c")))
|
||||
|
||||
(is (= ["## hello" "world" "nice" "nice" "bingo" "world"]
|
||||
(extract-block-content "## hello
|
||||
- world
|
||||
- nice
|
||||
- nice
|
||||
- bingo
|
||||
- world")))
|
||||
|
||||
(is (= ["# a" "## b" "### c" "#### d" "### e" "f" "g" "h" "i" "j"]
|
||||
(extract-block-content "# a
|
||||
## b
|
||||
### c
|
||||
#### d
|
||||
### e
|
||||
- f
|
||||
- g
|
||||
- h
|
||||
- i
|
||||
- j"))))
|
||||
|
||||
(deftest parse-page-title
|
||||
(is (= nil
|
||||
(extract-title "foo.org" "")))
|
||||
(is (= "Howdy"
|
||||
(extract-title "foo.org" "#+title: Howdy")))
|
||||
(is (= "Howdy"
|
||||
(extract-title "foo.org" "#+TITLE: Howdy")))
|
||||
(is (= "Howdy"
|
||||
(extract-title "foo.org" "#+TiTlE: Howdy")))
|
||||
(is (= "diagram/abcdef"
|
||||
(extract-title "foo.org" ":PROPERTIES:
|
||||
:ID: 72289d9a-eb2f-427b-ad97-b605a4b8c59b
|
||||
:END:
|
||||
#+TITLE: diagram/abcdef")))
|
||||
(is (= "diagram/abcdef"
|
||||
(extract-title "foo.org" ":PROPERTIES:
|
||||
:ID: 72289d9a-eb2f-427b-ad97-b605a4b8c59b
|
||||
:END:
|
||||
#+title: diagram/abcdef"))))
|
||||
|
||||
(deftest extract-blocks-with-property-pages-config
|
||||
(are [extract-args expected-refs]
|
||||
(= expected-refs
|
||||
(->> (apply extract extract-args)
|
||||
:blocks
|
||||
(mapcat #(->> % :block/refs (map :block/name)))
|
||||
set))
|
||||
|
||||
["a.md" "foo:: #bar\nbaz:: #bing" {:user-config {:property-pages/enabled? true}}]
|
||||
#{"bar" "bing" "foo" "baz"}
|
||||
|
||||
["a.md" "foo:: #bar\nbaz:: #bing" {:user-config {:property-pages/enabled? false}}]
|
||||
#{"bar" "bing"}))
|
||||
|
||||
(deftest test-regression-1902
|
||||
(is (= ["line1" "line2" "line3" "line4"]
|
||||
(extract-block-content
|
||||
"- line1
|
||||
- line2
|
||||
- line3
|
||||
- line4"))))
|
||||
150
deps/graph-parser/test/logseq/graph_parser/mldoc_test.cljs
vendored
Normal file
150
deps/graph-parser/test/logseq/graph_parser/mldoc_test.cljs
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
(ns logseq.graph-parser.mldoc-test
|
||||
(:require [cljs.test :refer [testing deftest are is]]
|
||||
[logseq.graph-parser.mldoc :as gp-mldoc]
|
||||
[logseq.graph-parser.text :as text]))
|
||||
|
||||
(def md-config (gp-mldoc/default-config :markdown))
|
||||
|
||||
(deftest src-test
|
||||
(is (= [["Src"
|
||||
{:lines [": hello" "\n"],
|
||||
:pos_meta {:start_pos 4, :end_pos 12},
|
||||
:full_content "```\n: hello\n```"}]
|
||||
{:start_pos 0, :end_pos 15}]
|
||||
(first (gp-mldoc/->edn "```
|
||||
: hello
|
||||
```" md-config)))
|
||||
"Basic src example")
|
||||
|
||||
(is (= [["Src"
|
||||
{:lines [" hello" "\n" " world" "\n"],
|
||||
:pos_meta {:start_pos 7, :end_pos 25},
|
||||
:full_content "```\nhello\nworld\n```"}]
|
||||
{:start_pos 1, :end_pos 29}]
|
||||
(second (gp-mldoc/->edn "
|
||||
```
|
||||
hello
|
||||
world
|
||||
```
|
||||
" md-config)))
|
||||
"Src example with leading whitespace"))
|
||||
|
||||
(defn- get-properties
|
||||
[x]
|
||||
(->> (gp-mldoc/->edn x md-config)
|
||||
ffirst second
|
||||
(map (fn [[k v ast]]
|
||||
[(keyword k) (text/parse-property k v ast {})]))
|
||||
(into {})))
|
||||
|
||||
(deftest md-properties-test
|
||||
(are [x y] (= y (get-properties x))
|
||||
|
||||
;; reference values
|
||||
"property:: [[foo]], [[bar]]"
|
||||
{:property #{"foo" "bar"}}
|
||||
|
||||
;; comma separated
|
||||
"tags:: foo, bar, foo"
|
||||
{:tags #{"foo" "bar"}}))
|
||||
|
||||
(deftest name-definition-test
|
||||
(is (= [["List"
|
||||
[{:content [["Paragraph" [["Plain" "definition"]]]],
|
||||
:items [],
|
||||
:name [["Plain" "term"]],
|
||||
:indent 0,
|
||||
:ordered false}]]
|
||||
{:start_pos 0, :end_pos 17}]
|
||||
(first (gp-mldoc/->edn "term
|
||||
: definition" md-config)))))
|
||||
|
||||
(deftest macro-with-script-markup-test
|
||||
(testing "inline macros can contain superscript and subscript markup"
|
||||
(are [content ast] (= ast (gp-mldoc/inline->edn content md-config))
|
||||
"{{cloze Ca^{ +2} ions}}"
|
||||
[["Macro" {:name "cloze" :arguments ["Ca^{ +2} ions"]}]]
|
||||
|
||||
"{{cloze H_{2}O}}"
|
||||
[["Macro" {:name "cloze" :arguments ["H_{2}O"]}]]
|
||||
|
||||
"{{cloze Ca^{+2}}}"
|
||||
[["Macro" {:name "cloze" :arguments ["Ca^{+2}"]}]]
|
||||
|
||||
"{{foo Ca^{ +2} ions, [[a, b]], \"c, d\"}}"
|
||||
[["Macro" {:name "foo" :arguments ["Ca^{ +2} ions" "[[a, b]]" "\"c, d\""]}]]
|
||||
|
||||
;; page ref inside a macro that also has script markup — exercises
|
||||
;; the Nested_link case in inline-ast->source
|
||||
"{{cloze Ca^{ +2} [[water]]}}"
|
||||
[["Macro" {:name "cloze" :arguments ["Ca^{ +2} [[water]]"]}]]))
|
||||
|
||||
(testing "normal macros without script markup are not modified"
|
||||
(are [content ast] (= ast (gp-mldoc/inline->edn content md-config))
|
||||
"{{cloze simple text}}"
|
||||
[["Macro" {:name "cloze" :arguments ["simple text"]}]]
|
||||
|
||||
"{{foo a, b, c}}"
|
||||
[["Macro" {:name "foo" :arguments ["a" "b" "c"]}]]
|
||||
|
||||
"{{cloze [[page name]]}}"
|
||||
[["Macro" {:name "cloze" :arguments ["[[page name]]"]}]]))
|
||||
|
||||
(testing "block parsing keeps the issue reproduction as macro nodes"
|
||||
(is (= [["Plain" "This is usually highlighted by the accumulation of the "]
|
||||
["Macro" {:name "cloze" :arguments ["Ca^{ +2} ions"]}]
|
||||
["Plain" " . This will be seen as "]
|
||||
["Macro" {:name "cloze" :arguments ["<ins>large flocculent amorphous densities in TEM</ins>"]}]]
|
||||
(-> (gp-mldoc/->edn
|
||||
"- This is usually highlighted by the accumulation of the {{cloze Ca^{ +2} ions}} . This will be seen as {{cloze <ins>large flocculent amorphous densities in TEM</ins>}}"
|
||||
md-config)
|
||||
ffirst
|
||||
second
|
||||
:title)))
|
||||
|
||||
(is (= [["Plain" "Water formula is "]
|
||||
["Macro" {:name "cloze" :arguments ["H_{2}O"]}]]
|
||||
(-> (gp-mldoc/->edn
|
||||
"- Water formula is {{cloze H_{2}O}}"
|
||||
md-config)
|
||||
ffirst
|
||||
second
|
||||
:title)))))
|
||||
|
||||
(defn- parse-properties
|
||||
[text]
|
||||
(->> (gp-mldoc/->edn text (gp-mldoc/default-config :org))
|
||||
(filter #(= "Properties" (ffirst %)))
|
||||
ffirst
|
||||
second))
|
||||
|
||||
(deftest org-properties-test
|
||||
(testing "just title"
|
||||
(let [content "#+TITLE: some title "
|
||||
props (parse-properties content)]
|
||||
(is (= "some title " (second (first props))))))
|
||||
|
||||
(testing "filetags"
|
||||
(let [content "#+FILETAGS: :tag1:tag2:@tag:
|
||||
#+TAGS: tag3
|
||||
body"
|
||||
props (parse-properties content)]
|
||||
(is ["@tag" "tag1" "tag2"] (sort (:filetags props)))
|
||||
(is ["@tag" "tag1" "tag2" "tag3"] (sort (:tags props))))))
|
||||
|
||||
(deftest remove-indentation-spaces
|
||||
(testing "Remove indentations for every line"
|
||||
(is (= "block 1.1\n line 1\n line 2\nline 3\nline 4"
|
||||
(let [s "block 1.1
|
||||
line 1
|
||||
line 2
|
||||
line 3
|
||||
line 4"]
|
||||
(gp-mldoc/remove-indentation-spaces s 2 false))))
|
||||
(is (= "\t- block 1.1\n line 1\n line 2\nline 3\nline 4"
|
||||
(let [s "\t- block 1.1
|
||||
\t line 1
|
||||
\t line 2
|
||||
\t line 3
|
||||
\tline 4"]
|
||||
(gp-mldoc/remove-indentation-spaces s 3 false))))))
|
||||
62
deps/graph-parser/test/logseq/graph_parser/property_test.cljs
vendored
Normal file
62
deps/graph-parser/test/logseq/graph_parser/property_test.cljs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
(ns logseq.graph-parser.property-test
|
||||
(:require [cljs.test :refer [are deftest testing]]
|
||||
[logseq.graph-parser.property :as gp-property]))
|
||||
|
||||
(def test-db "test-db")
|
||||
|
||||
(deftest test->new-properties
|
||||
(are [x y] (= (gp-property/->new-properties x) y)
|
||||
":PROPERTIES:\n:foo: bar\n:END:"
|
||||
"foo:: bar"
|
||||
|
||||
"hello\n:PROPERTIES:\n:foo: bar\n:END:"
|
||||
"hello\nfoo:: bar"
|
||||
|
||||
"hello\n:PROPERTIES:\n:foo: bar\n:nice: bingo\n:END:"
|
||||
"hello\nfoo:: bar\nnice:: bingo"
|
||||
|
||||
"hello\n:PROPERTIES:\n:foo: bar\n:nice: bingo\n:END:"
|
||||
"hello\nfoo:: bar\nnice:: bingo"
|
||||
|
||||
"hello\n:PROPERTIES:\n:foo: bar\n:nice: bingo\n:END:\nnice"
|
||||
"hello\nfoo:: bar\nnice:: bingo\nnice"
|
||||
|
||||
"hello\n:PROPERTIES:\n:foo: bar\n:nice:\n:END:\nnice"
|
||||
"hello\nfoo:: bar\nnice:: \nnice"
|
||||
|
||||
"hello\n:PROPERTIES:\n:foo: bar\n:nice\n:END:\nnice"
|
||||
"hello\nfoo:: bar\n:nice\nnice"))
|
||||
|
||||
(deftest test-remove-properties
|
||||
(testing "properties with non-blank lines"
|
||||
(are [x y] (= x y)
|
||||
(gp-property/remove-properties :org "** hello\n:PROPERTIES:\n:x: y\n:END:\n")
|
||||
"** hello"
|
||||
|
||||
(gp-property/remove-properties :org "** hello\n:PROPERTIES:\n:x: y\na:b\n:END:\n")
|
||||
"** hello"
|
||||
|
||||
(gp-property/remove-properties :markdown "** hello\nx:: y\na:: b\n")
|
||||
"** hello"
|
||||
|
||||
(gp-property/remove-properties :markdown "** hello\nx:: y\na::b\n")
|
||||
"** hello"))
|
||||
|
||||
(testing "properties with blank lines"
|
||||
(are [x y] (= x y)
|
||||
(gp-property/remove-properties :org "** hello\n:PROPERTIES:\n\n:x: y\n:END:\n")
|
||||
"** hello"
|
||||
|
||||
(gp-property/remove-properties :org "** hello\n:PROPERTIES:\n:x: y\n\na:b\n:END:\n")
|
||||
"** hello"))
|
||||
|
||||
(testing "invalid-properties"
|
||||
(are [x y] (= x y)
|
||||
(gp-property/remove-properties :markdown "hello\nnice\nfoo:: bar")
|
||||
"hello\nnice\nfoo:: bar"
|
||||
|
||||
(gp-property/remove-properties :markdown "hello\nnice\nfoo:: bar\ntest")
|
||||
"hello\nnice\nfoo:: bar\ntest"
|
||||
|
||||
(gp-property/remove-properties :markdown "** hello\nx:: y\n\na:: b\n")
|
||||
"** hello\n\na:: b")))
|
||||
20
deps/graph-parser/test/logseq/graph_parser/test/docs_graph_helper.cljs
vendored
Normal file
20
deps/graph-parser/test/logseq/graph_parser/test/docs_graph_helper.cljs
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
(ns logseq.graph-parser.test.docs-graph-helper
|
||||
"Helper fns for setting up and running tests against docs graph"
|
||||
(:require ["child_process" :as child-process]
|
||||
["fs" :as fs]))
|
||||
|
||||
;; Helper fns for test setup
|
||||
;; =========================
|
||||
(defn- sh
|
||||
"Run shell cmd synchronously and print to inherited streams by default. Aims
|
||||
to be similar to babashka.tasks/shell"
|
||||
[cmd opts]
|
||||
(child-process/spawnSync (first cmd)
|
||||
(clj->js (rest cmd))
|
||||
(clj->js (merge {:stdio "inherit"} opts))))
|
||||
|
||||
(defn clone-docs-repo-if-not-exists
|
||||
[dir branch]
|
||||
(when-not (.existsSync fs dir)
|
||||
(sh ["git" "clone" "--depth" "1" "-b" branch "-c" "advice.detachedHead=false"
|
||||
"https://github.com/logseq/docs" dir] {})))
|
||||
25
deps/graph-parser/test/logseq/graph_parser/test/helper.cljc
vendored
Normal file
25
deps/graph-parser/test/logseq/graph_parser/test/helper.cljc
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
(ns logseq.graph-parser.test.helper)
|
||||
|
||||
;; Copied from https://github.com/babashka/nbb/blob/e5d84b0fac59774f5d7a4a9e807240cce04bf252/test/nbb/test_macros.clj
|
||||
(defmacro deftest-async
|
||||
"A wrapper around deftest that handles async and done in all cases.
|
||||
Importantly, it prevents unexpected failures in an async test from abruptly
|
||||
ending a test suite"
|
||||
[name opts & body]
|
||||
(let [[opts body]
|
||||
(if (map? opts)
|
||||
[opts body]
|
||||
[nil (cons opts body)])]
|
||||
`(cljs.test/deftest ~name
|
||||
~@(when-let [pre (:before opts)]
|
||||
[pre])
|
||||
(cljs.test/async
|
||||
~'done
|
||||
(-> (do ~@body)
|
||||
(.catch (fn [err#]
|
||||
(cljs.test/is (= 1 0) (str err# (.-stack err#)))))
|
||||
(.finally
|
||||
(fn []
|
||||
~@(when-let [post (:after opts)]
|
||||
[post])
|
||||
(~'done))))))))
|
||||
6
deps/graph-parser/test/logseq/graph_parser/test_runner.cljs
vendored
Normal file
6
deps/graph-parser/test/logseq/graph_parser/test_runner.cljs
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
(ns logseq.graph-parser.test-runner
|
||||
"Test runner which enables https://github.com/PEZ/baldr by default"
|
||||
(:require [nextjournal.test-runner :as next-runner]
|
||||
[pez.baldr]))
|
||||
|
||||
(def -main next-runner/-main)
|
||||
117
deps/graph-parser/test/logseq/graph_parser/text_test.cljs
vendored
Normal file
117
deps/graph-parser/test/logseq/graph_parser/text_test.cljs
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
(ns logseq.graph-parser.text-test
|
||||
(:require [cljs.test :refer [are deftest testing]]
|
||||
[logseq.graph-parser.text :as text]
|
||||
[logseq.graph-parser.mldoc :as gp-mldoc]))
|
||||
|
||||
(deftest test-get-page-name
|
||||
(are [x y] (= (text/get-page-name x) y)
|
||||
"[[page]]" "page"
|
||||
"[[another page]]" "another page"
|
||||
"[single bracket]" nil
|
||||
"no brackets" nil
|
||||
|
||||
"[[another page]]" "another page"
|
||||
"[[nested [[page]]]]" "nested [[page]]"
|
||||
|
||||
"[[file:./page.org][page]]" "page"
|
||||
"[[file:./pages/page.org][page]]" "page"
|
||||
|
||||
"[[file:./namespace.page.org][namespace/page]]" "namespace/page"
|
||||
"[[file:./pages/namespace.page.org][namespace/page]]" "namespace/page"
|
||||
"[[file:./pages/namespace.page.org][please don't change me]]" "namespace/page"
|
||||
|
||||
"[page](file:./page.md)" "page"
|
||||
"[page](file:.pages/page.md)" "page"
|
||||
|
||||
"[logseq/page](file:./logseq.page.md)" "logseq/page"
|
||||
"[logseq/page](file:./pages/logseq.page.md)" "logseq/page"))
|
||||
|
||||
(deftest page-ref-un-brackets!
|
||||
(are [x y] (= (text/page-ref-un-brackets! x) y)
|
||||
"[[page]]" "page"
|
||||
"[[another page]]" "another page"
|
||||
"[[nested [[page]]]]" "nested [[page]]"
|
||||
"[single bracket]" "[single bracket]"
|
||||
"no brackets" "no brackets"))
|
||||
|
||||
(def block-patterns
|
||||
{:markdown "-"
|
||||
:org "*"})
|
||||
|
||||
(deftest remove-level-spaces
|
||||
(testing "markdown"
|
||||
(are [x y] (= (text/remove-level-spaces x :markdown (block-patterns :markdown) true) y)
|
||||
"- foobar" "foobar"
|
||||
" - foobar" "foobar"))
|
||||
(testing "markdown without spaces between the `#` and title"
|
||||
(are [x y] (= (text/remove-level-spaces x :markdown (block-patterns :markdown)) y)
|
||||
"-foobar" "foobar"))
|
||||
(testing "org"
|
||||
(are [x y] (= (text/remove-level-spaces x :org (block-patterns :org) true) y)
|
||||
"* foobar" "foobar"
|
||||
"** foobar" "foobar"
|
||||
"********************* foobar" "foobar"))
|
||||
(testing "org without spaces between the `#` and title"
|
||||
(are [x y] (= (text/remove-level-spaces x :org (block-patterns :org)) y)
|
||||
"*foobar" "foobar"
|
||||
"**foobar" "foobar"
|
||||
"*********************foobar" "foobar")))
|
||||
|
||||
(defn- parse-property
|
||||
[k v user-config]
|
||||
(let [references (gp-mldoc/get-references v (gp-mldoc/default-config :markdown))]
|
||||
(text/parse-property k v references user-config)))
|
||||
|
||||
(deftest test-parse-property
|
||||
(testing "for default comma separated properties"
|
||||
(are [k v y] (= (parse-property k v {}) y)
|
||||
:tags "foo" #{"foo"}
|
||||
:tags "comma, separated" #{"comma" "separated"}
|
||||
:alias "one, two, one" #{"one" "two"}))
|
||||
|
||||
(testing "for user comma separated properties"
|
||||
(are [k v y] (= (parse-property k v {:property/separated-by-commas #{:comma-prop}}) y)
|
||||
:comma-prop "foo" #{"foo"}
|
||||
:comma-prop "comma, separated" #{"comma" "separated"}
|
||||
:comma-prop "one, two, one" #{"one" "two"}))
|
||||
|
||||
(testing "for user comma separated properties with mixed values"
|
||||
(are [k v y] (= (parse-property k v {:property/separated-by-commas #{:comma-prop}}) y)
|
||||
:comma-prop "foo, #bar" #{"foo", "bar"}
|
||||
:comma-prop "comma, separated, [[page ref]], [[nested [[page]]]], #[[nested [[tag]]]], end" #{"page ref" "nested [[page]]" "nested [[tag]]" "comma" "separated" "end"}))
|
||||
|
||||
(testing "for normal properties"
|
||||
(are [k v y] (= (parse-property k v {}) y)
|
||||
:normal "[[foo]] [[bar]]" #{"foo" "bar"}
|
||||
:normal "[[foo]], [[bar]]" #{"foo" "bar"}
|
||||
:normal "[[foo]]" #{"foo"}
|
||||
:normal "[[foo]], [[bar]], #baz" #{"foo" "bar" "baz"}
|
||||
:normal "[[foo [[bar]]]]" #{"foo [[bar]]"}
|
||||
:normal "[[foo [[bar]]]], [[baz]]" #{"baz" "foo [[bar]]"}
|
||||
:title "comma, is ok" "comma, is ok"))
|
||||
|
||||
(testing "for tags in properties with punctuation"
|
||||
(are [k v y] (= (parse-property k v {}) y)
|
||||
:prop "#foo, #bar. #baz!" #{"foo" "bar" "baz"}
|
||||
:prop "#foo: '#bar'" #{"foo" "bar"}))
|
||||
|
||||
(testing "parse-property with quoted strings"
|
||||
(are [k v y] (= (parse-property k v {}) y)
|
||||
:tags "\"foo, bar\"" "\"foo, bar\""
|
||||
:tags "\"[[foo]], [[bar]]\"" "\"[[foo]], [[bar]]\""))
|
||||
|
||||
(testing "parse title property with square bracket"
|
||||
(are [k v y] (= (parse-property k v {}) y)
|
||||
:title "[[Jan 11th, 2022]] 21:26" "[[Jan 11th, 2022]] 21:26"
|
||||
:title "[[[[aldsfkd]] a.b/c.d]]" "[[[[aldsfkd]] a.b/c.d]]"))
|
||||
|
||||
(testing "built-in properties parse as expected"
|
||||
(are [k v y] (= (parse-property k v {}) y)
|
||||
:id "62e98716-9c0b-4253-83e7-7f8e8a23fe19" "62e98716-9c0b-4253-83e7-7f8e8a23fe19"
|
||||
:filters "{\"product process\" true}" "{\"product process\" true}"
|
||||
:collapsed "false" false
|
||||
:created-at "1609233702047" 1609233702047
|
||||
:background-color "#533e7d" "#533e7d")))
|
||||
|
||||
|
||||
#_(cljs.test/test-ns 'logseq.graph-parser.text-test)
|
||||
BIN
deps/graph-parser/test/resources/book/it/Understanding EXPLAIN.pdf
vendored
Normal file
BIN
deps/graph-parser/test/resources/book/it/Understanding EXPLAIN.pdf
vendored
Normal file
Binary file not shown.
1
deps/graph-parser/test/resources/exporter-test-graph/.gitignore
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/logseq/bak
|
||||
BIN
deps/graph-parser/test/resources/exporter-test-graph/assets/HEART_Teams.png
vendored
Normal file
BIN
deps/graph-parser/test/resources/exporter-test-graph/assets/HEART_Teams.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
@@ -0,0 +1,42 @@
|
||||
{:highlights [{:id #uuid "687022ae-dac1-42a6-9d4c-39a0dba05918",
|
||||
:page 1,
|
||||
:position {:bounding {:x1 131,
|
||||
:y1 336,
|
||||
:x2 483,
|
||||
:y2 399,
|
||||
:width 574.0000000000001,
|
||||
:height 573.999986224},
|
||||
:rects (),
|
||||
:page 1},
|
||||
:content {:text "", :image 1752179374600},
|
||||
:properties {:color "yellow"}}
|
||||
{:id #uuid "68702394-3613-4bac-85a7-28643d58237f",
|
||||
:page 8,
|
||||
:position {:bounding {:x1 10.680589094758034,
|
||||
:y1 183.2645263671875,
|
||||
:x2 119.76637782156467,
|
||||
:y2 204.954345703125,
|
||||
:width 574.0000000000001,
|
||||
:height 573.999986224},
|
||||
:rects ({:x1 10.680589094758034,
|
||||
:y1 183.2645263671875,
|
||||
:x2 119.76637782156467,
|
||||
:y2 204.954345703125,
|
||||
:width 574.0000000000001,
|
||||
:height 573.999986224}),
|
||||
:page 8},
|
||||
:content {:text "Duke School"},
|
||||
:properties {:color "blue"}}
|
||||
{:id #uuid "68702499-159a-4a14-a0cf-cf5f015535c2",
|
||||
:page 2,
|
||||
:position {:bounding {:x1 120,
|
||||
:y1 240,
|
||||
:x2 360,
|
||||
:y2 280,
|
||||
:width 574.0000000000001,
|
||||
:height 573.999986224},
|
||||
:rects (),
|
||||
:page 2},
|
||||
:content {:text nil},
|
||||
:properties {:color "yellow"}}],
|
||||
:extra {:page 2}}
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
53
deps/graph-parser/test/resources/exporter-test-graph/assets/Understanding EXPLAIN.edn
vendored
Normal file
53
deps/graph-parser/test/resources/exporter-test-graph/assets/Understanding EXPLAIN.edn
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{:highlights [{:id #uuid "697874ba-26e9-4e8a-a55d-0639d337dcc6",
|
||||
:page 6,
|
||||
:position {:bounding {:x1 67.03125,
|
||||
:y1 344.90625,
|
||||
:x2 612.7423095703125,
|
||||
:y2 379.3333740234375,
|
||||
:width 702,
|
||||
:height 993.418487394958},
|
||||
:rects ({:x1 67.03125,
|
||||
:y1 344.90625,
|
||||
:x2 612.7423095703125,
|
||||
:y2 364.2396240234375,
|
||||
:width 702,
|
||||
:height 993.418487394958}
|
||||
{:x1 67.03125,
|
||||
:y1 360,
|
||||
:x2 238.0740203857422,
|
||||
:y2 379.3333740234375,
|
||||
:width 702,
|
||||
:height 993.418487394958}),
|
||||
:page 6},
|
||||
:content {:text "EXPLAIN is a really nice command that gives you lots of information but it's often easy to not know what to do with all this"},
|
||||
:properties {:color "yellow"}}
|
||||
{:id #uuid "69787518-9eb8-4fd0-ad3b-b394e28bb547",
|
||||
:page 8,
|
||||
:position {:bounding {:x1 84,
|
||||
:y1 163,
|
||||
:x2 637,
|
||||
:y2 327,
|
||||
:width 702,
|
||||
:height 993.418487394958},
|
||||
:rects (),
|
||||
:page 8},
|
||||
:content {:text "[:span]", :image 1769501975346},
|
||||
:properties {:color "green"}}
|
||||
{:id #uuid "69787540-7a52-40af-a70a-cedd315934cf",
|
||||
:page 42,
|
||||
:position {:bounding {:x1 119.05208587646484,
|
||||
:y1 95.67709350585938,
|
||||
:x2 243.25509643554688,
|
||||
:y2 133.01040649414062,
|
||||
:width 702,
|
||||
:height 993.418487394958},
|
||||
:rects ({:x1 119.05208587646484,
|
||||
:y1 95.67709350585938,
|
||||
:x2 243.25509643554688,
|
||||
:y2 133.01040649414062,
|
||||
:width 702,
|
||||
:height 993.418487394958}),
|
||||
:page 42},
|
||||
:content {:text "Conclusion"},
|
||||
:properties {:color "blue"}}],
|
||||
:extra {:page 8}}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 736 KiB |
BIN
deps/graph-parser/test/resources/exporter-test-graph/assets/subdir/partydino.gif
vendored
Normal file
BIN
deps/graph-parser/test/resources/exporter-test-graph/assets/subdir/partydino.gif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
36
deps/graph-parser/test/resources/exporter-test-graph/assets/zlib.edn
vendored
Normal file
36
deps/graph-parser/test/resources/exporter-test-graph/assets/zlib.edn
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{:highlights [{:id #uuid "69787399-f51c-45a2-8971-78dc6c66a0ec",
|
||||
:page 1,
|
||||
:position {:bounding {:x1 123.89583587646484,
|
||||
:y1 164.3125,
|
||||
:x2 438.8349304199219,
|
||||
:y2 180.9791717529297,
|
||||
:width 702,
|
||||
:height 908.470588235294},
|
||||
:rects ({:x1 123.89583587646484,
|
||||
:y1 164.3125,
|
||||
:x2 438.8349304199219,
|
||||
:y2 180.9791717529297,
|
||||
:width 702,
|
||||
:height 908.470588235294}
|
||||
{:x1 143.625,
|
||||
:y1 166.9791717529297,
|
||||
:x2 432.40625,
|
||||
:y2 178.4479217529297,
|
||||
:width 702,
|
||||
:height 908.470588235294}),
|
||||
:page 1},
|
||||
:content {:text "The zlib library is a general purpose data compression library."},
|
||||
:properties {:color "red"}}
|
||||
{:id #uuid "697873d7-5953-4753-897e-62ac47348634",
|
||||
:page 1,
|
||||
:position {:bounding {:x1 116,
|
||||
:y1 530,
|
||||
:x2 627,
|
||||
:y2 690,
|
||||
:width 702,
|
||||
:height 908.470588235294},
|
||||
:rects (),
|
||||
:page 1},
|
||||
:content {:text "[:span]", :image 1769501651181},
|
||||
:properties {:color "blue"}}],
|
||||
:extra {:page 2}}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
65
deps/graph-parser/test/resources/exporter-test-graph/ignored/about.org
vendored
Normal file
65
deps/graph-parser/test/resources/exporter-test-graph/ignored/about.org
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
#+TITLE: About
|
||||
|
||||
** Hi, welcome to [[https://logseq.com][Logseq]].
|
||||
|
||||
*Logseq* is a /local-only/, /non-linear/, /outliner/ notebook for organizing and
|
||||
[[https://logseq.com/blog][sharing]] your personal knowledge base.
|
||||
|
||||
Use it to organize your todo list, to write your journals, or to record your unique
|
||||
life.
|
||||
|
||||
The server will never store or analyze your private notes. Your data are
|
||||
plain text files, we support both Markdown and Emacs Org mode for the time being. Even if the website is down or can't be maintained, your data is always yours.
|
||||
|
||||
*Logseq* is hugely inspired by [[https://roamresearch.com/][Roam Research]], [[https://orgmode.org/][Org Mode]], [[https://tiddlywiki.com/][Tiddlywiki]] and [[https://workflowy.com/][Workflowy]], hats off to all of them!
|
||||
[[https://cdn.logseq.com/%2F8b9a461d-437e-4ca5-a2da-18b51077b5142020_07_25_Screenshot%202020-07-25%2013-29-49%20%2B0800.png?Expires=4749255017&Signature=Qbx6jkgAytqm6nLxVXQQW1igfcf~umV1OcG6jXUt09TOVhgXyA2Z5jHJ3AGJASNcphs31pZf4CjFQ5mRCyVKw6N8wb8Nn-MxuTJl0iI8o-jLIAIs9q1v-2cusCvuFfXH7bq6ir8Lpf0KYAprzuZ00FENin3dn6RBW35ENQwUioEr5Ghl7YOCr8bKew3jPV~OyL67MttT3wJig1j3IC8lxDDT8Ov5IMG2GWcHERSy00F3mp3tJtzGE17-OUILdeuTFz6d-NDFAmzB8BebiurYz0Bxa4tkcdLUpD5ToFHU08jKzZExoEUY8tvaZ1-t7djmo3d~BAXDtlEhC2L1YC2aVQ__&Key-Pair-Id=APKAJE5CCD6X7MP6PTEA][2020_07_25_Screenshot 2020-07-25 13-29-49 +0800.png]]
|
||||
** Where are my notes saved?
|
||||
Your notes will be stored in the local browser storage. We are using IndexedDB.
|
||||
** How do I use it?
|
||||
*** 1. Sync between multiple devices
|
||||
Currently, we only support syncing through GitHub, more options (e.g.
|
||||
Gitlab, Dropbox, Google Drive, WebDAV, etc.) will be added soon.
|
||||
|
||||
We are using an excellent web git client called [[https://isomorphic-git.org/][isomorphic-git]].
|
||||
**** Step 1
|
||||
Click the button /Login with GitHub/.
|
||||
**** Step 2
|
||||
Set your GitHub personal access token, the token will be encrypted and
|
||||
stored in the browser local storage, our server will never store it.
|
||||
|
||||
If you know nothing about either Git or the personal access token, no worries,
|
||||
just follow the steps here: https://logseq.com/blog/faq#How_to_create_a_Github_personal_access_token-3f-
|
||||
**** Step 3
|
||||
Start writing!
|
||||
*** 2. Use it locally (no need to login)
|
||||
Just remember to backup your notes periodically (we'll provide export and import soon)!
|
||||
** Features
|
||||
- Backlinks between ~[[Page]]~s
|
||||
- Block embed
|
||||
- Page embed
|
||||
- Graph visualization
|
||||
- Heading properties
|
||||
- Datalog queries, the notes db is powered by [[https://github.com/tonsky/datascript][Datascript]]
|
||||
- Custom view component
|
||||
- Document built-in supports:
|
||||
* Code highlights
|
||||
* Katex latex
|
||||
* Raw [[https://github.com/weavejester/hiccup][hiccup]]
|
||||
* Raw html
|
||||
** Learn more
|
||||
- Twitter: https://twitter.com/logseq
|
||||
- Discord: https://discord.gg/KpN4eHY where we ask questions and share tips
|
||||
- Website: https://logseq.com/
|
||||
- GitHub: https://github.com/logseq/logseq everyone is encouraged to report issues!
|
||||
- Our blog: https://logseq.com/blog
|
||||
** Credits to
|
||||
- [[https://roamresearch.com/][Roam Research]]
|
||||
- [[https://orgmode.org/][Org Mode]]
|
||||
- [[https://tiddlywiki.com/][Tiddlywiki]]
|
||||
- [[https://workflowy.com/][Workflowy]]
|
||||
- [[https://clojure.org][Clojure && Clojurescript]]
|
||||
- [[https://ocaml.org/][OCaml]] && [[https://github.com/inhabitedtype/angstrom][Angstrom]], the document [[https://github.com/mldoc/mldoc][parser]] is built on Angstrom.
|
||||
- [[https://github.com/talex5/cuekeeper][Cuekeeper]] - Browser-based GTD (TODO list) system.
|
||||
- [[https://github.com/tonsky/datascript][Datascript]] - Immutable database and Datalog query engine for Clojure, ClojureScript and JS
|
||||
- [[https://github.com/borkdude/sci][sci]] - Small Clojure Interpreter
|
||||
- [[https://isomorphic-git.org/][isomorphic-git]]
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/ignored/icon-page.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/ignored/icon-page.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
icon:: 😆
|
||||
|
||||
- has some content
|
||||
icon:: 😆
|
||||
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_01_05.md
vendored
Normal file
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_01_05.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
- test!
|
||||
- child block
|
||||
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_01_08.md
vendored
Normal file
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_01_08.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
- [[some page]] tests page ref being parsed before page
|
||||
- [[prop-num]] tests page existing before being used as and converted into a property
|
||||
- {:height 288, :width 252}
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_01_17.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_01_17.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
- b1
|
||||
prop-string:: woot
|
||||
prop-num:: 5
|
||||
Prop-bool:: true
|
||||
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_07.md
vendored
Normal file
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_07.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
- Inception #Movie
|
||||
- TODO do X #p0
|
||||
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_13.md
vendored
Normal file
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_13.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
- original block
|
||||
id:: 65cbb772-fb79-462d-87c8-6f0dad751dee
|
||||
- ref to ((65cbb772-fb79-462d-87c8-6f0dad751dee))
|
||||
10
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_14.md
vendored
Normal file
10
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_14.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
- TODO old todo block
|
||||
todo:: 1612237041309
|
||||
done:: 1612237041309
|
||||
now:: 1612237041309
|
||||
later:: 1612237041309
|
||||
- {{query (property :prop-string)}}
|
||||
query-table:: true
|
||||
query-properties:: [:block :page :prop-string :prop-num]
|
||||
query-sort-by:: prop-num
|
||||
query-sort-desc:: true
|
||||
10
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_15.md
vendored
Normal file
10
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_15.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
- existing :number to :default
|
||||
duration:: 20
|
||||
- Review 15 candidates #Meeting
|
||||
participants:: [[Gabriel]] [[Jakob]]
|
||||
description:: [[Jakob]] thought candidate was #awesome
|
||||
- numbered list
|
||||
- list one
|
||||
logseq.order-list-type:: number
|
||||
- list two
|
||||
logseq.order-list-type:: number
|
||||
51
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_16.md
vendored
Normal file
51
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_16.md
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
- test :dates
|
||||
startedAt:: [[Feb 6th, 2024]]
|
||||
finishedAt:: [[Feb 7th, 2024]]
|
||||
- MEETING TITLE
|
||||
template:: meeting
|
||||
participants:: TODO
|
||||
- TITLE
|
||||
template:: title-only-no-children
|
||||
- template:: properties-only-no-children
|
||||
name::
|
||||
author::
|
||||
- TITLE
|
||||
template:: title-only-with-children
|
||||
- intro
|
||||
- notes
|
||||
-
|
||||
template:: empty-title-with-children
|
||||
- intro
|
||||
- notes
|
||||
- it should not be included in the template
|
||||
template:: children-only
|
||||
template-including-parent:: false
|
||||
- intro
|
||||
- notes
|
||||
- it's a template with nested templates
|
||||
template:: nested-father
|
||||
template-including-parent:: true
|
||||
name:: you named it
|
||||
- child-1
|
||||
template:: nested-child-1
|
||||
name::
|
||||
- child-1-1
|
||||
name::
|
||||
- child-2
|
||||
template:: nested-child-2
|
||||
template-including-parent:: false
|
||||
name::
|
||||
- child-2-1
|
||||
name::
|
||||
- child-3
|
||||
name::
|
||||
- pending block for :number to :default
|
||||
duration:: 10
|
||||
- test :number to :default
|
||||
duration:: 20m
|
||||
- test :default to :node
|
||||
description:: [[Jakob]]
|
||||
- test :node -> :date
|
||||
participants:: [[Feb 7th, 2024]]
|
||||
- :node people
|
||||
people:: [[Jakob]] [[Gabriel]]
|
||||
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_23.md
vendored
Normal file
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_23.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
- The Creator
|
||||
type:: [[Movie]]
|
||||
testTagClass:: #Movie
|
||||
- test :date -> :node
|
||||
finishedAt:: [[Gabriel]]
|
||||
7
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_28.md
vendored
Normal file
7
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_28.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
- collapsed block
|
||||
collapsed:: true
|
||||
- child
|
||||
- pending block for :node to :default
|
||||
people:: [[Gabriel]] [[Jakob]]
|
||||
- test :node :many to :default
|
||||
people:: some text
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_29.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_02_29.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
- b1
|
||||
rating:: 5
|
||||
- :rating float
|
||||
rating:: 5.5
|
||||
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_03_01.md
vendored
Normal file
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_03_01.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
- test ignore blank values so that property type doesn't change
|
||||
sameAs::
|
||||
- replace tags edge cases
|
||||
- replace with same start string #foo #foo-bar
|
||||
- replace case insensitive #foo #Foo
|
||||
13
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_04_01.md
vendored
Normal file
13
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_04_01.md
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
- only deadline
|
||||
id:: 669168ed-8734-4943-8a86-5e3a553a526d
|
||||
DEADLINE: <2022-11-26 Sat>
|
||||
- deadline and scheduled, also tests using same day on one block
|
||||
DEADLINE: <2022-11-25 Sat>
|
||||
SCHEDULED: <2022-11-25 Fri .+1d>
|
||||
- [#A] high priority
|
||||
- DOING [#B] status test
|
||||
:LOGBOOK:
|
||||
CLOCK: [2024-04-01 Mon 10:39:40]
|
||||
:END:
|
||||
- deadline on same day
|
||||
DEADLINE: <2024-04-01 Mon 13:50>
|
||||
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_07_24.md
vendored
Normal file
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_07_24.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
- unusual class example #123
|
||||
- unusual property example
|
||||
123:: works
|
||||
76
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_08_07.md
vendored
Normal file
76
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_08_07.md
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
- For example, here's a query with title text:
|
||||
{{query (property type book)}}
|
||||
- test multilines in this page
|
||||
- |markdown| table|
|
||||
|some|thing|
|
||||
- block with props
|
||||
prop-num:: 10
|
||||
- normal multiline block
|
||||
a 2nd
|
||||
and a 3rd
|
||||
- colored multiline block
|
||||
background-color:: red
|
||||
last line
|
||||
- multiline block with prop and deadline
|
||||
background-color:: red
|
||||
DEADLINE: <2022-11-26 Sat>
|
||||
last line
|
||||
- multiline block with deadline and scheduled in 1 line and sth else
|
||||
DEADLINE: <2022-11-26 Sat> SCHEDULED: <2022-11-26 Sat> something else
|
||||
last line
|
||||
- DONE multiline logbook block
|
||||
:LOGBOOK:
|
||||
CLOCK: [2024-08-07 Wed 11:47:50]
|
||||
CLOCK: [2024-08-07 Wed 11:47:53]
|
||||
:END:
|
||||
last line
|
||||
- DOING logbook block
|
||||
:LOGBOOK:
|
||||
CLOCK: [2024-08-07 Wed 11:47:50]
|
||||
CLOCK: [2024-08-07 Wed 11:47:53]
|
||||
:END:
|
||||
- TODO
|
||||
- Text before
|
||||
query-table:: false
|
||||
query-properties:: [:block]
|
||||
#+BEGIN_QUERY
|
||||
{:title "tasks with todo and doing"
|
||||
:query (task todo doing)}
|
||||
#+END_QUERY
|
||||
Text after
|
||||
- collapsed:: true
|
||||
#+BEGIN_QUERY
|
||||
{:title "⌛ Pretty print advanced query test"
|
||||
:query [:find (pull ?b [*])
|
||||
:in $ ?today
|
||||
:where
|
||||
[?b :block/page ?p]
|
||||
[?p :page/journal? true]
|
||||
[?p :page/journal-day ?jd]
|
||||
[(str ?jd) ?jds]
|
||||
[(subs ?jds 4 8) ?md1]
|
||||
[(str ?today) ?td]
|
||||
[(subs ?td 4 8) ?md2]
|
||||
[(= ?md1 ?md2)]
|
||||
[(< ?jd ?today)]
|
||||
]
|
||||
:inputs [:today]
|
||||
:breadcrumb-show? true
|
||||
:collapsed? False
|
||||
}
|
||||
#+END_QUERY
|
||||
- Get all tasks with a tag "project"
|
||||
#+BEGIN_SRC clojure
|
||||
#+BEGIN_QUERY
|
||||
{:title "All blocks with tag project"
|
||||
:query [:find (pull ?b [*])
|
||||
:where
|
||||
[?p :block/name "project"]
|
||||
[?b :block/refs ?p]]}
|
||||
#+END_QUERY
|
||||
#+END_SRC
|
||||
- Find the blocks containing `tag2` but not `tag1`
|
||||
|
||||
#+BEGIN_EXAMPLE
|
||||
{{query (and [[tag2]] (not [[tag1]]))}}
|
||||
#+END_EXAMPLE
|
||||
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_10_09.md
vendored
Normal file
3
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_10_09.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
- test linked ref filters
|
||||
- [[ref1]] [[chat-gpt]]
|
||||
- [[ref2]] [[chat-gpt]]
|
||||
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_10_17.md
vendored
Normal file
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_10_17.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
- test namespaces
|
||||
- [[y]]
|
||||
- [[n1/x/z]]
|
||||
- [[n2/x/z]]
|
||||
- [[n2/alias]] tests name that overlaps with built-in ones
|
||||
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_11_12.md
vendored
Normal file
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_11_12.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
- block with namespace tag #Quotes/life
|
||||
- block with namespace ref [[Quotes/life]]
|
||||
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_11_18.md
vendored
Normal file
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_11_18.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
- Block with journal ref [[Nov 3rd, 2020]]
|
||||
- Another block with #Quotes/life
|
||||
11
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_11_26.md
vendored
Normal file
11
deps/graph-parser/test/resources/exporter-test-graph/journals/2024_11_26.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
- card 1 #card
|
||||
card-last-score:: 3
|
||||
card-repeats:: 1
|
||||
card-next-schedule:: 2024-11-30T20:27:33.372Z
|
||||
card-last-interval:: 4
|
||||
card-ease-factor:: 2.36
|
||||
card-last-reviewed:: 2024-11-26T20:27:33.373Z
|
||||
- card 2 with cloze {{cloze surprise!}} #card
|
||||
card-next-schedule:: 2024-11-27T05:00:00.000Z
|
||||
- This block should test a page with a future parent class `#Property`
|
||||
FIXME: Property tag triggers an intermittent, invalid hanging block ref
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_01_10.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_01_10.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
- A page ref with same as a block (task in this case) shouldn't fail [[do X]]
|
||||
61
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_06_12.md
vendored
Normal file
61
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_06_12.md
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
- Test paragraph before an asset
|
||||
|
||||
|
||||
{:width 105} tests an asset with a manual link, custom title and in a subdirectory
|
||||
- {:height 288, :width 252} and {:width 335.99774169921875}
|
||||
- From Inception:
|
||||
#+BEGIN_QUOTE
|
||||
Saito: Cobb? Impossible. We were young men together. I'm an old man.
|
||||
...
|
||||
Cobb: I've come back for you... to remind you of something. Something you once knew...
|
||||
#+END_QUOTE
|
||||
- > markdown quote
|
||||
[[wut]]
|
||||
line 3
|
||||
- Test of various ast types:
|
||||
#+BEGIN_QUOTE
|
||||
*Italic* ~~Strikethrough~~ ^^Highlight^^ #[[foo]]
|
||||
**Learn Datalog Today** is an interactive tutorial designed to teach you the [Datomic](http://datomic.com/) dialect of [Datalog](http://en.wikipedia.org/wiki/Datalog). Datalog is a declarative **database query language** with roots in logic programming. Datalog has similar expressive power as [SQL](http://en.wikipedia.org/wiki/Sql).
|
||||
#+END_QUOTE
|
||||
- test page embed
|
||||
{{embed [[page embed]]}}
|
||||
- test block embed
|
||||
id:: 685434e1-0bb9-468c-a660-1642b00b2854
|
||||
- {{embed ((685434e1-0bb9-468c-a660-1642b00b2854))}}
|
||||
- > Blockquotes
|
||||
- > Blockquotes
|
||||
and
|
||||
|
||||
something else
|
||||
- #+BEGIN_QUOTE
|
||||
Blockquotes
|
||||
and
|
||||
#+END_QUOTE
|
||||
something else
|
||||
- > Blockquotes
|
||||
>> Nested Blockquotes
|
||||
- Q:
|
||||
> Question 1
|
||||
|
||||
A:
|
||||
> Answer 1
|
||||
and
|
||||
>> nested
|
||||
|
||||
and something else
|
||||
- Q:
|
||||
|
||||
> Question 2
|
||||
|
||||
> Question 3
|
||||
|
||||
A:
|
||||
|
||||
> Answer 2
|
||||
>
|
||||
> Answer 3
|
||||
- #+BEGIN_QUOTE
|
||||
it's a
|
||||
|
||||
org blockquote
|
||||
#+END_QUOTE
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_06_23.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_06_23.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
- tests :node to :default like :people property but for a new property
|
||||
people2:: [[Gabriel]]
|
||||
- changes :node to :default
|
||||
people2:: some text
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_07_10.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_07_10.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
- 
|
||||
7
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_07_15.md
vendored
Normal file
7
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_07_15.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
- Test ref to an annotation: ((68702394-3613-4bac-85a7-28643d58237f))
|
||||
- background-color:: yellow
|
||||
> The distribution of $x^n ~\text{mod}~ 1$ is more subtle. We have three basic facts.
|
||||
>
|
||||
> 1. If $0 ≤ x < 1$, then $x^n → 0$ as $n → ∞$.
|
||||
> 2. If $x = 1$ then $x^n = 1$ for all $n$.
|
||||
> 3. For almost all $x > 1$ the sequence $x^n ~\text{mod}~ 1$ is uniformly distributed. But for some values of $x$ it is not, and there’s no known classification for these exceptional values of $x$.
|
||||
8
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_11_04.md
vendored
Normal file
8
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_11_04.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
- #+BEGIN_QUOTE
|
||||
test a code block in a quote:
|
||||
|
||||
```shell
|
||||
$ echo hi
|
||||
$ echo gbye
|
||||
```
|
||||
#+END_QUOTE
|
||||
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_12_17.md
vendored
Normal file
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2025_12_17.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
tags:: #diary
|
||||
- This journal has a tag to test journals with tags
|
||||
- Block tags #p1
|
||||
tags:: ai, #block-tag
|
||||
- block w/ longer ns tag #n1/n2/n3
|
||||
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2026_01_01.md
vendored
Normal file
2
deps/graph-parser/test/resources/exporter-test-graph/journals/2026_01_01.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
- [[zlib]]
|
||||
- [[Understanding EXPLAIN]]
|
||||
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2026_01_27.md
vendored
Normal file
5
deps/graph-parser/test/resources/exporter-test-graph/journals/2026_01_27.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
- 2nd instance of block w/ longer ns tag #n1/n2/n3
|
||||
- property pages with '/' should be valid
|
||||
key/value:: 1
|
||||
- block with multi word tag #[[another test]] doesn't get removed by page-ref replacement
|
||||
- [[Jan 1st, 2026]]
|
||||
35
deps/graph-parser/test/resources/exporter-test-graph/journals/2026_03_01.md
vendored
Normal file
35
deps/graph-parser/test/resources/exporter-test-graph/journals/2026_03_01.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
- ```markdown
|
||||
it's an individual code snippet with language tag
|
||||
```
|
||||
- ```
|
||||
it's an individual code snippet without language tag
|
||||
```
|
||||
- before code snippet
|
||||
```
|
||||
echo "ok"
|
||||
exit
|
||||
```
|
||||
- before code snippet
|
||||
```bash
|
||||
echo "ok"
|
||||
exit
|
||||
```
|
||||
after code snippet
|
||||
- ```bash
|
||||
echo "ok"
|
||||
exit
|
||||
```
|
||||
after code snippet
|
||||
- before code snippet
|
||||
```bash
|
||||
echo "ok"
|
||||
exit
|
||||
```
|
||||
middle
|
||||
```bash
|
||||
echo "bye"
|
||||
exit
|
||||
```
|
||||
after code snippet
|
||||
- $$E=mc^2$$
|
||||
- {{cards (tags #Card)}}
|
||||
408
deps/graph-parser/test/resources/exporter-test-graph/logseq/config.edn
vendored
Normal file
408
deps/graph-parser/test/resources/exporter-test-graph/logseq/config.edn
vendored
Normal file
@@ -0,0 +1,408 @@
|
||||
{:meta/version 1
|
||||
|
||||
;; Set the preferred format.
|
||||
;; This is _only_ for file graphs.
|
||||
;; Available options:
|
||||
;; - Markdown (default)
|
||||
;; - Org
|
||||
;; :preferred-format "Markdown"
|
||||
|
||||
;; Set the preferred workflow style.
|
||||
;; Available options:
|
||||
;; - :now for NOW/LATER style (default)
|
||||
;; - :todo for TODO/DOING style
|
||||
:preferred-workflow :now
|
||||
|
||||
;; Exclude directories/files.
|
||||
;; Example usage:
|
||||
;; :hidden ["/archived" "/test.md" "../assets/archived"]
|
||||
:hidden ["ignored"]
|
||||
|
||||
;; Define the default journal page template.
|
||||
;; Enter the template name between the quotes.
|
||||
:default-templates
|
||||
{:journals ""}
|
||||
|
||||
;; Set a custom date format for the journal page title.
|
||||
;; Default value: "MMM do, yyyy"
|
||||
;; e.g., "Jan 19th, 2038"
|
||||
;; Example usage e.g., "Tue 19th, Jan 2038"
|
||||
;; :journal/page-title-format "EEE do, MMM yyyy"
|
||||
|
||||
;; Specify the journal filename format using a valid date format string.
|
||||
;; !Warning:
|
||||
;; This configuration is not retroactive and affects only new journals.
|
||||
;; To show old journal files in the app, manually rename the files in the
|
||||
;; journal directory to match the new format.
|
||||
;; Default value: "yyyy_MM_dd"
|
||||
;; :journal/file-name-format "yyyy_MM_dd"
|
||||
|
||||
;; Enable tooltip preview on hover.
|
||||
;; Default value: true
|
||||
:ui/enable-tooltip? true
|
||||
|
||||
;; Display brackets [[]] around page references.
|
||||
;; Default value: true
|
||||
;; :ui/show-brackets? true
|
||||
|
||||
;; Display all lines of a block when referencing ((block)).
|
||||
;; Default value: false
|
||||
:ui/show-full-blocks? false
|
||||
|
||||
;; Automatically expand block references when zooming in.
|
||||
;; Default value: true
|
||||
:ui/auto-expand-block-refs? true
|
||||
|
||||
;; Disable accent marks when searching.
|
||||
;; After changing this setting, rebuild the search index by pressing (^C ^S).
|
||||
;; Default value: true
|
||||
:feature/enable-search-remove-accents? true
|
||||
|
||||
;; Enable journals.
|
||||
;; Default value: true
|
||||
;; :feature/enable-journals? true
|
||||
|
||||
;; Enable flashcards.
|
||||
;; Default value: true
|
||||
;; :feature/enable-flashcards? true
|
||||
|
||||
;; Enable whiteboards.
|
||||
;; Default value: true
|
||||
;; :feature/enable-whiteboards? true
|
||||
|
||||
;; Disable the journal's built-in 'Scheduled tasks and deadlines' query.
|
||||
;; Default value: false
|
||||
;; :feature/disable-scheduled-and-deadline-query? false
|
||||
|
||||
;; Specify the number of days displayed in the future for
|
||||
;; the 'scheduled tasks and deadlines' query.
|
||||
;; Example usage:
|
||||
;; Display all scheduled and deadline blocks for the next 14 days:
|
||||
;; :scheduled/future-days 14
|
||||
;; Default value: 7
|
||||
;; :scheduled/future-days 7
|
||||
|
||||
;; Specify the first day of the week.
|
||||
;; Available options:
|
||||
;; - integer from 0 to 6 (Monday to Sunday)
|
||||
;; Default value: 6 (Sunday)
|
||||
:start-of-week 6
|
||||
|
||||
;; Specify a custom CSS import.
|
||||
;; This option takes precedence over the local `logseq/custom.css` file.
|
||||
;; Example usage:
|
||||
;; :custom-css-url "@import url('https://cdn.jsdelivr.net/gh/dracula/logseq@master/custom.css');"
|
||||
|
||||
;; Specify a custom JS import.
|
||||
;; This option takes precedence over the local `logseq/custom.js` file.
|
||||
;; Example usage:
|
||||
;; :custom-js-url "https://cdn.logseq.com/custom.js"
|
||||
|
||||
;; Set bullet indentation when exporting
|
||||
;; Available options:
|
||||
;; - `:eight-spaces` as eight spaces
|
||||
;; - `:four-spaces` as four spaces
|
||||
;; - `:two-spaces` as two spaces
|
||||
;; - `:tab` as a tab character (default)
|
||||
;; :export/bullet-indentation :tab
|
||||
|
||||
;; Publish all pages within the Graph
|
||||
;; Regardless of whether individual pages have been marked as public.
|
||||
;; Default value: false
|
||||
;; :publishing/all-pages-public? false
|
||||
|
||||
;; Define the default home page and sidebar status.
|
||||
;; If unspecified, the journal page will be loaded on startup and the right sidebar will stay hidden.
|
||||
;; The `:page` value represents the name of the page displayed at startup.
|
||||
;; Available options for `:sidebar` are:
|
||||
;; - "Contents" to display the Contents page in the right sidebar.
|
||||
;; - A specific page name to display in the right sidebar.
|
||||
;; - An array of multiple pages, e.g., ["Contents" "Page A" "Page B"].
|
||||
;; If `:sidebar` remains unset, the right sidebar will stay hidden.
|
||||
;; Examples:
|
||||
;; 1. Set "Changelog" as the home page and display "Contents" in the right sidebar:
|
||||
;; :default-home {:page "Changelog", :sidebar "Contents"}
|
||||
;; 2. Set "Jun 3rd, 2021" as the home page without the right sidebar:
|
||||
;; :default-home {:page "Jun 3rd, 2021"}
|
||||
;; 3. Set "home" as the home page and display multiple pages in the right sidebar:
|
||||
;; :default-home {:page "home", :sidebar ["Page A" "Page B"]}
|
||||
|
||||
;; Set the default location for storing notes.
|
||||
;; Default value: "pages"
|
||||
;; :pages-directory "pages"
|
||||
|
||||
;; Set the default location for storing journals.
|
||||
;; Default value: "journals"
|
||||
;; :journals-directory "journals"
|
||||
|
||||
;; Set the default location for storing whiteboards.
|
||||
;; Default value: "whiteboards"
|
||||
;; :whiteboards-directory "whiteboards"
|
||||
|
||||
;; Enabling this option converts
|
||||
;; [[Grant Ideas]] to [[file:./grant_ideas.org][Grant Ideas]] for org-mode.
|
||||
;; For more information, visit https://github.com/logseq/logseq/issues/672
|
||||
;; :org-mode/insert-file-link? false
|
||||
|
||||
;; Configure custom shortcuts.
|
||||
;; Syntax:
|
||||
;; 1. + indicates simultaneous key presses, e.g., `Ctrl+Shift+a`.
|
||||
;; 2. A space between keys represents key chords, e.g., `t s` means
|
||||
;; pressing `t` followed by `s`.
|
||||
;; 3. mod refers to `Ctrl` for Windows/Linux and `Command` for Mac.
|
||||
;; 4. Use false to disable a specific shortcut.
|
||||
;; 5. You can define multiple bindings for a single action, e.g., ["ctrl+j" "down"].
|
||||
;; The full list of configurable shortcuts is available at:
|
||||
;; https://github.com/logseq/logseq/blob/master/src/main/frontend/modules/shortcut/config.cljs
|
||||
;; Example:
|
||||
;; :shortcuts
|
||||
;; {:editor/new-block "enter"
|
||||
;; :editor/new-line "shift+enter"
|
||||
;; :editor/insert-link "mod+shift+k"
|
||||
;; :editor/highlight false
|
||||
;; :ui/toggle-settings "t s"
|
||||
;; :editor/up ["ctrl+k" "up"]
|
||||
;; :editor/down ["ctrl+j" "down"]
|
||||
;; :editor/left ["ctrl+h" "left"]
|
||||
;; :editor/right ["ctrl+l" "right"]}
|
||||
:shortcuts {}
|
||||
|
||||
;; Configure the behavior of pressing Enter in document mode.
|
||||
;; if set to true, pressing Enter will create a new block.
|
||||
;; Default value: false
|
||||
:shortcut/doc-mode-enter-for-new-block? false
|
||||
|
||||
;; Block content larger than `block/title-max-length` will not be searchable
|
||||
;; or editable for performance.
|
||||
;; Default value: 10000
|
||||
:block/title-max-length 10000
|
||||
|
||||
;; Display command documentation on hover.
|
||||
;; Default value: true
|
||||
:ui/show-command-doc? true
|
||||
|
||||
;; Display empty bullet points.
|
||||
;; Default value: false
|
||||
:ui/show-empty-bullets? false
|
||||
|
||||
;; Pre-defined :view function to use with advanced queries.
|
||||
:query/views
|
||||
{:pprint
|
||||
(fn [r] [:pre.code (pprint r)])}
|
||||
|
||||
;; Advanced queries `:result-transform` function.
|
||||
;; Transform the query result before displaying it.
|
||||
:query/result-transforms
|
||||
{:sort-by-priority
|
||||
(fn [result] (sort-by (fn [h] (get h :block/priority "Z")) result))}
|
||||
|
||||
;; The following queries will be displayed at the bottom of today's journal page.
|
||||
;; The "NOW" query returns tasks with "NOW" or "DOING" status.
|
||||
;; The "NEXT" query returns tasks with "NOW", "LATER", or "TODO" status.
|
||||
:default-queries
|
||||
{:journals
|
||||
[{:title "🔨 NOW"
|
||||
:query [:find (pull ?h [*])
|
||||
:in $ ?start ?today
|
||||
:where
|
||||
[?h :block/marker ?marker]
|
||||
[(contains? #{"NOW" "DOING"} ?marker)]
|
||||
[?h :block/page ?p]
|
||||
[?p :block/journal-day ?d]
|
||||
[(>= ?d ?start)]
|
||||
[(<= ?d ?today)]]
|
||||
:inputs [:14d :today]
|
||||
:result-transform (fn [result]
|
||||
(sort-by (fn [h]
|
||||
(get h :block/priority "Z")) result))
|
||||
:group-by-page? false
|
||||
:collapsed? false}
|
||||
{:title "📅 NEXT"
|
||||
:query [:find (pull ?h [*])
|
||||
:in $ ?start ?next
|
||||
:where
|
||||
[?h :block/marker ?marker]
|
||||
[(contains? #{"NOW" "LATER" "TODO"} ?marker)]
|
||||
[?h :block/page ?p]
|
||||
[?p :block/journal-day ?d]
|
||||
[(> ?d ?start)]
|
||||
[(< ?d ?next)]]
|
||||
:inputs [:today :7d-after]
|
||||
:group-by-page? false
|
||||
:collapsed? false}]}
|
||||
|
||||
;; Add custom commands to the command palette
|
||||
;; Example usage:
|
||||
;; :commands
|
||||
;; [
|
||||
;; ["js" "Javascript"]
|
||||
;; ["md" "Markdown"]
|
||||
;; ]
|
||||
:commands []
|
||||
|
||||
;; Enable collapsing blocks with titles but no children.
|
||||
;; By default, only blocks with children can be collapsed.
|
||||
;; Setting `:outliner/block-title-collapse-enabled?` to true allows collapsing
|
||||
;; blocks with titles (multiple lines) and content. For example:
|
||||
;; - block title
|
||||
;; block content
|
||||
;; Default value: false
|
||||
:outliner/block-title-collapse-enabled? false
|
||||
|
||||
;; Macros replace texts and will make you more productive.
|
||||
;; Example usage:
|
||||
;; Change the :macros value below to:
|
||||
;; {"poem" "Rose is $1, violet's $2. Life's ordered: Org assists you."}
|
||||
;; input "{{poem red,blue}}"
|
||||
;; becomes
|
||||
;; Rose is red, violet's blue. Life's ordered: Org assists you.
|
||||
:macros
|
||||
{"docs-base-url" "https://docs.logseq.com/#/page/$1"}
|
||||
|
||||
;; Configure the default expansion level for linked references.
|
||||
;; For example, consider the following block hierarchy:
|
||||
;; - a [[page]] (level 1)
|
||||
;; - b (level 2)
|
||||
;; - c (level 3)
|
||||
;; - d (level 4)
|
||||
;;
|
||||
;; With the default value of level 2, block b will be collapsed.
|
||||
;; If the level's value is set to 3, block c will be collapsed.
|
||||
;; Default value: 2
|
||||
:ref/default-open-blocks-level 2
|
||||
|
||||
;; Graph view configuration.
|
||||
;; Example usage:
|
||||
;; :graph/settings
|
||||
;; {:orphan-pages? true ; Default value: true
|
||||
;; :builtin-pages? false ; Default value: false
|
||||
;; :excluded-pages? false ; Default value: false
|
||||
;; :journal? false} ; Default value: false
|
||||
|
||||
;; Favorites to list on the left sidebar
|
||||
:favorites ["Interstellar" "some page" "[[new page]]" "n1/x/y"]
|
||||
|
||||
;; Set flashcards interval.
|
||||
;; Expected value:
|
||||
;; - Float between 0 and 1
|
||||
;; higher values result in faster changes to the next review interval.
|
||||
;; Default value: 0.5
|
||||
;; :srs/learning-fraction 0.5
|
||||
|
||||
;; Set the initial interval after the first successful review of a card.
|
||||
;; Default value: 4
|
||||
;; :srs/initial-interval 4
|
||||
|
||||
;; Hide specific block properties.
|
||||
;; Example usage:
|
||||
;; :block-hidden-properties #{:public :icon}
|
||||
|
||||
;; Create a page for all properties.
|
||||
;; Default value: true
|
||||
:property-pages/enabled? true
|
||||
|
||||
;; Properties to exclude from having property pages
|
||||
;; Example usage:
|
||||
;; :property-pages/excludelist #{:duration :author}
|
||||
|
||||
;; By default, property value separated by commas will not be treated as
|
||||
;; page references. You can add properties to enable it.
|
||||
;; Example usage:
|
||||
;; :property/separated-by-commas #{:alias :tags}
|
||||
|
||||
;; Properties that are ignored when parsing property values for references
|
||||
;; Example usage:
|
||||
;; :ignored-page-references-keywords #{:author :website}
|
||||
|
||||
;; logbook configuration.
|
||||
;; :logbook/settings
|
||||
;; {:with-second-support? false ;limit logbook to minutes, seconds will be eliminated
|
||||
;; :enabled-in-all-blocks true ;display logbook in all blocks after timetracking
|
||||
;; :enabled-in-timestamped-blocks false ;don't display logbook at all
|
||||
;; }
|
||||
|
||||
;; Mobile photo upload configuration.
|
||||
;; :mobile/photo
|
||||
;; {:allow-editing? true
|
||||
;; :quality 80}
|
||||
|
||||
;; Mobile features options
|
||||
;; Gestures
|
||||
;; Example usage:
|
||||
;; :mobile
|
||||
;; {:gestures/disabled-in-block-with-tags ["kanban"]}
|
||||
|
||||
;; Extra CodeMirror options
|
||||
;; See https://codemirror.net/5/doc/manual.html#config for possible options
|
||||
;; Example usage:
|
||||
;; :editor/extra-codemirror-options
|
||||
;; {:lineWrapping false ; Default value: false
|
||||
;; :lineNumbers true ; Default value: true
|
||||
;; :readOnly false} ; Default value: false
|
||||
|
||||
;; Enable logical outdenting
|
||||
;; Default value: false
|
||||
;; :editor/logical-outdenting? false
|
||||
|
||||
;; Prefer pasting the file when text and a file are in the clipboard.
|
||||
;; Default value: false
|
||||
;; :editor/preferred-pasting-file? false
|
||||
|
||||
;; Quick capture templates for receiving content from other apps.
|
||||
;; Each template contains three elements {time}, {text} and {url}, which can be auto-expanded
|
||||
;; by receiving content from other apps. Note: the {} cannot be omitted.
|
||||
;; - {time}: capture time
|
||||
;; - {date}: capture date using current date format, use `[[{date}]]` to get a page reference
|
||||
;; - {text}: text that users selected before sharing.
|
||||
;; - {url}: URL or assets path for media files stored in Logseq.
|
||||
;; You can also reorder them or use only one or two of them in the template.
|
||||
;; You can also insert or format any text in the template, as shown in the following examples.
|
||||
;; :quick-capture-templates
|
||||
;; {:text "[[quick capture]] **{time}**: {text} from {url}"
|
||||
;; :media "[[quick capture]] **{time}**: {url}"}
|
||||
|
||||
;; Quick capture options.
|
||||
;; - insert-today? Insert the capture at the end of today's journal page (boolean).
|
||||
;; - redirect-page? Redirect to the quick capture page after capturing (boolean).
|
||||
;; - default-page The default page to capture to if insert-today? is false (string).
|
||||
;; - prettify-url? Whether urls to YouTube or X should be wrapped with {{video ...}} or {{twitter ...}}
|
||||
;; :quick-capture-options
|
||||
;; {:insert-today? false ;; Default value: true
|
||||
;; :redirect-page? false ;; Default value: false
|
||||
;; :default-page "quick capture" ;; Default page: "quick capture"
|
||||
;; :prettify-url? true} ;; Default value: true
|
||||
|
||||
|
||||
;; File sync options
|
||||
;; Ignore these files when syncing, regexp is supported.
|
||||
;; :file-sync/ignore-files []
|
||||
|
||||
;; Configure the Enter key behavior for
|
||||
;; context-aware editing with DWIM (Do What I Mean).
|
||||
;; context-aware Enter key behavior implies that pressing Enter will
|
||||
;; have different outcomes based on the context.
|
||||
;; For instance, pressing Enter within a list generates a new list item,
|
||||
;; whereas pressing Enter in a block reference opens the referenced block.
|
||||
;; :dwim/settings
|
||||
;; {:admonition&src? true ;; Default value: true
|
||||
;; :markup? false ;; Default value: false
|
||||
;; :block-ref? true ;; Default value: true
|
||||
;; :page-ref? true ;; Default value: true
|
||||
;; :properties? true ;; Default value: true
|
||||
;; :list? false} ;; Default value: false
|
||||
|
||||
;; Configure the escaping method for special characters in page titles.
|
||||
;; Warning:
|
||||
;; This is a dangerous operation. To modify the setting,
|
||||
;; access the 'Filename format' setting and follow the instructions.
|
||||
;; Otherwise, You may need to manually rename all affected files and
|
||||
;; re-index them on all clients after synchronization.
|
||||
;; Incorrect handling may result in messy page titles.
|
||||
;; Available options:
|
||||
;; - :triple-lowbar (default)
|
||||
;; ;use triple underscore `___` for slash `/` in page title
|
||||
;; ;use Percent-encoding for other invalid characters
|
||||
|
||||
;; use relative path here only for ci test, won't work on the Electron client
|
||||
:zotero/settings-v2 {"default" {:type-id "1234567", :prefer-citekey? false, :attachments-block-text "Attachments", :page-insert-prefix "", :extra-tags "", :zotero-linked-attachment-base-directory "../book", :zotero-data-directory "../zotero"}}
|
||||
:file/name-format :triple-lowbar}
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/logseq/custom.css
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/logseq/custom.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.foo {}
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/logseq/custom.js
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/logseq/custom.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
logseq.api.show_msg('hello good sir!');
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/logseq/srs-of-matrix.edn
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/logseq/srs-of-matrix.edn
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{0 {2.5 3.45}}
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/pages/CreativeWork.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/pages/CreativeWork.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
parent:: [[Thing]]
|
||||
|
||||
- block with date property value that doesn't have the same format as the current date format
|
||||
misconfigured-date:: [[2021_12_06]]
|
||||
3
deps/graph-parser/test/resources/exporter-test-graph/pages/Interstellar.md
vendored
Normal file
3
deps/graph-parser/test/resources/exporter-test-graph/pages/Interstellar.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
tags:: Movie
|
||||
|
||||
-
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Library.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Library.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
type:: [[Class]]
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Movie.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Movie.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
parent:: [[CreativeWork]]
|
||||
2
deps/graph-parser/test/resources/exporter-test-graph/pages/Priority.md
vendored
Normal file
2
deps/graph-parser/test/resources/exporter-test-graph/pages/Priority.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
parent:: [[HumanConcept]]
|
||||
- this page triggers bug with a class created via :parent that is then used by :type
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Property.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Property.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
parent:: [[Thing]]
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Task.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Task.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
- Notes not about new Task class
|
||||
5
deps/graph-parser/test/resources/exporter-test-graph/pages/Understanding EXPLAIN.md
vendored
Normal file
5
deps/graph-parser/test/resources/exporter-test-graph/pages/Understanding EXPLAIN.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
- Attachments
|
||||
- [Understanding EXPLAIN.pdf](zotero://select/library/items/QDM8H6EH) {{zotero-linked-file "it/Understanding EXPLAIN.pdf"}}
|
||||
- Notes
|
||||
- ((697874ba-26e9-4e8a-a55d-0639d337dcc6)) definition
|
||||
- ((69787518-9eb8-4fd0-ad3b-b394e28bb547)) select
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Whiteboard___Arrow_head_toggle.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/Whiteboard___Arrow_head_toggle.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
type:: [[Tool]]
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/pages/Whiteboard___Tool.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/pages/Whiteboard___Tool.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
alias:: Whiteboard tool, Tool, Tools
|
||||
type:: [[Class]]
|
||||
parent:: [[Feature]]
|
||||
description:: Tools on the [[Whiteboard/Toolbar]]
|
||||
6
deps/graph-parser/test/resources/exporter-test-graph/pages/chat-gpt.md
vendored
Normal file
6
deps/graph-parser/test/resources/exporter-test-graph/pages/chat-gpt.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
filters:: {"oct 9th, 2024" true, "ref2" false}
|
||||
type:: [[LargeLanguageModel]]
|
||||
tags:: ai, #fun, [[LargeLanguageModel]]
|
||||
alias:: gpt
|
||||
|
||||
- some text
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/contents.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/contents.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
-
|
||||
@@ -0,0 +1,16 @@
|
||||
file:: [Sina_de_Capoeria_Batizado_2025_-_Program_Itinerary_1752179325104_0.pdf](../assets/Sina_de_Capoeria_Batizado_2025_-_Program_Itinerary_1752179325104_0.pdf)
|
||||
file-path:: ../assets/Sina_de_Capoeria_Batizado_2025_-_Program_Itinerary_1752179325104_0.pdf
|
||||
|
||||
- id:: 687022ae-dac1-42a6-9d4c-39a0dba05918
|
||||
ls-type:: annotation
|
||||
hl-page:: 1
|
||||
hl-color:: yellow
|
||||
hl-type:: area
|
||||
hl-stamp:: 1752179374600
|
||||
- Duke School - modified
|
||||
hl-page:: 8
|
||||
ls-type:: annotation
|
||||
id:: 68702394-3613-4bac-85a7-28643d58237f
|
||||
hl-color:: blue
|
||||
- note about duke
|
||||
- sub note
|
||||
20
deps/graph-parser/test/resources/exporter-test-graph/pages/hls__Understanding EXPLAIN.md
vendored
Normal file
20
deps/graph-parser/test/resources/exporter-test-graph/pages/hls__Understanding EXPLAIN.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
file:: [Understanding EXPLAIN.pdf](../../book/it/Understanding EXPLAIN.pdf)
|
||||
file-path:: ../../book/it/Understanding EXPLAIN.pdf
|
||||
|
||||
- EXPLAIN is a really nice command that gives you lots of information but it's often easy to not know what to do with all this
|
||||
ls-type:: annotation
|
||||
hl-page:: 6
|
||||
hl-color:: yellow
|
||||
id:: 697874ba-26e9-4e8a-a55d-0639d337dcc6
|
||||
- [:span]
|
||||
ls-type:: annotation
|
||||
hl-page:: 8
|
||||
hl-color:: green
|
||||
id:: 69787518-9eb8-4fd0-ad3b-b394e28bb547
|
||||
hl-type:: area
|
||||
hl-stamp:: 1769501975346
|
||||
- Conclusion
|
||||
ls-type:: annotation
|
||||
hl-page:: 42
|
||||
hl-color:: blue
|
||||
id:: 69787540-7a52-40af-a70a-cedd315934cf
|
||||
15
deps/graph-parser/test/resources/exporter-test-graph/pages/hls__zlib.md
vendored
Normal file
15
deps/graph-parser/test/resources/exporter-test-graph/pages/hls__zlib.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
file:: [zlib.pdf](../../zotero/RX5JS7SY/zlib.pdf)
|
||||
file-path:: ../../zotero/storage/RX5JS7SY/zlib.pdf
|
||||
|
||||
- The zlib library is a general purpose data compression library.
|
||||
ls-type:: annotation
|
||||
hl-page:: 1
|
||||
hl-color:: red
|
||||
id:: 69787399-f51c-45a2-8971-78dc6c66a0ec
|
||||
- [:span]
|
||||
ls-type:: annotation
|
||||
hl-page:: 1
|
||||
hl-color:: blue
|
||||
id:: 697873d7-5953-4753-897e-62ac47348634
|
||||
hl-type:: area
|
||||
hl-stamp:: 1769501651181
|
||||
0
deps/graph-parser/test/resources/exporter-test-graph/pages/ignored.edn
vendored
Normal file
0
deps/graph-parser/test/resources/exporter-test-graph/pages/ignored.edn
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/later.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/later.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
type:: [[Priority]]
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/pages/n1___x___y.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/pages/n1___x___y.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
alias:: y
|
||||
description:: page property triggers aliased namespace bug
|
||||
|
||||
- some content
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/pages/new page.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/pages/new page.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
prop-num2:: 10
|
||||
|
||||
- test if pre-block child causes issue
|
||||
- grandchild test
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/page with #tag.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/page with #tag.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
- HA
|
||||
6
deps/graph-parser/test/resources/exporter-test-graph/pages/some page.md
vendored
Normal file
6
deps/graph-parser/test/resources/exporter-test-graph/pages/some page.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
prop-string:: yeehaw
|
||||
prop-num:: 5
|
||||
prop-bool:: true
|
||||
tags:: [[Some / Namespace ]]
|
||||
|
||||
- has some content
|
||||
1
deps/graph-parser/test/resources/exporter-test-graph/pages/type.md
vendored
Normal file
1
deps/graph-parser/test/resources/exporter-test-graph/pages/type.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
url:: http://www.w3.org/1999/02/22-rdf-syntax-ns#type
|
||||
6
deps/graph-parser/test/resources/exporter-test-graph/pages/unlinked-highlights.md
vendored
Normal file
6
deps/graph-parser/test/resources/exporter-test-graph/pages/unlinked-highlights.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
- This is a highlights page that doesn't start with 'hls__' and isn't linked to a specific asset file
|
||||
- blarg blarg
|
||||
ls-type:: annotation
|
||||
hl-page:: 110
|
||||
hl-color:: purple
|
||||
id:: 654bafc6-f7e8-4633-b6a6-810dc41cc559
|
||||
4
deps/graph-parser/test/resources/exporter-test-graph/pages/url.md
vendored
Normal file
4
deps/graph-parser/test/resources/exporter-test-graph/pages/url.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
type:: [[Property]]
|
||||
url:: {{docs-base-url url}}
|
||||
sameAs:: https://schema.org/url
|
||||
rangeIncludes:: [[Property]]
|
||||
5
deps/graph-parser/test/resources/exporter-test-graph/pages/zlib.md
vendored
Normal file
5
deps/graph-parser/test/resources/exporter-test-graph/pages/zlib.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
- Attachments
|
||||
- [PDF](zotero://select/library/items/RX5JS7SY) {{zotero-imported-file RX5JS7SY, "zlib.pdf"}}
|
||||
- Notes
|
||||
- ((69787399-f51c-45a2-8971-78dc6c66a0ec)) definition
|
||||
- ((697873d7-5953-4753-897e-62ac47348634)) links
|
||||
125
deps/graph-parser/test/resources/exporter-test-graph/whiteboards/block tests.edn
vendored
Normal file
125
deps/graph-parser/test/resources/exporter-test-graph/whiteboards/block tests.edn
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
{:blocks ({:block/title "block with page ref [[some page]]"
|
||||
:block/created-at 1720805247589
|
||||
:block/format :markdown
|
||||
:block/parent
|
||||
{:block/uuid #uuid "6691676f-2eed-4619-b56a-69fd7d572c59"}
|
||||
:block/properties
|
||||
{}
|
||||
:block/updated-at 1720809014394
|
||||
:block/uuid #uuid "6691677f-c208-4c83-aa40-6efc4286100c"}
|
||||
{:block/created-at 1721935480784
|
||||
:block/properties
|
||||
{:ls-type :whiteboard-shape
|
||||
:logseq.tldraw.shape
|
||||
{:blockType "B"
|
||||
:stroke ""
|
||||
:collapsed false
|
||||
:borderRadius 8
|
||||
:scale [1 1]
|
||||
:pageId "6691677f-c208-4c83-aa40-6efc4286100c"
|
||||
:scaleLevel "md"
|
||||
:fill ""
|
||||
:compact true
|
||||
:isAutoResizing true
|
||||
:type "logseq-portal"
|
||||
:size [400 124.9781494140625]
|
||||
:strokeType "line"
|
||||
:strokeWidth 2
|
||||
:opacity 1
|
||||
:id "01b33340-4074-11ef-956e-7d9aebf284ae"
|
||||
:noFill false
|
||||
:point [430.41563108563423 233.00156784057617]
|
||||
:parentId "6691676f-2eed-4619-b56a-69fd7d572c59"
|
||||
:collapsedHeight 0
|
||||
:nonce 1720805246071
|
||||
:pageName nil}}
|
||||
:block/updated-at 1721935480784}
|
||||
{:block/title "block with block ref ((669168ed-8734-4943-8a86-5e3a553a526d))"
|
||||
:block/created-at 1720808993012
|
||||
:block/format :markdown
|
||||
:block/parent
|
||||
{:block/uuid #uuid "6691676f-2eed-4619-b56a-69fd7d572c59"}
|
||||
:block/properties
|
||||
{}
|
||||
:block/updated-at 1720809157098
|
||||
:block/uuid #uuid "66917621-93ae-475b-aa4c-6ae9e797cf68"}
|
||||
{:block/properties
|
||||
{:ls-type :whiteboard-shape
|
||||
:logseq.tldraw.shape
|
||||
{:blockType "B"
|
||||
:stroke ""
|
||||
:collapsed false
|
||||
:borderRadius 8
|
||||
:scale [1 1]
|
||||
:pageId "66917621-93ae-475b-aa4c-6ae9e797cf68"
|
||||
:scaleLevel "md"
|
||||
:fill ""
|
||||
:compact true
|
||||
:isAutoResizing true
|
||||
:type "logseq-portal"
|
||||
:size [400 79.9781265258789]
|
||||
:strokeType "line"
|
||||
:strokeWidth 2
|
||||
:opacity 1
|
||||
:id "b999ee10-407c-11ef-956e-7d9aebf284ae"
|
||||
:noFill false
|
||||
:point [478.6382088826831 337.7821947259741]
|
||||
:parentId "6691676f-2eed-4619-b56a-69fd7d572c59"
|
||||
:collapsedHeight 0
|
||||
:nonce 1720808990579
|
||||
:pageName nil}}
|
||||
:block/updated-at 1720809157310
|
||||
:block/created-at 1720809157310}
|
||||
{:block/title "block with props\nprop-num:: 10"
|
||||
:block/created-at 1721935480737
|
||||
:block/format :markdown
|
||||
:block/parent
|
||||
{:block/uuid #uuid "6691676f-2eed-4619-b56a-69fd7d572c59"}
|
||||
:block/properties
|
||||
{:prop-num 10}
|
||||
:block/updated-at 1721935504617
|
||||
:block/uuid #uuid "66a2a678-1cea-44b6-a458-4b8c15e18a8d"}
|
||||
{:block/properties
|
||||
{:ls-type :whiteboard-shape
|
||||
:logseq.tldraw.shape
|
||||
{:blockType "B"
|
||||
:stroke ""
|
||||
:collapsed false
|
||||
:borderRadius 8
|
||||
:scale [1 1]
|
||||
:pageId "66a2a678-1cea-44b6-a458-4b8c15e18a8d"
|
||||
:scaleLevel "md"
|
||||
:fill ""
|
||||
:compact true
|
||||
:isAutoResizing true
|
||||
:type "logseq-portal"
|
||||
:size [400 320]
|
||||
:strokeType "line"
|
||||
:strokeWidth 2
|
||||
:opacity 1
|
||||
:id "86f86420-4abb-11ef-9161-b98dd17dbef1"
|
||||
:noFill false
|
||||
:point [648.5671437694965 179.003191006195]
|
||||
:parentId "6691676f-2eed-4619-b56a-69fd7d572c59"
|
||||
:collapsedHeight 0
|
||||
:nonce 1721935475555
|
||||
:pageName nil}}
|
||||
:block/updated-at 1721935504609
|
||||
:block/created-at 1721935504609})
|
||||
:pages ({:block/tx-id 536871657
|
||||
:block/uuid #uuid "6691676f-2eed-4619-b56a-69fd7d572c59"
|
||||
:block/properties
|
||||
{:ls-type :whiteboard-page
|
||||
:logseq.tldraw.page
|
||||
{:id "6691676f-2eed-4619-b56a-69fd7d572c59"
|
||||
:name "ref page"
|
||||
:bindings
|
||||
{}
|
||||
:nonce 1
|
||||
:assets []}}
|
||||
:block/updated-at 1721935504609
|
||||
:block/created-at 1720805231835
|
||||
:block/format :markdown
|
||||
:block/type "whiteboard"
|
||||
:block/name "ref page"
|
||||
:block/title "ref page"})}
|
||||
BIN
deps/graph-parser/test/resources/zotero/storage/RX5JS7SY/zlib.pdf
vendored
Normal file
BIN
deps/graph-parser/test/resources/zotero/storage/RX5JS7SY/zlib.pdf
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user