mirror of https://github.com/logseq/logseq
enhance(zotero): allow extra tags for each imported page
parent
67c10e3d16
commit
435c2110bc
|
@ -239,6 +239,18 @@
|
|||
{:default-value (setting/setting :page-insert-prefix)
|
||||
:on-blur (fn [e] (setting/set-setting! :page-insert-prefix (util/evalue e)))}]]]]
|
||||
|
||||
[:div.row
|
||||
[:label.title
|
||||
{:for "zotero_extra_tags"
|
||||
:title "Extra tags to add for every imported page. Separate by comma, or leave it empty."}
|
||||
"Extra tags to add:"]
|
||||
[:div.mt-1.sm:mt-0.sm:col-span-2
|
||||
[:div.max-w-lg.rounded-md
|
||||
[:input.form-input.block
|
||||
{:default-value (setting/setting :extra-tags)
|
||||
:placeholder "tag1,tag2,tag3"
|
||||
:on-blur (fn [e] (setting/set-setting! :extra-tags (util/evalue e)))}]]]]
|
||||
|
||||
[:div.row
|
||||
[:label.title
|
||||
{:for "zotero_import_all"}
|
||||
|
|
|
@ -58,8 +58,11 @@
|
|||
(let [tags
|
||||
(->> (-> item :data :tags)
|
||||
(mapv (fn [{:keys [tag]}] (string/trim tag)))
|
||||
(mapcat #(string/split % #",\s?")))]
|
||||
(distinct tags)))
|
||||
(mapcat #(string/split % #",\s?")))
|
||||
extra-tags (->> (str/split (setting/setting :extra-tags) #",")
|
||||
(map str/trim)
|
||||
(remove str/blank?))]
|
||||
(distinct (concat tags extra-tags))))
|
||||
|
||||
(defn date->journal [item]
|
||||
(if-let [date (-> item :meta :parsed-date
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
:attachments-block-text "[[Attachments]]"
|
||||
:include-notes? true
|
||||
:notes-block-text "[[Notes]]"
|
||||
:extra-tags ""
|
||||
:page-insert-prefix "@"})
|
||||
|
||||
(defn api-key []
|
||||
|
|
Loading…
Reference in New Issue