迁移Logseq的笔记到org roam

(defun my-insert-file-content (filename)
  (interactive)
  (if (f-file-p filename)
      (progn
        (setq org-roam-capture-templates '(("d" "default" plain "%?"
                                            :target (file+head "%(format-time-string \"%Y%m%d%M%H%S\")-%(file-name-base filename).org" "#+title: %(file-name-base filename) \n %(f-read-text filename) \n ") :unnarrowed t)))

        (org-roam-capture)
        )))



(advice-add 'org-roam-capture :after 'org-capture-finalize)

(cl-defun org-roam-capture (&optional goto keys &key filter-fn templates info)
  "Launches an `org-capture' process for a new or existing node.
This uses the templates defined at `org-roam-capture-templates'.
Arguments GOTO and KEYS see `org-capture'.
FILTER-FN is a function to filter out nodes: it takes an `org-roam-node',
and when nil is returned the node will be filtered out.
The TEMPLATES, if provided, override the list of capture templates (see
`org-roam-capture-'.)
The INFO, if provided, is passed along to the underlying `org-roam-capture-'."
  (interactive "P")
  (let ((node (org-roam-node-create)))
    (org-roam-capture- :goto goto
                       :info info
                       :keys keys
                       :templates templates
                       :node node
                       :props '(:immediate-finish nil))))

;; 替换成你自己的目录
(mapc 'my-insert-file-content (directory-files "~/Github/my-notes/pages/" t))

最近用了一段时间 logseq ,感觉还是没有在Emacs下面用org roam 爽,还是决定切到 org roam,写了一小段脚本可以用来批量迁移, 不过对于tags迁移不到位,目前是按照文件名来新建Node的。

5 个赞

logseq看起来还不错。不知道用起来是哪不好?之前也想试试看。systemcraft出了一期介绍。https://m.youtube.com/watch?v=qjAIXCmhCQQ

无法跟Emacs的生态整合,如果能够直接在Emacs里面编辑org文件,然后在logseq(主要是mobile端)也可以同步编辑就好了

对于PC端的roam的使用, org + org roam + emacs 更适合我

2 个赞

我试了一段时间logseq感觉也是这样,不是logseq不好,实在是没法整合到emacs生态里,为了一个工具放弃一个生态不值得。

1 个赞

我也是,放弃了,我记得作者好像当时设计的初衷是为了可以在移动端也用 org 的,后来感觉是背离地越来越远了

1 个赞

无所谓了,双链笔记软件 Logseq 种子轮融资 410 万美元,恭喜秦天生。然后我看了一下投资清单,The financing was led by Patrick Collison, Stripe CEO, Nat Friedman, former CEO of GitHub, Tobias Lütke, Founder of Shopify, Sriram Krishnan, GP at A16Z, along with Craft Ventures, Matrix Partners, Day One Ventures, Charlie Cheever, Founder of Expo/Quora, and Dave Winer——我麻了……

4 个赞

有在用Emacs或者VSC编辑Orgmode,几秒后同步到手机Logseq和Orgzly处理基本的Org文件,可能是有什么特殊需求导致不兼容吧