How to import Title & URL into sessionbuddy?

808 views
Skip to first unread message

Rd

unread,
Mar 13, 2024, 9:55:48 PMMar 13
to Session Buddy Discussion
Previously I occasionally kept some titles and urls in a notepad and moved them back into sessionbuddy, but I can't do it anymore. I just used copy feature in v4 to copy into notepad, but I can't find how can I import such format back into sessionbuddy?

user1.png

I have 500 tabs that must be imported.. How?

Session Buddy Support

unread,
Mar 14, 2024, 12:33:37 AMMar 14
to sessionbud...@googlegroups.com
Unfortunately plain text import didn't make the cut for the initial v4 release, but we'll likely re-add support for plain text url and title/url imports as well as paste (ctrl+v or cmd+v) directly into collections from the clipboard.

In the meantime, one albeit somewhat cumbersome workaround would be to convert to JSON in the following format and save as a file with a .json extension.

{
  "tabs": [
    {
      "title": "Tab 1",
      "url": "
https://example1.com"
    },
    {
      "title": "Tab 2",
      "url": "https://example2.com"
    }
  ]
}



Hans
 

--
You received this message because you are subscribed to the Google Groups "Session Buddy Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sessionbuddy-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sessionbuddy-discuss/95cc8b87-8a41-445c-8f6e-1f786370413an%40googlegroups.com.

Paul Grimes

unread,
Mar 16, 2024, 2:17:19 PMMar 16
to Session Buddy Discussion
Tried to convert a txt file to json and SB wouldn't accept the json file.  How frustrating.

Session Buddy Support

unread,
Mar 16, 2024, 2:45:26 PMMar 16
to sessionbud...@googlegroups.com
Did you remember to change the file extension to .json?

I tested this with the sample json provided and it worked fine.

If that still doesn't work, can you let me know what the error in the console is when you try it?


Thanks,
Hans


Rd

unread,
Mar 16, 2024, 4:52:25 PMMar 16
to Session Buddy Discussion
Here is a python script for those needing this conversion:

import json
def convert_to_json(filename):
    with open(filename, 'r', encoding='utf-8') as f:
        lines = [line.strip() for line in f if line.strip()]
    tabs = [{"title": lines[i], "url": lines[i+1]} for i in range(0, len(lines), 2)]
    return {"tabs": tabs}
json_output = convert_to_json('file.txt')
print(json.dumps(json_output, indent=2))



file.txt is a file containing:

TITLE
URL

TITLE
URL

TITLE
URL

...

Output can be imported into SB as json

Session Buddy Support

unread,
Mar 16, 2024, 6:23:07 PMMar 16
to sessionbud...@googlegroups.com
That script is very helpful, thank you.

For those who might have missed it, make sure the file you're importing has a .json extension.

Hans


capaz

unread,
Mar 16, 2024, 8:37:25 PMMar 16
to Session Buddy Discussion
Unfortunately plain text import didn't make the cut for the initial v4 release, 
but we'll likely re-add support for plain text url and title/url imports as well 
as paste (ctrl+v or cmd+v) directly into collections from the clipboard.

One of the many ways I've leveraged SB over the years is using it to transport browser sessions (almost always a subset of windows and their tabs) from one computer to another.  I move between about a half-dozen different computers on a regular basis.  For any number of reasons, I often start some piece of work on one of the computers, but then need to continue on a different one.  Being able to transport those browser windows and their tabs has been a life saver for me!

I am almost certainly an edge case in the number of browser windows that I keep open, across lots of virtual desktops (e.g., Spaces in macOS)).  I find that this helps me organize activity by "project", and allows me to either focus on a particular one, or switch back and forth between them easily, and very regularly those "projects" have to move from one computer to another.

These portable sessions hinge on the ability to copy/paste plain (or formatted) chunks out of and into SB.  I've always just assumed that this was a common SB usage.  From the almost complete lack of discussion of this in the group, I'm realizing now that perhaps it's just me.  :-)

[related post here]

Btw, this session transport has usually necessarily happened via email.  Oh my goodness, how I excited I was to see "cloud storage" mentioned in the v4 annoucement!!  :-)
 
Thanks!

Allen Kwan

unread,
Mar 18, 2024, 5:01:56 PMMar 18
to Session Buddy Discussion
Thanks for this!

I'm also someone who used the old import feature, mostly to clean up suspended URLs from Marvelous Suspender, so while it requires some extra steps, I'm glad it's still possible.

john s wolter

unread,
Mar 18, 2024, 5:58:23 PMMar 18
to sessionbud...@googlegroups.com
Okay I'll give it a try.  Which version of Python do you have?

Cheers, John S Wolter, Johnny 10-Shots, Staying Safe, Immune Challenged, Remote/Hybrid Okay
image.png


Allen Kwan

unread,
Mar 18, 2024, 6:26:34 PMMar 18
to Session Buddy Discussion
I used it with Python 3.12.2 at least.

AI

unread,
Mar 25, 2024, 7:04:56 PMMar 25
to Session Buddy Discussion
Does someone have a php version. 
There's always something fussy when trying to output a file in a different format 
Like .txt vs .json..

