Skip to content

rolling-robot/nx-zotero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nx-zotero

This is a simple zotero connector for nyxt browser.

Installation

First clone the repo somewhere where nyxt can find it, e.g. ~/.local/share/nyxt/extensions/:

git clone https://github.com/rolling-robot/nx-zotero ~/.local/share/nyxt/extensions/nx-zotero

To load the extension, add the following to your config.lisp:

(nyxt:define-nyxt-user-system-and-load "nyxt-user/nx-zotero-proxy"
  :description "This proxy system saves us if nx-zotero fails to load.
Otherwise it will break all the config loading."
  :depends-on ("nx-zotero"))

Usage

To enable zotero mode for all web pages that you visit, you can add the following to your config.lisp:

(define-configuration web-buffer
   ((default-modes
     (pushnew 'zotero-mode %slot-value%))))

Default keybinding to save the page to zotero is C-c z for emacs mode.

Configuration

For other modes the key should be defined in config.lisp as per nyxt documentation, e.g.

(defvar *my-emacs-keymap* (make-keymap "my-emacs-map"))
(defvar *my-vi-keymap* (make-keymap "my-vi-map"))

(define-key *my-emacs-keymap* "C-c z" 'nx-zotero:save-current)
(define-key *my-vi-keymap* "y z" 'nx-zotero:save-current)

(define-mode my-mode
             nil
             "Dummy mode for the custom key bindings in *my-keymap*."
             ((keyscheme-map
               (nkeymaps/core:make-keyscheme-map nyxt/keyscheme:emacs *my-emacs-keymap*
                                                 nyxt/keyscheme:vi-normal *my-vi-keymap*)
               )))

(define-configuration web-buffer
                      "Enable this mode by default."
                      ((default-modes (pushnew 'my-mode %slot-value%))))

Development and implementation

This extension provides nyxt interface to Zotero connector HTTP server, which performs all of the heavy lifting.

Currently implemented functionality includes sending the page to zotero and choosing one of the sources for saving in case of multiple choice.

License

Apache-2.0

About

Simple nyxt-zotero connector

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published