seeba8 / yet-another-pinboard-extension

Manage your Pinboard bookmarks in your browser.
GNU General Public License v3.0
30 stars 4 forks source link

Bookmarks and Migrating between Browser Instances #55

Open kidehen opened 2 years ago

kidehen commented 2 years ago

I've recently migrated from an old machine to a newer one. Unfortunately, my bookmarks listed on the newer machine do not match those on the older one.

Basically, bookmarks associated with my pinboard account are different those that I appear to have pinned whenever I was logged out.

Can I export the pins on my old machine for import to my new machine? Or export my old machines local pins to pinboard as a beachhead for importing back to my new machine?

The quirk here is that a user can accumulate bookmarks while not being logged into pinboard, and then losing control over the location of said bookmarks. This is a serious problem.

seeba8 commented 2 years ago

Hi,

It is strange that your old browser did not sync them to pinboard because it should do that permanently. I have implemented retries for when a temporary network outage prevents immediate syncing, so even if you're in flight mode for a while, it should push them afterwards. So theoretically, when you connect to pinboard again, I would expect that it will publish them. However, I have not had the problem you're facing yet

I have 2 suggestions how you could get your bookmarks again, depending on how techy you are.

  1. You can manually open each bookmark and transfer them (non-techy solution). If you're on firefox, the side bar would make this a little bit less painful.
  2. If you're comfortable with javascript, you can export your data the following way:
    1. open about:debugging, and then, on the left side, select "This firefox/nightly"
    2. Click on Inspect next to the pinboard extension
      image
    3. Type in await browser.storage.local.get();. In the pins array of the resulting object, you have all your bookmarks that you can post-process somehow. You may be able to push them into the pins storage of the new pc, but I have never tested this and off the top of my head, I'm not sure this would generate a sync to Pinboard.in.

If you follow path 2, I am curious. In the result object, is there anything in the queue Array? This would normally contain those pins that haven't been synced yet.

Hope that helps :)

kidehen commented 2 years ago

Type in await browser.storage.local.get();. In the pins array of the resulting object, you have all your bookmarks that you can post-process somehow. You may be able to push them into the pins storage of the new pc, but I have never tested this and off the top of my head, I'm not sure this would generate a sync to Pinboard.in.

That does the trick, in regards to my current situation.

This also indicates the need for an export feature i.e., one that exports a users current "pinboard extension generated bookmarks" to any combination of the following:

seeba8 commented 2 years ago

This also indicates the need for an export feature i.e., one that exports a users current "pinboard extension generated bookmarks" to any combination of the following:

I've thought about that, yes. At the end, I didn't bother because you can do that in pinboard. I didn't expect anyone to use it without syncing it to pinboard. I may add it next time I have some days off just for fun. No promises though. If you want it quicker, I do accept pull requests ;-)

kidehen commented 2 years ago

This also indicates the need for an export feature i.e., one that exports a users current "pinboard extension generated bookmarks" to any combination of the following:

I've thought about that, yes. At the end, I didn't bother because you can do that in pinboard. I didn't expect anyone to use it without syncing it to pinboard. I may add it next time I have some days off just for fun. No promises though. If you want it quicker, I do accept pull requests ;-)

Issue, from a user perspective, is that I don't understand how I became disconnected from pinboard. Basically, I only found this out after changing machines which is why I've raised it as an issue.

As for pull requests and fixes, I don't mind applying my resources to a fix once the issue is accepted i.e., it should be an enhancement to this extension since I suspect many others are unknowingly in the same boat I found myself etc :)

seeba8 commented 2 years ago

Fair point. I'll see what I can do about both points... Especially the not-saving part. I'm really confused how you managed that. I've been using the addon on 3+ machines over the last 4+ years and haven't noticed any loss of bookmarks yet.

Could you check for me what the following code returns (executed in the same place as above): (await browser.storage.local.get("queue")).queue.length

kidehen commented 2 years ago

On my new machine that returns: 0 On my old machine, that still holds my missing bookmarks, it returns: 2439

kidehen commented 2 years ago

Is there an option for syncing to pinboard, under my account, from my old machine?

Shouldn't I be able to then sync from pinboard back to my new machine?