Paul Grimes

unread,
Mar 26, 2024, 10:59:36 AMMar 26
to Session Buddy Discussion
I used to update my tabs by importing a txt file.  It won't take that file anymore.  So, I thought maybe I could update the file via SessionBuddy.  If you copy and paste a URL, it won't let you change the copied URL unless you add a title and the title is shown instead of the URL on the SessionBuddy page.  UGH.

Kacey Green

unread,
Mar 27, 2024, 6:42:37 PMMar 27
to Session Buddy Discussion

This did the trick for merging my OneTab and Session Buddy sessions back together, using whatever version of Python is current from Brew on the latest version of Mac Silicon.
On Saturday, March 16, 2024 at 4:52:25 PM UTC-4 Rd wrote:

Matt H

unread,
Apr 8, 2024, 1:37:55 PMApr 8
to Session Buddy Discussion
Could you please make the text import paste feature a priority? I used to use this feature on a day-to-day basis exporting URLs from a database and using session buddy to open them. I am not skilled with python and I would have to import as files instead of just pasting

Session Buddy Support

unread,
Apr 8, 2024, 1:39:56 PMApr 8
to sessionbud...@googlegroups.com
> text import paste

Targeting this for the next release.

Hans


AI

unread,
Apr 9, 2024, 6:55:02 AMApr 9
to sessionbud...@googlegroups.com
SessionBuddy: 
Please make a simple html form page where we can drop a session_buddy_export .txt file or paste text, and it creates the .json text or actual file we need.

You doing that once for us, makes more sense than 1,000s of us kludging for hours making it work.

You received this message because you are subscribed to a topic in the Google Groups "Session Buddy Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sessionbuddy-discuss/Gu8asxTrwBQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sessionbuddy-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sessionbuddy-discuss/f444fcc5-3f6c-4410-af20-def9a663f1bcn%40googlegroups.com.

Václav Šíma

unread,
Jun 4, 2024, 12:33:30 PMJun 4
to Session Buddy Discussion
Hi,

I just tried the workaround you suggested using the python script provided, but it doesn't work, saying Error importing collections. Console says:
Error: Unexpected "C" at position "76906" in state ENDED
    at e.value (main.bundle.js:2:847427)
    at n.value (main.bundle.js:2:854907)
    at n.value (main.bundle.js:2:856002)

Any other ideas? (I suppose the new version where this is already implemented isn't out yet, I downloaded the extension on a new browser yesterday.)

Kind regards,
VS

Session Buddy Support

unread,
Jun 4, 2024, 12:36:00 PMJun 4
to sessionbud...@googlegroups.com
Can't speak to the python script but if you post or send the json that it produced to sup...@sessionbuddy.com I can troubleshoot that.

Hans


Václav Šíma

unread,
Jun 4, 2024, 4:16:24 PMJun 4
to Session Buddy Discussion
Thanks for your quick reply, I went through the file myself and found the culprit, there were copied some characters and strings that weren't supposed to be there and that broke the list, so the script and everything else works fine.

Is there anything one could add in between the links (in the json) to sort the links also in different windows, or is this the only way it can be imported, one crazy window in a collection?

Thanks

Session Buddy Support

unread,
Jun 4, 2024, 4:21:45 PMJun 4
to sessionbud...@googlegroups.com
There is a way, but for now it is probably easier to just import the collection, then split the links out into folders as follows:

1) ctrl (or cmd) + click a set of links
2) ctrl (or cmd) + c or right-click and click Copy
3) hit delete to delete selected links
4) ctrl+v to paste (which pastes into a new folder by default)

Hans



Václav Šíma

unread,
Jun 4, 2024, 5:23:26 PMJun 4
to Session Buddy Discussion
Okay, thanks!
Message has been deleted

David Litster

unread,
Jun 13, 2024, 11:32:09 AM (7 days ago) Jun 13
to Session Buddy Discussion
THANK YOU for adding copy/paste text back in.  Maybe add a little blurb on the export screen that the previous export is now "copy, plus look in settings" to help orient people who are surprised.

I can see you've gotten a lot of vitriol/complaining from people about the v4 update.   I was more than a little surprised myself, but I appreciate the hard work it takes to develop an extension of this quality.   Chalk it up to how integral your work has become to people day-to-day workflows, I know one of the reasons I've stuck with Chrome over Firefox is there's no corresponding extension for FF.  

Session Buddy Support

unread,
Jun 13, 2024, 11:49:44 AM (7 days ago) Jun 13
to sessionbud...@googlegroups.com
Just to be clear, this feature didn't end up making it into the latest release but it is a high priority so should be landing soon.

I appreciate your thoughtful comments. A good portion of the complaints were fair and completely understandable. There were multiple factors that made the v4 launch challenging that people aren't aware of (nor should they be) and rewrites are notoriously difficult to pull off, but ultimately we could have done a much better job communicating the changes, our motivations, and our commitment to actively addressing feedback and v3 regressions.

Hans


Reply all
Reply to author
Forward
0 new messages