Comments (6)
It would be great. My main use case is for editing and saving Zotero notes using the key to open a new buffer, but you could do the same for any field with the same code.
But there are two problems. Firstly sqlite dbs can only be accessed by one application at a time, and I often have zotero open when I work, and imagine many people do. The plugin currently copies the whole database to your temp directory so that it can open the copy while the main file is locked, so writing to it would achieve nothing unless you somehow know when to copy it back and are sure Zotero hasn't changed anything in the meantime (ie the ugliest of hacks - this plugin is already a hack, but at least a read-only hack). Second is Zotero has an api for saving data, but it is only for cloud data, not local data. at least at this stage. Basically whenever there is a sane way write local data I'll build it...
(Btw Unite just offers function hooks for supplying lists of strings (sources) and methods for acting on choices from them. This functionality wouldn't depend on those, just regular vimL.)
from citation.vim.
Would it be possible to detect if sqlite dbs is open with psutil
where this module check if a file is opened by a process.
I am more interested in queueing edits to the db so that changes are made when possible but this code is a script not running program...
from citation.vim.
You could try something like that, but it would be an awful hack, that's really no what sqlite was designed to do and there are so many ways that will break. Better to wait for an api. Even better to help build the zotero local api.
from citation.vim.
Yes, a zotero local api would do. I don't know if LibZotero is a api though?
I wonder whether it is a good idea to close this issue, I feel that people may want to add their thoughts to this if it is visible.
from citation.vim.
Zotero as an api for web. Not for local. We need one for local.
Closed issues are searchable too.
Cheers
from citation.vim.
This turns out to already work pretty easily using zotcli, no code required! This will add a note for the key under the cursor:
nnoremap <silent><leader>cn :<C-u>UniteWithCursorWord -default-action=yank -force-immediately citation/title<cr><cr>:!zotcli add-note "<C-R>0"<cr>
from citation.vim.
Related Issues (20)
- Problem: encoding issues HOT 1
- Undefined variables HOT 6
- clean() choking on integers HOT 2
- Denite support HOT 42
- Support betterbibtex 5.0 rewrite HOT 1
- better bibtex citation keys not retrieved from zotero 4 HOT 3
- UTF8 HOT 26
- key_format check HOT 1
- Unite throws errors when I call `:Unite citation`(i.e. without specifying sub-menu) HOT 1
- I run :Unite citation/key and get traceback HOT 1
- Multibyte characters in title and journal name HOT 7
- unite buffer "default" candidates are empty HOT 7
- Question about generating bib files from Zotero in-line citations HOT 1
- Opening file from citation key sometimes oppens another paper HOT 4
- ddu.vim support HOT 2
- Open a reference's file with a custom program HOT 3
- Problem: error when using latest version with zotero HOT 1
- Problem: citation crashes with zotero HOT 4
- Opening files and urls - not recognized key-words HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citation.vim.