jeroenjanssens / mendeley-file

Open files associated with a Mendeley citation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mendeley-file

Open files associated with a Mendeley citation.

Usage

mendeley-file can be invoked from the command line as follows:

$ ./mendeley-file key [key ...]

where key denotes the citation key as specified in Mendeley (and also the BibTeX citation key if you export your citations to BibTeX). Please note that the citation key is case-sensitive. Multiple citations keys can be provided.

If a citation has multiple files associated with it, such as the chapters of a thesis, then all those files are opened.

mendeley-file uses xdg-open to determine the user's preferred application for opening the file(s).

Integration with VIM

Let's say you have the following LaTeX text with two citations.

The goal of dimension reduction is to map a high-
dimensional data set onto a low-dimensional space
\citep{roweis2000nonlinear,tenenbaum2000global}. 

By adding the code below to your .vimrc, you can open the file by placing the cursor anywhere on the citation key and pressing <leader>pdf (my <leader> is the comma).

fun! MendeleyFile()
   let l:Command = expand("<cword>")
   execute "!~/mendeley-file/mendeley-file " . l:Command
endfun

nmap <silent> <leader>pdf :silent call MendeleyFile()<CR>

Dependencies

Python 2.7+

License

Copyright (c) Jeroen Janssens. Distributed under the simplified BSD.

About

Open files associated with a Mendeley citation


Languages

Language:Python 100.0%