+5
Answered

Backing up / Importing Sessions or Synchronizing across computers

Nayelianne 12 year бұрын updated by SkepticalViews 8 year бұрын 10

First of all I'd like to commend you on the great extension. Back when I used firefox I was a Tree Style Tab user and recently I found the need for keeping my tabs organized. The folder and renaming tab feature is great and the "Note"  button is super handy. So far your extension was the closest(and best functioning) I found to an integrated sidebar on chrome(the whole auto-resize and positioning saves me of a lot of trouble) :)

But more often than not I have the need of working on more than one computer, which means I'm using a different app for keeping those tabs stored on the cloud (it uses google authentication), loading them on the second computer and then manually reorganizing everything on Sidewise to match the other computer. It'd be okay if that list of tabs didn't change as often as it does, but lately, it's been agonizingly time consuming and very tiring to reorganize everything properly.

I tried copying the entire extension folder that's buried inside the AppData folder and replacing it on the second computer, but nothing happened... So I'd really love to know if there's any way to export the saved settings and tabs, even if I have to manually copy files/folders and replace them every time I make a switch.

Anyway, thanks for the great work so far. <3

Answer

Answer
Answered

Some kind of syncing and export functionality is on the todo list, though probably won't make an appearance for some time. I want to get most of the planned core features in place first, which will give me a good idea of what should be syncable/exportable and how it should function -- i.e. what should be synced when, should everything be considered one big "shared session" or do we want to have separate "work", "home", etc. sessions, and so on.

Regarding a manual export/transfer mechanism, there isn't a real clean way to do this right now. While it is possible to dump all of Sidewise's settings and pagetree/notepad content and import it on another machine, the bigger problem is getting the specifically currently-open tabs to carry over from one machine to another, which is more of a Chrome-specific thing. This might be well-accommodated by Chrome's own ability to sync "open tabs" but I haven't tried it.

That being said, if you want to give it a try, I'll give you the basic starting points.

Firstly go to Chrome's Extensions page, check the Developer mode checkbox in the upper right, then click background.html under the Sidewise entry in the extension list. From there switch to the Console tab. We'll be entering Javascript commands into Sidewise's background page to export/import its state data.

Quick and dirty export of Sidewise's state:

copy(JSON.stringify(localStorage))

This exports a copy of Sidewise's state data to your system clipboard.


Quick and dirty import of state from the clipboard:

var s = <PRESS CTRL+V TO PASTE THE DATA><press Enter>
for (var k in s) { settings.set(k, JSON.parse(s[k])); }

This imports the state data from the clipboard into Sidewise's current settings, overwriting whatever's there currently.

Then disable/enable Sidewise from the Extensions page to restart it.


I haven't tested this across multiple machines but I was able to export, hand-modify, and then import the state data on my single Chrome instance and after restarting Sidewise the modifications were there.

But again this doesn't address the issue of which tabs are open on each machine. During its startup, Sidewise will do its best to figure out which open tabs correspond to which entries in the tree, but this is definitely unexplored territory :)

Good luck!


Answered

Some kind of syncing and export functionality is on the todo list, though probably won't make an appearance for some time. I want to get most of the planned core features in place first, which will give me a good idea of what should be syncable/exportable and how it should function -- i.e. what should be synced when, should everything be considered one big "shared session" or do we want to have separate "work", "home", etc. sessions, and so on.

Regarding a manual export/transfer mechanism, there isn't a real clean way to do this right now. While it is possible to dump all of Sidewise's settings and pagetree/notepad content and import it on another machine, the bigger problem is getting the specifically currently-open tabs to carry over from one machine to another, which is more of a Chrome-specific thing. This might be well-accommodated by Chrome's own ability to sync "open tabs" but I haven't tried it.

That being said, if you want to give it a try, I'll give you the basic starting points.

Firstly go to Chrome's Extensions page, check the Developer mode checkbox in the upper right, then click background.html under the Sidewise entry in the extension list. From there switch to the Console tab. We'll be entering Javascript commands into Sidewise's background page to export/import its state data.

Quick and dirty export of Sidewise's state:

copy(JSON.stringify(localStorage))

This exports a copy of Sidewise's state data to your system clipboard.


Quick and dirty import of state from the clipboard:

var s = <PRESS CTRL+V TO PASTE THE DATA><press Enter>
for (var k in s) { settings.set(k, JSON.parse(s[k])); }

This imports the state date from the clipboard into Sidewise's current settings, overwriting whatever's there currently.

Then disable/enable Sidewise from the Extensions page to restart it.


I haven't tested this across multiple machines but I was able to export, hand-modify, and then import the state data on my single Chrome instance and after restarting Sidewise the modifications were there.

