omnivorg
is a program to sync Omnivore highlights to an Org Mode file.
go install git.sr.ht/~rehandaphedar/omnivorg@latest
Create/Edit $XDG_CONFIG_DIR/omnivorg/config.yaml
.
api_key
is your Omnivore API Key.template_key
is the key to be passed to org-capture
.timestamp
is the last time the program was run. Do not edit this unless you know what you are doing.Example configuration:
api_key: dea6d3bb-c3bd-4aa2-9e1e-32fe07a0e520
template_key: o
timestamp: "2024-07-07T15:00:37+05:30"
All the program does is fetches updates and runs:
xdg-open "org-protocol://capture?template=template&url=url&title=title&body=body
You need to have Org Protocol setup, along with an appropriate template key.
For example:
(require 'org-protocol)
(setq org-capture-templates
`(("o" "Omnivore" entry
(file+headline
,(expand-file-name
(file-name-concat org-roam-directory "inbox.org")) "Omnivore")
(file "~/.config/emacs/roam-templates/omnivore.org")
:immediate-finish t)))
Where ~/.config/emacs/roam-templates/omnivore.org
is tangled from:
,* [[%:link][%:description]]
%i
%?
Note that I also use Org Roam (with custom file name templates). If you do not use it, you will not have access to the org-roam-directory
variable.
Make sure the Emacs Server is running.
omnivorg
You can use utilities like cron
, startup scripts in window managers, etc. to automate fetching updates.
I made this mainly for personal use. I only need the url, title, highlights, and annotations. I also do not need a full fledged template configuration. As such, this program only supports a basic template for now.
Clone the repository:
git clone https://git.sr.ht/~rehandaphedar/omnivorg
cd omnivorg
Fetch the schema (If updated):
./fetch-schema.sh
Generate queries:
go run github.com/Khan/genqlient
Run in development environment:
go run .
Build:
go build .