Weihua Lu 4 лет назад
Родитель
Сommit
91ebff1940

+ 0 - 17
src/main/frontend/extensions/zotero/api.cljs

@@ -7,8 +7,6 @@
             [clojure.string :as str]
             [frontend.extensions.zotero.setting :as setting]))
 
-(def ^:dynamic *debug* true)
-
 (defn config []
   {:api-version 3
    :base        "https://api.zotero.org"
@@ -123,18 +121,3 @@
 
 (defn attachments [key]
   (all-children-items key "attachment"))
-
-(comment
-  (get* (config) "/collections")
-  (get* (config) "/items/top")
-  (get* (config) "/items" {:item-type "journalArticle"})
-  (get* (config) "/items" {:item-type "attachment"})
-  (item "JZCIN4K5")
-  (item "RFYNAQTN")
-  (item "3V6N8ECQ")
-  (item  "J6NP6VJW")
-  (item "54QV68M6")
-  (item "U4TU25IC")
-  (notes "3V6N8ECQ")
-  (query-top-items "b")
-  (attachments "3V6N8ECQ"))

+ 0 - 37
src/main/frontend/extensions/zotero/handler.cljs

@@ -68,40 +68,3 @@
        (handle-command-zotero block-dom-id page-name)
 
        (notification/show! (str "Successfully created page " page-name) :success)))))
-
-
-(comment
-  (create-zotero-page "JAHCZRNB")
-  (create-zotero-page "RFYNAQTN")
-
-  (create-zotero-page "3V6N8ECQ")
-
-  (def page-name (:page-name (extractor/extract zotero-api/rr)))
-  (def properties (:properties (extractor/extract zotero-api/rr)))
-  (zotero-api/item   "3V6N8ECQ")
-
-  (page-handler/create! "123" {:redirect? false :format :markdown :create-first-block? false})
-
-  ;; this is good
-  (editor-handler/api-insert-new-block!
-   "yyy"
-   {:block-uuid #uuid "60eee44e-7b9f-439d-8113-c8e5ab7a63e8"
-    :before? false
-    :sibling? false})
-;; => #:block{:properties {}, :tags [], :format :markdown, :children #{}, :path-refs (#:block{:name "notes", :original-name "notes", :journal? false}), :meta {:timestamps [], :properties [], :start-pos 0, :end-pos 11}, :unordered true, :content "[[notes]]", :refs (#:block{:name "notes", :original-name "notes", :journal? false}), :file 60, :page 58, :title [["Link" {:url ["Page_ref" "notes"], :label [["Plain" ""]], :full_text "[[notes]]", :metadata ""}]], :level 1, :journal? false, :anchor "", :uuid #uuid "60eee44e-7b9f-439d-8113-c8e5ab7a63e8", :body []}
-
-
-  #_(item "3V6N8ECQ")
-  ;; (db/get-page-blocks)
-  ;; (page-handler/page-add-property! )
-  ;; (editor-handler/insert-new-block-aux! )
-
-  ;; (db/entity [:block/name (str/lower-case "@picardMITMediaLaboratory")])
-
-  ;; (db/get-page-blocks "ccc")
-
-  ;; (def block (state/get-edit-block))
-  #_(editor-handler/save-block-if-changed!
-     block
-     (property-util/insert-property :markdown "xxx" :test "value")
-     {:force? true}))