wshanks / Zutilo

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

How to backup the list of keyboard shortcuts? #92

Closed llinfeng closed 6 years ago

llinfeng commented 6 years ago

Question: Can I quickly copy the Zutilo settings to another Zotero installation?

Or, the following steps would be the best practice to backup the keyboard shortcuts:

  1. Take screenshot of all the keyboard shortcuts on the existing installation.
  2. Click on each shortcut item carefully and press the keyboards accordingly, on the new installation?
wshanks commented 6 years ago

Zutilo's preferences are stored using the standard Firefox preference system (the Zotero client is a skin over a normal Firefox application). The preferences are stored in prefs.js in the top level of the Zotero profile directory. To transfer them to a new profile, copy all of the lines in prefs.js that start with user_pref("extensions.zutilo. to the prefs.js file in the new profile. Here are the default locations for the Zotero profile directory on different operating systems.

llinfeng commented 6 years ago

Thank you for your timely reply, and excellent explanation on how settings of Zutilo are stored for Zotero. Should the setting file be prefs.js on Windows? This is the only pref*.js file that I found.

Further, can I generalize from your comments on "lines in pref.js that start with user_pref("extensions.zutilo." as the following? Or, please correct if I was over extrapolating:

  1. That pref.js stores all settings for Zotero and its plugins, as specified either through Edit > Preferences and Tools > Zotfile/Zutilo/XXX_Plugin Preferences?
  2. When copying the settings from Windwos-PC1 to Windows-PC2, overwriting the prefs.js is the only necessary step conditional on:
    • All the plugins has been installed from the *.xpi files
    • User's home directory are identical on PC1 and PC2. (I learned a trick to specify identical usernames on Windows machine, by starting the Windwos 10 OS with an offline account.)

Per my recent post on the Zotero forum, I still would like to do minimum edit to the entire C:\Users\User_Name\AppData\Roaming\Zotero\Zotero\Profiles\xxxxxxx.default folder. My general concern is that thinsg on Windows machines are delicate, and that doing minimal edit would always be a safer way to go.

wshanks commented 6 years ago

Yes, the file is prefs.js -- I misspelled two out of three times.

There is not a one-to-one mapping from the preferences UI dialog elements and the lines in prefs.js but in general Zotero and its plugins store their preferences there because that is standard practice. Some other things can get stored there. For example, Zutilo stores its version number so that it can tell when it has been updated. A plugin could choose to store some information in a separate file, but that would be unusual unless it was a large amount of data (like Zotero stores all of the citation data in the zotero.sqlite database).

It looks like you are getting good advice in the other threads. If you are transferring your settings to a new installation, copying the profile and data directories entirely should work. If you just want to copy settings from one established profile to another established profile, then I would just copy the lines for preferences starting with extensions.<plugin_name> in prefs.js (with Zotero not running at the time).

llinfeng commented 6 years ago

Sounds great! A lot of implicit knowledge now clarified :) Will be copy-pasting the complete set of contents in the xxxx.default folder.

What is "data directories"? Is it referring to how my Libraries in Zotero are stored, locally?

I feel safe to manually copy and paste the settings, but not so sure for those Zotero databases. Such "data directories" sounds horrifying ... Well, I have corrupted *.sqlite database before, and I dare not to play with it on a Windows machine. I would rather leave the database-syncing job to Zotero :)

wshanks commented 6 years ago

Yes, the data directory contains the sqlite file with all of the Zotero library data. It coantains a few other data files like the citation styles and website translators. If you have all of your data sync'ed to your Zotero account, sync'ing down your data from the Zotero server should work and give a clean result.

llinfeng commented 6 years ago

Just to be clear: such "data directory" is stored elsewhere, as mentioned in this link: https://www.zotero.org/support/zotero_data

It is different from the "xxxx.default" that stores all setting files?

And, when overwriting the contents in "xxxx.default", I am only dealing with the settings. I did not do anything to the "data directory".

On Mon, Nov 5, 2018 at 11:33 PM Linfeng Li notifications@github.com wrote:

Sounds great! A lot of implicit knowledge now clarified :) Will be copy-pasting the complete set of contents in the xxxx.default folder.

What is "data directories"? Is it referring to how my Libraries in Zotero are stored, locally?

I feel safe to manually copy and paste the settings, but not so sure for those Zotero databases. Such "data directories" sounds horrifying ... Well, I have corrupted *.sqlite database before, and I dare not to play with it on a Windows machine. I would rather leave the database-syncing job to Zotero :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/willsALMANJ/Zutilo/issues/92#issuecomment-436128030, or mute the thread https://github.com/notifications/unsubscribe-auth/AFnhZ5u7GMED7Jq--8hgPOc-_Tx2GKISks5usREYgaJpZM4YNfEI .

-- Linfeng Li

Doctoral Candidate in Behavioral and Experimental Econ School of Information University of Michigan Phone: (+1)7346045530 Skype: llinfeng1900