But again this doesn't address the issue of which tabs are open on each machine. During its startup, Sidewise will do its best to figure out which open tabs correspond to which entries in the tree, but this is definitely unexplored territory :)

Good luck!


Answer
Answered

Some kind of syncing and export functionality is on the todo list, though probably won't make an appearance for some time. I want to get most of the planned core features in place first, which will give me a good idea of what should be syncable/exportable and how it should function -- i.e. what should be synced when, should everything be considered one big "shared session" or do we want to have separate "work", "home", etc. sessions, and so on.

Regarding a manual export/transfer mechanism, there isn't a real clean way to do this right now. While it is possible to dump all of Sidewise's settings and pagetree/notepad content and import it on another machine, the bigger problem is getting the specifically currently-open tabs to carry over from one machine to another, which is more of a Chrome-specific thing. This might be well-accommodated by Chrome's own ability to sync "open tabs" but I haven't tried it.

That being said, if you want to give it a try, I'll give you the basic starting points.

Firstly go to Chrome's Extensions page, check the Developer mode checkbox in the upper right, then click background.html under the Sidewise entry in the extension list. From there switch to the Console tab. We'll be entering Javascript commands into Sidewise's background page to export/import its state data.

Quick and dirty export of Sidewise's state:

copy(JSON.stringify(localStorage))

This exports a copy of Sidewise's state data to your system clipboard.


Quick and dirty import of state from the clipboard:

var s = <PRESS CTRL+V TO PASTE THE DATA><press Enter>
for (var k in s) { settings.set(k, JSON.parse(s[k])); }

This imports the state data from the clipboard into Sidewise's current settings, overwriting whatever's there currently.

Then disable/enable Sidewise from the Extensions page to restart it.


I haven't tested this across multiple machines but I was able to export, hand-modify, and then import the state data on my single Chrome instance and after restarting Sidewise the modifications were there.

But again this doesn't address the issue of which tabs are open on each machine. During its startup, Sidewise will do its best to figure out which open tabs correspond to which entries in the tree, but this is definitely unexplored territory :)

Good luck!


Thank you very much for the speedy reply <3 Tried this out today and I don't know why it didn't work the first times I tried... I must have done something wrong. Anyhow, after being a little persistent and doing the same thing over and over again, I must have finally done something right and it worked! :D

The issue of importing the active tabs and having to match the hibernated tabs with what might be open on the second computer isn't much of a problem to me because I usually keep everything hibernated unless I'm using them at the time, so I'm perfectly pleased with this solution :D


It imported everything beautifully as hibernated tabs(which is actually much better than if they were active, to me)., including the ones that were open at the time on the first computer.

Once again, thanks a lot for the feedback <3

If there's a specific folder/file that contains the information, you can use Dropbox (or most other file sharing services, such as my favorite, Cubby) to sync the tab list.


Is there a specific database or place where Sidewise stores its state? Like, XML file that is generated realtime so that other Sidewise settings can still be separately managed on a per-computer basis?

Here's a referral link to Dropbox which will give us both an extra 500MB of space.

Sorry, already have a Dropbox account. xD

I haven't been able to locate a specific file like you describe in C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default which would do the trick. Even if there is one, we don't really have any guarantee that Chrome would automatically and properly load data from such a file if it was modified outside of Chrome; for example, how would it notify the extension that its settings data has been changed and the extension needs to address this? 

It looks like there is actually a Chrome API to do synchronization of extension data between signed-in Chrome instances: http://developer.chrome.com/extensions/storage.html

Unfortunately I am concerned about the storage limits that it imposes -- 4K per setting and 100K overall limit. In the case of Sidewise that could definitely become a major obstacle: at the moment I have 30 pages in my sidebar, and my JSONified exported extension data weighs in at 30K. While this could be greatly reduced in size by using some kind of compression on the data, the problem will just get worse as I implement the Recently Closed pane, per-tab Tree Style Histories, etc.


By contrast the local storage limit for extension data is 5MB per extension. So in all likelihood, the final solution for sync won't be able to use the Chrome storage sync API, other than perhaps for triggering notifications to other synchronizing Chrome instances to go fetch the actual extension data from some third-party location. 

For me the backup and a mechanism to restore (in the current window) would be a great first step. I do not need a synchronisation.

Roger that. I will most likely have some very basic import/export functions in the next release -- basically just performing the operations described in the main post reply.

Where does SideWise store it's Tab Data?


I did some digging and found this folder in AppData (Win7):


C:\Users\[USERNAME]\AppData\Local\Google\Chrome\User Data\Default\Extensions\biiammgklaefagjclmnlialkmaemifgo\2016.5.5.0_0


Even used PowerGREP to search for SideWise Export Data inside files:


https://www.powergrep.com


Which file actually stores the export data? Is it using JSON?