Switcher for Quick Copy Format

I find that I am very frequently going into the preferences to switch between about four different formats for Quick Copy as needed for different programs (TEI, Chicago, Wikipedia, etc.), to the point that I sometimes end up leaving the Export preferences open all the time. Would it be possible to duplicate the selector for this as a submenu under the gear button in the main screen (maybe only displaying the most recent five or so formats used)?
  • Yeah, I've thought we should do this for a long time, though I want to reserve final judgment until I see how it looks/works. Ticket created. I'd happily accept a pull request.
  • For the menu, I could see doing something like the New Item menu, with the last five as a MRU list and a submenu for the full list.

    Another option — not mutually exclusive — would be a toolbar button that performed a quick copy, either as a button using the pref or with the same MRU/submenu.
  • Thanks for your ideas; I may indeed try to do it, though it will be quite some time before I can get there. The idea of an extra quick copy button is interesting; I'm so oriented towards the keyboard that I tend to forget about such things, but I can imagine how it could be useful to some. Is there a policy somewhere on how the number of buttons is determined, or how common a function needs to be to merit one?
  • (Requested again in another thread.)
    Is there a policy somewhere on how the number of buttons is determined, or how common a function needs to be to merit one?
    No policy, but we obviously want to be cautious, at least unless we add the ability to customize the toolbar, which likely isn't happening anytime soon.

    Another option here is adding something to the item context menu, though that's getting rather crowded. But the functionality would be more somewhat more discoverable than the keyboard shortcut that way (which still wouldn't be clear even with a switcher in the gear menu). It'd be less discoverable than a toolbar button, but maybe more appropriate, since not everyone uses this feature.
  • Hi Dan,

    many thanks!

    Do you happen to know what the javascript code is for using a particular translator? One could then assign particular translators to keyboard shortcuts.

    Thanks!
    Bjoern
  • The slightly inelegant but easiest way to do that would be to just change the pref first, call the Quick Copy function, and then reset the setting to what it was before:

    var pref = 'export.quickCopy.setting';
    var origSetting = Zotero.Prefs.get(pref);
    var newSetting = 'bibliography=http://www.zotero.org/styles/chicago-author-date';
    Zotero.Prefs.set(pref, newSetting);
    ZoteroPane.copySelectedItemsToClipboard();
    Zotero.Prefs.set(pref, origSetting);

    To get other formats, change the value of newSetting. For example, for RIS it would be 'export=32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7'. You can go to about:config via the Firefox address bar or the Advanced pane of the Zotero preferences and copy the value of extensions.zotero.export.quickCopy.setting after you change the setting in the prefs to get the appropriate value.
  • Works perfectly - many thanks!!
    Bjoern
  • @bjohas: you're using keyconfig, that's right ?
  • This was added to Zutilo in v1.2.11pre010: not another menu, but a configurable keyboard shortcut to switch between different formats.
    Copy selected items to the clipboard using the "Default output format" specified in the "Export" section of Zotero's preferences. There are also two alternative QuickCopy items (labeled "alt 1" and "alt 2"). These items will copy to the clipboard using alternative export translators. To select the translators used by these functions, the corresponding preferences extensions.zutilo.quickcopy_alt1 and extensions.zutilo.quickcopy_alt2 must be set in about:config. Each preference should be set to whatever appears in about:config for the export.quickCopy.setting preference when the desired translator is set as the "Default output format" in Zotero's preferences.
  • Thanks! Here is how you do this in Zotero stand alone https://github.com/willsALMANJ/Zutilo/issues/75.
Sign In or Register to comment.