Skip to content

xiliuya/org-roam-capture-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e062ece · Feb 18, 2023

History

81 Commits
Feb 18, 2023
Feb 18, 2023
Feb 18, 2023
Feb 18, 2023
Feb 18, 2023
Aug 25, 2015
Feb 17, 2023
Feb 17, 2023
Feb 17, 2023
Feb 14, 2023
Feb 17, 2023
Feb 18, 2023
Feb 17, 2023
Feb 18, 2023
Feb 14, 2023
Feb 14, 2023
Feb 17, 2023
Jul 7, 2015

Repository files navigation

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