Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.advocacy > #372990

Re: Copy all URLs

From "Octavian W. Lagrange" <olagrang@perch.invalid>
Newsgroups comp.os.linux.advocacy
Subject Re: Copy all URLs
Date 2016-09-27 18:07 +0000
Organization O.W.L.
Message-ID <hjgasduf833.t@perch.invalid> (permalink)
References <D40DD728.7E7B8%usenet@gallopinginsanity.com> <b67af9c2-5cd7-4eba-8195-97538254fc54@googlegroups.com> <fhjadu03.gi@perch.invalid> <D40FDEC6.7E97B%usenet@gallopinginsanity.com>

Show all headers | View raw


Snit <usenet@gallopinginsanity.com> wrote:
> On 9/26/16, 11:24 PM, in article fhjadu03.gi@perch.invalid, "Octavian W.
> Lagrange" <olagrang@perch.invalid> wrote:
> 
>> Steve Carroll <fretwizzer@gmail.com> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA512
>>> 
>>> On Sunday, September 25, 2016 at 8:34:08 PM UTC-6, Snit wrote:
>>>> If I wanted to copy all URLs from all tabs of, say, Chrome on Linux what
>>>> would be the best way? Clearly I could go tab by tab and copy and paste...
>>>> but curious for better solutions.
>>>> 
>>>> That is assuming anyone in COLA knows.
>>>> 
>>>> Full disclosure: I am asking because I had an extension for Safari on OS X
>>>> which used to do this for me... but with Sierra it is no longer supported.
>>>> So I wrote my own... as a non-programmer who is not even exactly great with
>>>> scripting.
>>>> 
>>>> I am assuming it can be done with Linux... Owl or Marek likely know. But
>>>> maybe not. I have done ZERO research on this. Might later.
>>> 
>>> 
>>> Sniff... sniff... no one wants to play with you anymore :(
>>> 
>>> I don't run Linux and, apparently, it can't be done within a browser
>>> (at least, from the little research I did, that's what I found)
>> 
>> There is a "Copy all URLs" extension for chromium.  You can also parse
>> ~/.config/chromium/Default/"Current Session" for them.  "Current Tabs"
>> has old ones, oddly.
>> 
> Thank you. The extension would likely serve my needs just fine, and might
> even be faster (though my "Actions" ran quickly in my video there are times
> they take a couple seconds more).
> 
> Just went to the extension site and I see they even have a "custom format"
> -- which means I can have it with brackets or whatever if I like (or so I
> assume). Might not be able to have both, as I have now, but not a big deal.
> 
> Cool.
> 
> If such a thing did not exist, how would you add it to Chrome? Just
> curious... 
> 

I've never looked into writing a browser extension, so I don't know.
I would probably just parse one of the files like this:

anon@lowtide:~/.config/chromium/Default$ strings "Current Session"  |grep http | sort |uniq |grep -v newtab
https://www.amazon.com/
http://www.amazon.com/
http://www.breitbart.com/
http://www.foxnews.com/
http://www.godlikeproductions.com/
http://www.lunaticoutpost.com/
anon@lowtide:~/.config/chromium/Default$ 

Now that shows tabs across two different browser windows, so it's not
ideal.

"Current Tabs" works the same way, but it is only created after closing
the browser, so I guess it functions as a recover last session thingie.
"Current Session" is updated continually with new tab URLs, but it
doesn't remove closed URLs, even on browser close, so a script's logic
would need to take that into account and depending on what you wanted
it to do, it might delete one or both files at some point.

With the extension, it copies to the clipboard selection, so you could do
that for each task-oriented browser window you had, following each copy
with an `xsel -b >set1` (set2, set3, etc.), and have different sets of
tab urls that you could later pass to a script that opens those sets in
different browser windows, possibly positioning the windows on different
virtual desktops.

Back to comp.os.linux.advocacy | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-26 14:18 -0700
  Re: Copy all URLs Silver Slimer <.m@nsn.s> - 2016-09-26 17:21 -0400
    Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-26 14:28 -0700
      Re: Copy all URLs Silver Slimer <.m@nsn.s> - 2016-09-26 17:31 -0400
    Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-26 14:28 -0700
  Re: Copy all URLs tmelmosfire <tmelmosfire@gmail.com> - 2016-09-26 14:33 -0700
  Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 06:24 +0000
    Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 08:31 -0700
      Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 18:07 +0000
        Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 11:38 -0700
          Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 19:56 +0000
            Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 13:23 -0700
    Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 08:54 -0700
      Re: Copy all URLs tmelmosfire <tmelmosfire@gmail.com> - 2016-09-27 11:00 -0700
        Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 11:13 -0700
          Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 12:14 -0700
            Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 19:28 +0000
              Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 12:44 -0700
              Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 12:46 -0700
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 20:21 +0000
                Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 13:27 -0700
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 21:58 +0000
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 23:43 +0000
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 01:16 +0000
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 01:51 +0000
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 02:33 +0000
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 04:06 +0000
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 06:19 +0000
                Re: Copy all URLs Marek Novotny <marek.novotny@marspolar.com> - 2016-09-28 14:03 +0000
                Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-28 09:09 -0700
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 04:13 +0000
                Re: Copy all URLs Jim Polaski <jpolaski@linuxmail.org> - 2016-09-28 13:30 +0000
                Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-28 08:35 -0700
                Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-28 10:03 -0700
                Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 21:59 +0000
            Re: Copy all URLs tmelmosfire <tmelmosfire@gmail.com> - 2016-09-27 12:38 -0700
              Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 13:13 -0700
                Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 14:27 -0700

csiph-web