mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
fix: remove file graph imports
Remove mention of removed JSON import in descriptions. Also mv frontend.util.fs to where they are used instead of keeping an outdated file ns
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
[logseq.db.file-based.schema :as file-schema]
|
[logseq.db.file-based.schema :as file-schema]
|
||||||
[logseq.graph-parser.extract :as extract]))
|
[logseq.graph-parser.extract :as extract]))
|
||||||
|
|
||||||
;; This is a copy of frontend.util.fs/multiplatform-reserved-chars for reserved chars testing
|
;; This is a copy of frontend.components.repo/multiplatform-reserved-chars for reserved chars testing
|
||||||
(def multiplatform-reserved-chars ":\\*\\?\"<>|\\#\\\\")
|
(def multiplatform-reserved-chars ":\\*\\?\"<>|\\#\\\\")
|
||||||
|
|
||||||
;; Stuffs should be parsable (don't crash) when users dump some random files
|
;; Stuffs should be parsable (don't crash) when users dump some random files
|
||||||
|
|||||||
@@ -39,8 +39,7 @@
|
|||||||
"frontend.worker.file"
|
"frontend.worker.file"
|
||||||
"frontend.fs"
|
"frontend.fs"
|
||||||
"frontend.components.file-sync"
|
"frontend.components.file-sync"
|
||||||
"frontend.components.file-based"
|
"frontend.components.file-based"]))
|
||||||
"frontend.util.fs"]))
|
|
||||||
|
|
||||||
(def block-name-db-graph-paths
|
(def block-name-db-graph-paths
|
||||||
"DB graph paths with :block/name"
|
"DB graph paths with :block/name"
|
||||||
@@ -78,8 +77,7 @@
|
|||||||
["deps/db/src/logseq/db/file_based"
|
["deps/db/src/logseq/db/file_based"
|
||||||
"deps/graph-parser/src/logseq/graph_parser/extract.cljc"
|
"deps/graph-parser/src/logseq/graph_parser/extract.cljc"
|
||||||
"deps/graph-parser/src/logseq/graph_parser/property.cljs"
|
"deps/graph-parser/src/logseq/graph_parser/property.cljs"
|
||||||
"src/main/frontend/fs"
|
"src/main/frontend/fs"])
|
||||||
"src/main/frontend/util/fs.cljs"])
|
|
||||||
|
|
||||||
(defn- grep-many
|
(defn- grep-many
|
||||||
"Git greps a coll of patterns for given paths. Returns result from process/shell"
|
"Git greps a coll of patterns for given paths. Returns result from process/shell"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
(ns frontend.components.imports
|
(ns frontend.components.imports
|
||||||
"Import data into Logseq."
|
"Import data into Logseq."
|
||||||
(:require [cljs-time.core :as t]
|
(:require ["path" :as node-path]
|
||||||
|
[cljs-time.core :as t]
|
||||||
[cljs.pprint :as pprint]
|
[cljs.pprint :as pprint]
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[datascript.core :as d]
|
[datascript.core :as d]
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
[frontend.handler.assets :as assets-handler]
|
[frontend.handler.assets :as assets-handler]
|
||||||
[frontend.handler.db-based.editor :as db-editor-handler]
|
[frontend.handler.db-based.editor :as db-editor-handler]
|
||||||
[frontend.handler.db-based.import :as db-import-handler]
|
[frontend.handler.db-based.import :as db-import-handler]
|
||||||
[frontend.handler.import :as import-handler]
|
|
||||||
[frontend.handler.notification :as notification]
|
[frontend.handler.notification :as notification]
|
||||||
[frontend.handler.repo :as repo-handler]
|
[frontend.handler.repo :as repo-handler]
|
||||||
[frontend.handler.route :as route-handler]
|
[frontend.handler.route :as route-handler]
|
||||||
@@ -24,9 +24,7 @@
|
|||||||
[frontend.state :as state]
|
[frontend.state :as state]
|
||||||
[frontend.ui :as ui]
|
[frontend.ui :as ui]
|
||||||
[frontend.util :as util]
|
[frontend.util :as util]
|
||||||
[frontend.util.fs :as fs-util]
|
|
||||||
[goog.functions :refer [debounce]]
|
[goog.functions :refer [debounce]]
|
||||||
[goog.object :as gobj]
|
|
||||||
[lambdaisland.glogi :as log]
|
[lambdaisland.glogi :as log]
|
||||||
[logseq.common.config :as common-config]
|
[logseq.common.config :as common-config]
|
||||||
[logseq.common.path :as path]
|
[logseq.common.path :as path]
|
||||||
@@ -40,8 +38,32 @@
|
|||||||
[promesa.core :as p]
|
[promesa.core :as p]
|
||||||
[rum.core :as rum]))
|
[rum.core :as rum]))
|
||||||
|
|
||||||
;; Can't name this component as `frontend.components.import` since shadow-cljs
|
(defn- ignored-path?
|
||||||
;; will complain about it.
|
"Ignore path for ls-dir-files-with-handler! and reload-dir!"
|
||||||
|
[dir path]
|
||||||
|
(let [ignores ["." ".recycle" "node_modules" "logseq/bak"
|
||||||
|
"logseq/version-files" "logseq/graphs-txid.edn"]]
|
||||||
|
(when (string? path)
|
||||||
|
(or
|
||||||
|
(some #(string/starts-with? path
|
||||||
|
(if (= dir "")
|
||||||
|
%
|
||||||
|
(str dir "/" %))) ignores)
|
||||||
|
(some #(string/includes? path (if (= dir "")
|
||||||
|
(str "/" % "/")
|
||||||
|
(str % "/"))) ignores)
|
||||||
|
(some #(string/ends-with? path %)
|
||||||
|
[".DS_Store" "logseq/graphs-txid.edn"])
|
||||||
|
;; hidden directory or file
|
||||||
|
(let [relpath (node-path/relative dir path)]
|
||||||
|
(or (re-find #"/\.[^.]+" relpath)
|
||||||
|
(re-find #"^\.[^.]+" relpath)))
|
||||||
|
(let [path (string/lower-case path)]
|
||||||
|
(and
|
||||||
|
(not (string/blank? (node-path/extname path)))
|
||||||
|
(not
|
||||||
|
(some #(string/ends-with? path %)
|
||||||
|
[".md" ".markdown" ".org" ".js" ".edn" ".css"]))))))))
|
||||||
|
|
||||||
(defn- finished-cb
|
(defn- finished-cb
|
||||||
[]
|
[]
|
||||||
@@ -54,11 +76,7 @@
|
|||||||
|
|
||||||
(defn- lsq-import-handler
|
(defn- lsq-import-handler
|
||||||
[e & {:keys [sqlite? debug-transit? graph-name db-edn?]}]
|
[e & {:keys [sqlite? debug-transit? graph-name db-edn?]}]
|
||||||
(let [file (first (array-seq (.-files (.-target e))))
|
(let [file (first (array-seq (.-files (.-target e))))]
|
||||||
file-name (some-> (gobj/get file "name")
|
|
||||||
(string/lower-case))
|
|
||||||
edn? (string/ends-with? file-name ".edn")
|
|
||||||
json? (string/ends-with? file-name ".json")]
|
|
||||||
(cond
|
(cond
|
||||||
sqlite?
|
sqlite?
|
||||||
(let [graph-name (string/trim graph-name)]
|
(let [graph-name (string/trim graph-name)]
|
||||||
@@ -111,23 +129,6 @@
|
|||||||
(shui/dialog-close-all!))))))
|
(shui/dialog-close-all!))))))
|
||||||
(.readAsText reader file)))))
|
(.readAsText reader file)))))
|
||||||
|
|
||||||
(or edn? json?)
|
|
||||||
(do
|
|
||||||
(state/set-state! :graph/importing :logseq)
|
|
||||||
(let [reader (js/FileReader.)
|
|
||||||
import-f (if edn?
|
|
||||||
import-handler/import-from-edn!
|
|
||||||
import-handler/import-from-json!)]
|
|
||||||
(set! (.-onload reader)
|
|
||||||
(fn [e]
|
|
||||||
(let [text (.. e -target -result)]
|
|
||||||
(import-f
|
|
||||||
text
|
|
||||||
#(do
|
|
||||||
(state/set-state! :graph/importing nil)
|
|
||||||
(finished-cb))))))
|
|
||||||
(.readAsText reader file)))
|
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(notification/show! "Please choose an EDN or a JSON file."
|
(notification/show! "Please choose an EDN or a JSON file."
|
||||||
:error))))
|
:error))))
|
||||||
@@ -396,7 +397,7 @@
|
|||||||
:path (path/trim-dir-prefix original-graph-name (.-webkitRelativePath %))))
|
:path (path/trim-dir-prefix original-graph-name (.-webkitRelativePath %))))
|
||||||
(remove #(and (not (string/starts-with? (:path %) "assets/"))
|
(remove #(and (not (string/starts-with? (:path %) "assets/"))
|
||||||
;; TODO: Update this when supporting more formats as this aggressively excludes most formats
|
;; TODO: Update this when supporting more formats as this aggressively excludes most formats
|
||||||
(fs-util/ignored-path? original-graph-name (.-webkitRelativePath (:file-object %))))))]
|
(ignored-path? original-graph-name (.-webkitRelativePath (:file-object %))))))]
|
||||||
(if-let [config-file (first (filter #(= (:path %) "logseq/config.edn") files))]
|
(if-let [config-file (first (filter #(= (:path %) "logseq/config.edn") files))]
|
||||||
(import-file-graph files user-inputs config-file)
|
(import-file-graph files user-inputs config-file)
|
||||||
(notification/show! "Import failed as the file 'logseq/config.edn' was not found for a Logseq graph."
|
(notification/show! "Import failed as the file 'logseq/config.edn' was not found for a Logseq graph."
|
||||||
@@ -444,6 +445,8 @@
|
|||||||
[importing?])
|
[importing?])
|
||||||
[:<>])
|
[:<>])
|
||||||
|
|
||||||
|
;; Can't name this component as `frontend.components.import` since shadow-cljs
|
||||||
|
;; will complain about it.
|
||||||
(rum/defc ^:large-vars/cleanup-todo importer < rum/reactive
|
(rum/defc ^:large-vars/cleanup-todo importer < rum/reactive
|
||||||
[{:keys [query-params]}]
|
[{:keys [query-params]}]
|
||||||
(let [importing? (state/sub :graph/importing)]
|
(let [importing? (state/sub :graph/importing)]
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
[frontend.state :as state]
|
[frontend.state :as state]
|
||||||
[frontend.ui :as ui]
|
[frontend.ui :as ui]
|
||||||
[frontend.util :as util]
|
[frontend.util :as util]
|
||||||
[frontend.util.fs :as fs-util]
|
|
||||||
[frontend.util.text :as text-util]
|
[frontend.util.text :as text-util]
|
||||||
[goog.object :as gobj]
|
[goog.object :as gobj]
|
||||||
[lambdaisland.glogi :as log]
|
[lambdaisland.glogi :as log]
|
||||||
|
[logseq.common.util :as common-util]
|
||||||
[logseq.shui.hooks :as hooks]
|
[logseq.shui.hooks :as hooks]
|
||||||
[logseq.shui.ui :as shui]
|
[logseq.shui.ui :as shui]
|
||||||
[medley.core :as medley]
|
[medley.core :as medley]
|
||||||
@@ -394,6 +394,17 @@
|
|||||||
[:strong short-repo-name]
|
[:strong short-repo-name]
|
||||||
(shui/tabler-icon "selector" {:size 18})]]))
|
(shui/tabler-icon "selector" {:size 18})]]))
|
||||||
|
|
||||||
|
;; Update invalid-graph-name-warning if characters change
|
||||||
|
(def multiplatform-reserved-chars ":\\*\\?\"<>|\\#\\\\")
|
||||||
|
|
||||||
|
(def reserved-chars-pattern
|
||||||
|
(re-pattern (str "[" multiplatform-reserved-chars "]+")))
|
||||||
|
|
||||||
|
(defn include-reserved-chars?
|
||||||
|
"Includes reserved characters that would broken FS"
|
||||||
|
[s]
|
||||||
|
(common-util/safe-re-find reserved-chars-pattern s))
|
||||||
|
|
||||||
(defn invalid-graph-name-warning
|
(defn invalid-graph-name-warning
|
||||||
[]
|
[]
|
||||||
(notification/show!
|
(notification/show!
|
||||||
@@ -417,7 +428,7 @@
|
|||||||
(defn invalid-graph-name?
|
(defn invalid-graph-name?
|
||||||
"Returns boolean indicating if DB graph name is invalid. Must be kept in sync with invalid-graph-name-warning"
|
"Returns boolean indicating if DB graph name is invalid. Must be kept in sync with invalid-graph-name-warning"
|
||||||
[graph-name]
|
[graph-name]
|
||||||
(or (fs-util/include-reserved-chars? graph-name)
|
(or (include-reserved-chars? graph-name)
|
||||||
(string/includes? graph-name "+")
|
(string/includes? graph-name "+")
|
||||||
(string/includes? graph-name "/")))
|
(string/includes? graph-name "/")))
|
||||||
|
|
||||||
|
|||||||
@@ -154,16 +154,6 @@
|
|||||||
(assert (integer? eid))
|
(assert (integer? eid))
|
||||||
(state/<invoke-db-worker :thread-api/get-block-refs-count graph eid))
|
(state/<invoke-db-worker :thread-api/get-block-refs-count graph eid))
|
||||||
|
|
||||||
(defn <get-all-referenced-blocks-uuid
|
|
||||||
"Get all uuids of blocks with any back link exists."
|
|
||||||
[graph]
|
|
||||||
(<q graph {:transact-db? false}
|
|
||||||
'[:find [?refed-uuid ...]
|
|
||||||
:where
|
|
||||||
;; ?referee-b is block with ref towards ?refed-b
|
|
||||||
[?refed-b :block/uuid ?refed-uuid]
|
|
||||||
[?referee-b :block/refs ?refed-b]]))
|
|
||||||
|
|
||||||
(defn <get-date-scheduled-or-deadlines
|
(defn <get-date-scheduled-or-deadlines
|
||||||
[journal-title]
|
[journal-title]
|
||||||
(when-let [date (date/journal-title->int journal-title)]
|
(when-let [date (date/journal-title->int journal-title)]
|
||||||
|
|||||||
@@ -1,171 +0,0 @@
|
|||||||
(ns frontend.handler.import
|
|
||||||
"Fns related to import from external services"
|
|
||||||
(:require [cljs.core.async.interop :refer [p->c]]
|
|
||||||
[clojure.core.async :as async]
|
|
||||||
[clojure.edn :as edn]
|
|
||||||
[clojure.string :as string]
|
|
||||||
[clojure.walk :as walk]
|
|
||||||
[frontend.db :as db]
|
|
||||||
[frontend.db.async :as db-async]
|
|
||||||
[frontend.handler.editor :as editor]
|
|
||||||
[frontend.handler.notification :as notification]
|
|
||||||
[frontend.handler.page :as page-handler]
|
|
||||||
[frontend.state :as state]
|
|
||||||
[frontend.util :as util]
|
|
||||||
[logseq.graph-parser.whiteboard :as gp-whiteboard]
|
|
||||||
[medley.core :as medley]
|
|
||||||
[promesa.core :as p]))
|
|
||||||
|
|
||||||
(defn create-page-with-exported-tree!
|
|
||||||
"Create page from the per page object generated in `export-repo-as-edn-v2!`
|
|
||||||
Return page-name (title)
|
|
||||||
Extension to `insert-block-tree-after-target`
|
|
||||||
:id - page's uuid
|
|
||||||
:title - page's title (original name)
|
|
||||||
:children - tree
|
|
||||||
:properties - map
|
|
||||||
"
|
|
||||||
[{:keys [type uuid title children properties] :as tree}]
|
|
||||||
(let [title (string/trim title)
|
|
||||||
has-children? (seq children)
|
|
||||||
page-format (or (some-> tree (:children) (first) (:format)) :markdown)
|
|
||||||
whiteboard? (= type "whiteboard")]
|
|
||||||
(p/do!
|
|
||||||
(try (page-handler/<create! title {:redirect? false
|
|
||||||
:format page-format
|
|
||||||
:uuid uuid
|
|
||||||
:properties properties
|
|
||||||
:whiteboard? whiteboard?})
|
|
||||||
(catch :default e
|
|
||||||
(js/console.error e)
|
|
||||||
(prn {:tree tree})
|
|
||||||
(notification/show! (str "Error happens when creating page " title ":\n"
|
|
||||||
e
|
|
||||||
"\nSkipped and continue the remaining import.") :error)))
|
|
||||||
(when has-children?
|
|
||||||
(let [page-name (util/page-name-sanity-lc title)
|
|
||||||
page-block (db/get-page page-name)]
|
|
||||||
;; Missing support for per block format (or deprecated?)
|
|
||||||
(try (if whiteboard?
|
|
||||||
;; only works for file graph :block/properties
|
|
||||||
(let [blocks (->> children
|
|
||||||
(map (partial medley/map-keys (fn [k] (keyword "block" k))))
|
|
||||||
(map gp-whiteboard/migrate-shape-block)
|
|
||||||
(map #(merge % (gp-whiteboard/with-whiteboard-block-props % [:block/uuid uuid]))))]
|
|
||||||
(db/transact! blocks))
|
|
||||||
(editor/insert-block-tree children page-format
|
|
||||||
{:target-block page-block
|
|
||||||
:sibling? false
|
|
||||||
:keep-uuid? true}))
|
|
||||||
(catch :default e
|
|
||||||
(js/console.error e)
|
|
||||||
(prn {:tree tree})
|
|
||||||
(notification/show! (str "Error happens when creating block content of page " title "\n"
|
|
||||||
e
|
|
||||||
"\nSkipped and continue the remaining import.") :error)))))))
|
|
||||||
title)
|
|
||||||
|
|
||||||
(defn- pre-transact-uuids!
|
|
||||||
"Collect all uuids from page trees and write them to the db before hand."
|
|
||||||
[pages]
|
|
||||||
(let [uuids (mapv (fn [block]
|
|
||||||
{:block/uuid (:uuid block)})
|
|
||||||
(mapcat #(tree-seq map? :children %)
|
|
||||||
pages))]
|
|
||||||
(db/transact! uuids)))
|
|
||||||
|
|
||||||
(defn- import-from-tree!
|
|
||||||
"Not rely on file system - backend compatible.
|
|
||||||
tree-translator-fn: translate exported tree structure to the desired tree for import"
|
|
||||||
[data tree-translator-fn]
|
|
||||||
(let [imported-chan (async/promise-chan)]
|
|
||||||
(try
|
|
||||||
(let [blocks (->> (:blocks data)
|
|
||||||
(mapv tree-translator-fn)
|
|
||||||
(sort-by :title)
|
|
||||||
(medley/indexed))
|
|
||||||
job-chan (async/to-chan! blocks)]
|
|
||||||
(state/set-state! [:graph/importing-state :total] (count blocks))
|
|
||||||
(pre-transact-uuids! blocks)
|
|
||||||
(async/go-loop []
|
|
||||||
(if-let [[i block] (async/<! job-chan)]
|
|
||||||
(do
|
|
||||||
(state/set-state! [:graph/importing-state :current-idx] (inc i))
|
|
||||||
(state/set-state! [:graph/importing-state :current-page] (:title block))
|
|
||||||
(async/<! (async/timeout 10))
|
|
||||||
(create-page-with-exported-tree! block)
|
|
||||||
(recur))
|
|
||||||
(let [_result (async/<! (p->c (db-async/<get-all-referenced-blocks-uuid (state/get-current-repo))))]
|
|
||||||
(async/offer! imported-chan true)))))
|
|
||||||
|
|
||||||
(catch :default e
|
|
||||||
(notification/show! (str "Error happens when importing:\n" e) :error)
|
|
||||||
(async/offer! imported-chan true)))))
|
|
||||||
|
|
||||||
(defn tree-vec-translate-edn
|
|
||||||
"Actions to do for loading edn tree structure.
|
|
||||||
1) Removes namespace `:block/` from all levels of the `tree-vec`
|
|
||||||
2) Rename all :block/page-name to :title
|
|
||||||
3) Rename all :block/id to :uuid"
|
|
||||||
([tree-vec]
|
|
||||||
(let [kw-trans-fn #(-> %
|
|
||||||
str
|
|
||||||
(string/replace ":block/page-name" ":block/title")
|
|
||||||
(string/replace ":block/id" ":block/uuid")
|
|
||||||
(string/replace ":block/" "")
|
|
||||||
keyword)
|
|
||||||
map-trans-fn (fn [acc k v]
|
|
||||||
(assoc acc (kw-trans-fn k) v))
|
|
||||||
tree-trans-fn (fn [form]
|
|
||||||
(if (and (map? form)
|
|
||||||
(:block/id form))
|
|
||||||
(reduce-kv map-trans-fn {} form)
|
|
||||||
form))]
|
|
||||||
(walk/postwalk tree-trans-fn tree-vec))))
|
|
||||||
|
|
||||||
(defn import-from-edn!
|
|
||||||
[raw finished-ok-handler]
|
|
||||||
(try
|
|
||||||
(let [data (edn/read-string raw)]
|
|
||||||
(async/go
|
|
||||||
(async/<! (import-from-tree! data tree-vec-translate-edn))
|
|
||||||
(finished-ok-handler nil)))
|
|
||||||
(catch :default e
|
|
||||||
(js/console.error e)
|
|
||||||
(notification/show!
|
|
||||||
(str (.-message e))
|
|
||||||
:error)))) ;; it was designed to accept a list of imported page names but now deprecated
|
|
||||||
|
|
||||||
(defn tree-vec-translate-json
|
|
||||||
"Actions to do for loading json tree structure.
|
|
||||||
1) Rename all :id to :uuid
|
|
||||||
2) Rename all :page-name to :title
|
|
||||||
3) Rename all :format \"markdown\" to :format `:markdown`"
|
|
||||||
([tree-vec]
|
|
||||||
(let [kw-trans-fn #(-> %
|
|
||||||
str
|
|
||||||
(string/replace ":page-name" ":title")
|
|
||||||
(string/replace ":id" ":uuid")
|
|
||||||
(string/replace #"^:" "")
|
|
||||||
keyword)
|
|
||||||
map-trans-fn (fn [acc k v]
|
|
||||||
(cond (= :format k)
|
|
||||||
(assoc acc (kw-trans-fn k) (keyword v))
|
|
||||||
(= :id k)
|
|
||||||
(assoc acc (kw-trans-fn k) (uuid v))
|
|
||||||
:else
|
|
||||||
(assoc acc (kw-trans-fn k) v)))
|
|
||||||
tree-trans-fn (fn [form]
|
|
||||||
(if (and (map? form)
|
|
||||||
(:id form))
|
|
||||||
(reduce-kv map-trans-fn {} form)
|
|
||||||
form))]
|
|
||||||
(walk/postwalk tree-trans-fn tree-vec))))
|
|
||||||
|
|
||||||
(defn import-from-json!
|
|
||||||
[raw finished-ok-handler]
|
|
||||||
(let [json (js/JSON.parse raw)
|
|
||||||
clj-data (js->clj json :keywordize-keys true)]
|
|
||||||
(async/go
|
|
||||||
(async/<! (import-from-tree! clj-data tree-vec-translate-json))
|
|
||||||
(finished-ok-handler nil)))) ;; it was designed to accept a list of imported page names but now deprecated
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
;; TODO: move all file path related util functions to here (excepts those fit graph-parser)
|
|
||||||
|
|
||||||
(ns frontend.util.fs
|
|
||||||
"Misc util fns built on top of frontend.fs"
|
|
||||||
(:require ["path" :as node-path]
|
|
||||||
[clojure.string :as string]
|
|
||||||
[logseq.common.util :as common-util]))
|
|
||||||
|
|
||||||
;; NOTE: This is not the same ignored-path? as src/electron/electron/utils.cljs.
|
|
||||||
;; The assets directory is ignored.
|
|
||||||
;;
|
|
||||||
;; When in native-mode, dir and path are absolute paths.
|
|
||||||
(defn ignored-path?
|
|
||||||
"Ignore path for ls-dir-files-with-handler! and reload-dir!"
|
|
||||||
[dir path]
|
|
||||||
(let [ignores ["." ".recycle" "node_modules" "logseq/bak"
|
|
||||||
"logseq/version-files" "logseq/graphs-txid.edn"]]
|
|
||||||
(when (string? path)
|
|
||||||
(or
|
|
||||||
(some #(string/starts-with? path
|
|
||||||
(if (= dir "")
|
|
||||||
%
|
|
||||||
(str dir "/" %))) ignores)
|
|
||||||
(some #(string/includes? path (if (= dir "")
|
|
||||||
(str "/" % "/")
|
|
||||||
(str % "/"))) ignores)
|
|
||||||
(some #(string/ends-with? path %)
|
|
||||||
[".DS_Store" "logseq/graphs-txid.edn"])
|
|
||||||
;; hidden directory or file
|
|
||||||
(let [relpath (node-path/relative dir path)]
|
|
||||||
(or (re-find #"/\.[^.]+" relpath)
|
|
||||||
(re-find #"^\.[^.]+" relpath)))
|
|
||||||
(let [path (string/lower-case path)]
|
|
||||||
(and
|
|
||||||
(not (string/blank? (node-path/extname path)))
|
|
||||||
(not
|
|
||||||
(some #(string/ends-with? path %)
|
|
||||||
[".md" ".markdown" ".org" ".js" ".edn" ".css"]))))))))
|
|
||||||
|
|
||||||
;; Update repo/invalid-graph-name-warning if characters change
|
|
||||||
(def multiplatform-reserved-chars ":\\*\\?\"<>|\\#\\\\")
|
|
||||||
|
|
||||||
(def reserved-chars-pattern
|
|
||||||
(re-pattern (str "[" multiplatform-reserved-chars "]+")))
|
|
||||||
|
|
||||||
(defn include-reserved-chars?
|
|
||||||
"Includes reserved characters that would broken FS"
|
|
||||||
[s]
|
|
||||||
(common-util/safe-re-find reserved-chars-pattern s))
|
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
:linked-references/filter-includes "Incloure: "
|
:linked-references/filter-includes "Incloure: "
|
||||||
:linked-references/filter-search "Cercar a les pàgines vinculades"
|
:linked-references/filter-search "Cercar a les pàgines vinculades"
|
||||||
:notification/clear-all "Netejar tot"
|
:notification/clear-all "Netejar tot"
|
||||||
:on-boarding/importing-desc "Si estan en format JSON, EDN o Markdown Logseq pot treballar amb ells."
|
:on-boarding/importing-desc "Si estan en format EDN o Markdown Logseq pot treballar amb ells."
|
||||||
:on-boarding/importing-main-desc "També pot fer això després a la aplicació."
|
:on-boarding/importing-main-desc "També pot fer això després a la aplicació."
|
||||||
:on-boarding/importing-main-title "Importar notes existents"
|
:on-boarding/importing-main-title "Importar notes existents"
|
||||||
:on-boarding/importing-title "Tens notes que vulguis importar?"
|
:on-boarding/importing-title "Tens notes que vulguis importar?"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:on-boarding/importing-main-title "Import stávajících poznámek"
|
:on-boarding/importing-main-title "Import stávajících poznámek"
|
||||||
:on-boarding/importing-main-desc "Tento postup můžete provést i později v aplikaci."
|
:on-boarding/importing-main-desc "Tento postup můžete provést i později v aplikaci."
|
||||||
:on-boarding/importing-title "Máte již poznámky, které chcete importovat?"
|
:on-boarding/importing-title "Máte již poznámky, které chcete importovat?"
|
||||||
:on-boarding/importing-desc "Pokud jsou ve formátu JSON, EDN nebo Markdown, Logseq s nimi dokáže pracovat."
|
:on-boarding/importing-desc "Pokud jsou ve formátu EDN nebo Markdown, Logseq s nimi dokáže pracovat."
|
||||||
:on-boarding/main-title (fn [] ["Vítejte v " [:strong "Logseq!"]])
|
:on-boarding/main-title (fn [] ["Vítejte v " [:strong "Logseq!"]])
|
||||||
:on-boarding/main-desc "Nejprve si musíte vybrat složku, do které bude Logseq ukládat vaše myšlenky, nápady a poznámky."
|
:on-boarding/main-desc "Nejprve si musíte vybrat složku, do které bude Logseq ukládat vaše myšlenky, nápady a poznámky."
|
||||||
:bug-report/main-title "Nahlášení chyby"
|
:bug-report/main-title "Nahlášení chyby"
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
|
|
||||||
:notification/clear-all "Alles löschen"
|
:notification/clear-all "Alles löschen"
|
||||||
|
|
||||||
:on-boarding/importing-desc "Logseq importiert JSON, EDN und Markdown."
|
:on-boarding/importing-desc "Logseq importiert EDN und Markdown."
|
||||||
:on-boarding/importing-main-desc "Sie können dies auch später in der App tun."
|
:on-boarding/importing-main-desc "Sie können dies auch später in der App tun."
|
||||||
:on-boarding/importing-main-title "Vorhandene Notizen importieren"
|
:on-boarding/importing-main-title "Vorhandene Notizen importieren"
|
||||||
:on-boarding/importing-sqlite-desc "SQLite-DB-Export deines Logseq-Graphs in einen neuen DB-Graph importieren"
|
:on-boarding/importing-sqlite-desc "SQLite-DB-Export deines Logseq-Graphs in einen neuen DB-Graph importieren"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:on-boarding/importing-main-title "Import existing notes"
|
:on-boarding/importing-main-title "Import existing notes"
|
||||||
:on-boarding/importing-main-desc "You can also do this later in the app."
|
:on-boarding/importing-main-desc "You can also do this later in the app."
|
||||||
:on-boarding/importing-title "Do you already have notes that you want to import?"
|
:on-boarding/importing-title "Do you already have notes that you want to import?"
|
||||||
:on-boarding/importing-desc "If they are in a JSON, EDN or Markdown format Logseq can work with them."
|
:on-boarding/importing-desc "If they are in an EDN or Markdown format Logseq can work with them."
|
||||||
:on-boarding/importing-sqlite-desc "Import a SQLite DB Export of your Logseq graph into a new DB graph"
|
:on-boarding/importing-sqlite-desc "Import a SQLite DB Export of your Logseq graph into a new DB graph"
|
||||||
:on-boarding/main-title (fn [] ["Welcome to " [:strong "Logseq!"]])
|
:on-boarding/main-title (fn [] ["Welcome to " [:strong "Logseq!"]])
|
||||||
:on-boarding/main-desc "First you need to choose a folder where Logseq will store your thoughts, ideas, notes."
|
:on-boarding/main-desc "First you need to choose a folder where Logseq will store your thoughts, ideas, notes."
|
||||||
|
|||||||
@@ -290,7 +290,7 @@
|
|||||||
:linked-references/filter-includes "Incluye: "
|
:linked-references/filter-includes "Incluye: "
|
||||||
:linked-references/filter-search "Buscar en las páginas vinculadas"
|
:linked-references/filter-search "Buscar en las páginas vinculadas"
|
||||||
:notification/clear-all "Limpiar todo"
|
:notification/clear-all "Limpiar todo"
|
||||||
:on-boarding/importing-desc "Si están en formato JSON, EDN o Markdown Logseq puede trabajar con ellos."
|
:on-boarding/importing-desc "Si están en formato EDN o Markdown Logseq puede trabajar con ellos."
|
||||||
:on-boarding/importing-main-desc "También puedes hacer esto después en la aplicación."
|
:on-boarding/importing-main-desc "También puedes hacer esto después en la aplicación."
|
||||||
:on-boarding/importing-main-title "Importar notas existentes"
|
:on-boarding/importing-main-title "Importar notas existentes"
|
||||||
:on-boarding/importing-title "¿Tienes notas que quieras importar?"
|
:on-boarding/importing-title "¿Tienes notas que quieras importar?"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:on-boarding/importing-main-title "درونریزی یادداشتهای موجود"
|
:on-boarding/importing-main-title "درونریزی یادداشتهای موجود"
|
||||||
:on-boarding/importing-main-desc "این کار را میتوانید بعدا هم انجام دهید."
|
:on-boarding/importing-main-desc "این کار را میتوانید بعدا هم انجام دهید."
|
||||||
:on-boarding/importing-title "آیا یادداشتهایی از پیش دارید که بخواهد وارد برنامه کنید؟"
|
:on-boarding/importing-title "آیا یادداشتهایی از پیش دارید که بخواهد وارد برنامه کنید؟"
|
||||||
:on-boarding/importing-desc "اگر در قالبهای JSON، EDN یا مارکداون هستند، لاگسیک میتواند با آنها کار کند."
|
:on-boarding/importing-desc "اگر در قالبهای EDN یا مارکداون هستند، لاگسیک میتواند با آنها کار کند."
|
||||||
:on-boarding/main-title (fn [] ["به " [:strong "لاگسیک"] "خوشآمدید!"])
|
:on-boarding/main-title (fn [] ["به " [:strong "لاگسیک"] "خوشآمدید!"])
|
||||||
:on-boarding/main-desc "در ابتدا نیاز به انتخاب پوشهای دارید که لاگسیک، افکار، ایدهها و یادداشتهای شما را در آنجا ذخیره کند."
|
:on-boarding/main-desc "در ابتدا نیاز به انتخاب پوشهای دارید که لاگسیک، افکار، ایدهها و یادداشتهای شما را در آنجا ذخیره کند."
|
||||||
:help/title-usage "استفاده"
|
:help/title-usage "استفاده"
|
||||||
|
|||||||
@@ -389,7 +389,7 @@
|
|||||||
:help/title-terms "Termes"
|
:help/title-terms "Termes"
|
||||||
:help/title-usage "Utilisation"
|
:help/title-usage "Utilisation"
|
||||||
:left-side-bar/switch "Basculer à :"
|
:left-side-bar/switch "Basculer à :"
|
||||||
:on-boarding/importing-desc "S'ils sont dans le format JSON, EDN ou Markdown, les Logs…"
|
:on-boarding/importing-desc "S'ils sont dans le format EDN ou Markdown, les Logs…"
|
||||||
:on-boarding/importing-main-desc "Vous pouvez aussi faire ça plus tard dans l'appli."
|
:on-boarding/importing-main-desc "Vous pouvez aussi faire ça plus tard dans l'appli."
|
||||||
:on-boarding/importing-main-title "Importer les notes existantes"
|
:on-boarding/importing-main-title "Importer les notes existantes"
|
||||||
:on-boarding/importing-title "Avez-vous déjà des notes que vous désirez importer ?…"
|
:on-boarding/importing-title "Avez-vous déjà des notes que vous désirez importer ?…"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
:on-boarding/importing-main-title "Mengimpor catatan yang ada"
|
:on-boarding/importing-main-title "Mengimpor catatan yang ada"
|
||||||
:on-boarding/importing-main-desc "Anda juga dapat melakukan ini nanti di aplikasi."
|
:on-boarding/importing-main-desc "Anda juga dapat melakukan ini nanti di aplikasi."
|
||||||
:on-boarding/importing-title "Apakah Anda sudah memiliki catatan yang ingin Anda impor?"
|
:on-boarding/importing-title "Apakah Anda sudah memiliki catatan yang ingin Anda impor?"
|
||||||
:on-boarding/importing-desc "Jika ia dalam format JSON, EDN atau Markdown, Logseq dapat bekerja dengannya."
|
:on-boarding/importing-desc "Jika ia dalam format EDN atau Markdown, Logseq dapat bekerja dengannya."
|
||||||
:on-boarding/main-title (fn [] ["Selamat datang di " [:strong "Logseq!"]])
|
:on-boarding/main-title (fn [] ["Selamat datang di " [:strong "Logseq!"]])
|
||||||
:on-boarding/main-desc "Pertama, Anda harus memilih folder di mana Logseq akan menyimpan pemikiran, ide, catatan Anda."
|
:on-boarding/main-desc "Pertama, Anda harus memilih folder di mana Logseq akan menyimpan pemikiran, ide, catatan Anda."
|
||||||
:bug-report/main-title "Laporan bug"
|
:bug-report/main-title "Laporan bug"
|
||||||
|
|||||||
@@ -376,7 +376,7 @@
|
|||||||
:left-side-bar/switch "Passa a:"
|
:left-side-bar/switch "Passa a:"
|
||||||
:linked-references/filter-search "Cerca nelle pagine collegate"
|
:linked-references/filter-search "Cerca nelle pagine collegate"
|
||||||
:notification/clear-all "Pulisci tutte"
|
:notification/clear-all "Pulisci tutte"
|
||||||
:on-boarding/importing-desc "Se sono in formato JSON, EDN o Markdown Logseq può lavorarci."
|
:on-boarding/importing-desc "Se sono in formato EDN o Markdown Logseq può lavorarci."
|
||||||
:on-boarding/importing-main-desc "Puoi farlo anche dopo nell'app."
|
:on-boarding/importing-main-desc "Puoi farlo anche dopo nell'app."
|
||||||
:on-boarding/importing-main-title "Importa note esistenti"
|
:on-boarding/importing-main-title "Importa note esistenti"
|
||||||
:on-boarding/importing-title "Hai già note che vuoi importare?"
|
:on-boarding/importing-title "Hai già note che vuoi importare?"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:on-boarding/importing-main-title "既に存在するノートを読み込む"
|
:on-boarding/importing-main-title "既に存在するノートを読み込む"
|
||||||
:on-boarding/importing-main-desc "これは後にアプリ内で行うこともできます。"
|
:on-boarding/importing-main-desc "これは後にアプリ内で行うこともできます。"
|
||||||
:on-boarding/importing-title "既に持っている読み込みたいノートはありますか?"
|
:on-boarding/importing-title "既に持っている読み込みたいノートはありますか?"
|
||||||
:on-boarding/importing-desc "JSON、EDN、Markdown形式のいずれかであればLogseqはうまく処理できます。"
|
:on-boarding/importing-desc "EDN、Markdown形式のいずれかであればLogseqはうまく処理できます。"
|
||||||
:on-boarding/main-title (fn [] [[:strong "Logseq"] "へようこそ!"])
|
:on-boarding/main-title (fn [] [[:strong "Logseq"] "へようこそ!"])
|
||||||
:on-boarding/main-desc "はじめに、あなたの考えやアイデア、ノートを保存しておくためのフォルダを選択する必要があります。"
|
:on-boarding/main-desc "はじめに、あなたの考えやアイデア、ノートを保存しておくためのフォルダを選択する必要があります。"
|
||||||
:bug-report/main-title "バグ報告"
|
:bug-report/main-title "バグ報告"
|
||||||
|
|||||||
@@ -400,7 +400,7 @@
|
|||||||
:graph/local-graphs "Lokale grafer:"
|
:graph/local-graphs "Lokale grafer:"
|
||||||
:graph/remote-graphs "Fjerngrafer:"
|
:graph/remote-graphs "Fjerngrafer:"
|
||||||
:left-side-bar/switch "Bytt til:"
|
:left-side-bar/switch "Bytt til:"
|
||||||
:on-boarding/importing-desc "Om de er i JSON, EDN eller Markdown format kan Logseq fungere med dem."
|
:on-boarding/importing-desc "Om de er i EDN eller Markdown format kan Logseq fungere med dem."
|
||||||
:on-boarding/importing-main-desc "Du kan også gjøre dette senere i appen."
|
:on-boarding/importing-main-desc "Du kan også gjøre dette senere i appen."
|
||||||
:on-boarding/importing-main-title "Importer eksisterende notater"
|
:on-boarding/importing-main-title "Importer eksisterende notater"
|
||||||
:on-boarding/importing-title "Har du notater fra før som du ønsker å importere?"
|
:on-boarding/importing-title "Har du notater fra før som du ønsker å importere?"
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
:linked-references/filter-heading "Filtruj"
|
:linked-references/filter-heading "Filtruj"
|
||||||
:linked-references/filter-includes "Uwzględnia: "
|
:linked-references/filter-includes "Uwzględnia: "
|
||||||
:notification/clear-all "Wyczyść wszystkie"
|
:notification/clear-all "Wyczyść wszystkie"
|
||||||
:on-boarding/importing-desc "Logseq może z nimi pracować jeśli są w formacie JSON, EDN lub Markdown."
|
:on-boarding/importing-desc "Logseq może z nimi pracować jeśli są w formacie EDN lub Markdown."
|
||||||
:on-boarding/importing-main-desc "Możesz to zrobić później w aplikacji"
|
:on-boarding/importing-main-desc "Możesz to zrobić później w aplikacji"
|
||||||
:on-boarding/importing-main-title "Zaimportuj notatki"
|
:on-boarding/importing-main-title "Zaimportuj notatki"
|
||||||
:on-boarding/importing-title "Masz notatki, które chcesz zaimportować?"
|
:on-boarding/importing-title "Masz notatki, które chcesz zaimportować?"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:on-boarding/importing-main-title "Importar notas existentes"
|
:on-boarding/importing-main-title "Importar notas existentes"
|
||||||
:on-boarding/importing-main-desc "Você também pode fazer isso posteriormente no aplicativo."
|
:on-boarding/importing-main-desc "Você também pode fazer isso posteriormente no aplicativo."
|
||||||
:on-boarding/importing-title "Você já tem notas que deseja importar?"
|
:on-boarding/importing-title "Você já tem notas que deseja importar?"
|
||||||
:on-boarding/importing-desc "Se elas estiverem em formato JSON, EDN ou Markdown, o Logseq pode trabalhar com elas."
|
:on-boarding/importing-desc "Se elas estiverem em formato EDN ou Markdown, o Logseq pode trabalhar com elas."
|
||||||
:on-boarding/importing-sqlite-desc "Importar uma exportação de DB SQLite do seu grafo Logseq para um novo grafo DB"
|
:on-boarding/importing-sqlite-desc "Importar uma exportação de DB SQLite do seu grafo Logseq para um novo grafo DB"
|
||||||
:on-boarding/main-title (fn [] ["Bem-vindo ao " [:strong "Logseq!"]])
|
:on-boarding/main-title (fn [] ["Bem-vindo ao " [:strong "Logseq!"]])
|
||||||
:on-boarding/main-desc "Primeiro, você precisa escolher uma pasta onde o Logseq armazenará seus pensamentos, ideias, notas."
|
:on-boarding/main-desc "Primeiro, você precisa escolher uma pasta onde o Logseq armazenará seus pensamentos, ideias, notas."
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:on-boarding/importing-main-title "Import existujúcich poznámok"
|
:on-boarding/importing-main-title "Import existujúcich poznámok"
|
||||||
:on-boarding/importing-main-desc "Môžete to urobiť aj neskôr v aplikácii."
|
:on-boarding/importing-main-desc "Môžete to urobiť aj neskôr v aplikácii."
|
||||||
:on-boarding/importing-title "Už máte poznámky, ktoré chcete importovať?"
|
:on-boarding/importing-title "Už máte poznámky, ktoré chcete importovať?"
|
||||||
:on-boarding/importing-desc "Ak sú vo formáte JSON, EDN alebo Markdown, Logseq s nimi môže pracovať."
|
:on-boarding/importing-desc "Ak sú vo formáte EDN alebo Markdown, Logseq s nimi môže pracovať."
|
||||||
:on-boarding/main-title (fn [] ["Vitajte v " [:strong "Logseq!"]])
|
:on-boarding/main-title (fn [] ["Vitajte v " [:strong "Logseq!"]])
|
||||||
:on-boarding/main-desc "Najprv musíte vybrať adresár, kde Logseq bude ukladať vaše myšlienky, nápady, poznámky."
|
:on-boarding/main-desc "Najprv musíte vybrať adresár, kde Logseq bude ukladať vaše myšlienky, nápady, poznámky."
|
||||||
:bug-report/main-title "Hlásenie o chybe"
|
:bug-report/main-title "Hlásenie o chybe"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:on-boarding/importing-main-title "Mevcut notları içeri aktarın"
|
:on-boarding/importing-main-title "Mevcut notları içeri aktarın"
|
||||||
:on-boarding/importing-main-desc "Bunu daha sonra uygulamayı kullanırken de yapabilirsiniz."
|
:on-boarding/importing-main-desc "Bunu daha sonra uygulamayı kullanırken de yapabilirsiniz."
|
||||||
:on-boarding/importing-title "Şu anda içeri aktarmak istediğiniz notlarınız var mı?"
|
:on-boarding/importing-title "Şu anda içeri aktarmak istediğiniz notlarınız var mı?"
|
||||||
:on-boarding/importing-desc "JSON, EDN veya Markdown biçimindelerse, Logseq onlarla çalışabilir."
|
:on-boarding/importing-desc "EDN veya Markdown biçimindelerse, Logseq onlarla çalışabilir."
|
||||||
:on-boarding/main-title (fn [] [[:strong "Logseq'e"] " Hoş Geldiniz!"])
|
:on-boarding/main-title (fn [] [[:strong "Logseq'e"] " Hoş Geldiniz!"])
|
||||||
:on-boarding/main-desc "Öncelikle Logseq'in düşüncelerinizi, fikirlerinizi, notlarınızı saklayacağı bir klasör seçmeniz gerekir."
|
:on-boarding/main-desc "Öncelikle Logseq'in düşüncelerinizi, fikirlerinizi, notlarınızı saklayacağı bir klasör seçmeniz gerekir."
|
||||||
:bug-report/main-title "Hata raporu"
|
:bug-report/main-title "Hata raporu"
|
||||||
|
|||||||
Reference in New Issue
Block a user