xiliuya / org-roam-capture-extension

Fork of https://github.com/sprig/org-capture-extension with org-roam-protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

org-roam-capture-extension

Org Roam Capture Extension

Fork with org-capture-extension . This is an extension for Google Chrome (tm) and Firefox (tm) which adds a “Capture” button, sending the site address, title, and selected text (if any) to emacs via org-protocol, see the [Org-Mode site] for instructions for setting that up org-protocol.

Getting started

  • Set your org-roam templates
(defun zp/org-protocol-insert-selection-dwim (selection)
  "Insert SELECTION as an org blockquote."
  (unless (string= selection "")
    ;;(format "#+begin_quote\n%s\n#+end_quote" selection)
    (format "\n%s\n" selection)))

(setq org-roam-capture-ref-templates

      '(("r" "ref" plain "* %U\n
%(zp/org-protocol-insert-selection-dwim \"%i\")%?"
         :target (file+head "web/${slug}.org"
                            "#+title: ${title}\n
#+roam_key: ${ref}\n
#+created: %u\n"
                            )
         :unnarrowed t)))
  • Set org-roam dir
(setq org-roam-directory "~/mydir")
  • Seting org-protocol

See README_old.md .

  • Install extension

Firefox: Org roam Capture .

Development

git clone --recurse-submodules https://github.com/xiliuya/org-roam-capture-extension
cd org-roam-capture-extension
make dep #run some `npm install`
make ext #run some `npm build`

Acknowedgement

This project referred, forked, or used some parts of the codes from the other projects:

Project URLUsageLicenses of Used Parts
mixmark-io/turndownForked as HTML to Org-Mode converterMIT
org-capture-extensionForked as to org-roamMIT
copy-as-org-modeCopy some html2org codeMPL-2.0

About

Fork of https://github.com/sprig/org-capture-extension with org-roam-protocol

License:MIT License


Languages

Language:JavaScript 59.1%Language:HTML 40.3%Language:Makefile 0.5%