wshanks / Zutilo

Zotero plugin providing some additional editing features
Other
1.53k stars 72 forks source link

Shortcut for "Copy DOI as URL" #129

Closed Guillawme closed 4 years ago

Guillawme commented 4 years ago

Hello there,

I just discovered by reading #zotero/zotero/issues/295 that I can copy a fully URL-ized DOI by right-clicking on it in an item's info panel in Zotero. This is great, because I copy DOI links all the time!

It would be even better if there was a keyboard shortcut for this, similar to the default "Copy Selected Items to Clipboard" (Cmd+Shift+C on a Mac), but one that would only copy DOI links (a single link, or a list of links if more than one item is selected).

I suggested this on the Zotero forum, and someone suggested that this might be easier to do from Zutilo.

I hope this can be done, because it would be tremendously useful.

bjohas commented 4 years ago

One way that you can already do this is using quickcopy and a translator. I think cmd+shift+c is the quickcopy shortcut (ctrl+shift+c elsewhere). Zutilo allows you to do several quickcopy actions (two additional ones).

This doesn't help you if you don't know how to do translators :)

This would also be helpful, as you could then label your quickcopy appropriately: https://github.com/willsALMANJ/Zutilo/issues/121

Guillawme commented 4 years ago

I managed to make an export translator that only writes a DOI link, and I could bind it to a keyboard shortcut of my choice with Zutilo. It works well, but I still need to write directions to install it (not very user-friendly, I won't be able to do it again in a week if I don't write it down). When this is done I will push it to a repo and post the link here.

bjohas commented 4 years ago

Great - I assume you used the quickcopy function?

But yes, very true - it's cumbersome. See follow-up post here: https://forums.zotero.org/discussion/81471/zotero-style-repository-translators?new=1

I've made some custom translators, that I would like to share within our research group. At the 
moment, we are donig this by people placing the JS into the right directory. However, it's 
cumbersome. Can such translators (.js not .csl) be added to the Zotero Style Repository? If yes, 
how do I submit such translators to the respository.

It would be good to have a 'community repository' of translators and styles people make - ideally simple to add through the GUI...

Guillawme commented 4 years ago

I assume you used the quickcopy function?

Yes, I did that. I defined a shortcut in Zutilo for action "QuickCopy alt 1", and made it run a custom export translator that only exports the DOI field (it appends the doi to https://doi.org/, so it exports a fully-formed link).

When I have time to write the README, I will push the export translator to this repo.

bjohas commented 4 years ago

Great, thanks!

Dan writes here: https://forums.zotero.org/discussion/comment/348965#Comment_348965 which is making me think that it may be better to roll the translator into a plugin.

Maybe it would be best to create a plugin that effectively offers a range of translators? E.g. some of the translators we have are a bit bespoke... not that there would be any harm is sharing those at all, it's just from a usability perspective, they might confuse.

Guillawme commented 4 years ago

I agree that distributing custom translators in an extension seems like the best way to go, especially since it does not require any modification of existing infrastructure in Zotero (so no need to convince Zotero developers to do something for us).

I uploaded my translator, it's MIT-licensed so you're most welcome to distribute it in an extension if you want to. If it's of any use to more people, and made easier to install, great. 😃 But unfortunately, I don't have time to participate in such an effort: tinkering an afternoon to make a keyboard shortcut that will save me 5 seconds 5 times a day is already almost not worth it, and learning how to make an extension will sure take me more than one full day whereas my problem is already solved.

bjohas commented 4 years ago

Thanks! I've added a couple of issues - just in case you'd like to fix them. No need from my perspective though, as I don't need this functionality atm. By the way, I assume you are aware of this? https://github.com/bwiernik/zotero-shortdoi/releases/latest

For us, we're using Zotero as an organisation https://github.com/edtechhub/zotero-edtechhub, so we've already got an extension. As we frequently have to do those operations, I think our 'kicd score' would be favourable :)

bjohas commented 4 years ago

I've updated my Zotero translators here https://github.com/bjohas/Zotero_translators in case it's useful.

Guillawme commented 4 years ago

I assume you are aware of this? https://github.com/bwiernik/zotero-shortdoi/releases/latest

I was not. I will look into it, thank you.

Guillawme commented 4 years ago

I will close this issue, since I now have my own "Quick Copy DOI link".