Re: [SLUG] firefox is seriously dragging

From: Pavel Vassiliev (paulvas@gmail.com)
Date: Fri Jul 17 2009 - 12:18:24 EDT


Have you tried any of JSON parsers?

On Fri, Jul 17, 2009 at 11:30 AM, Eben King<eben01@verizon.net> wrote:
> On Fri, 17 Jul 2009, Eben King wrote:
>
>> On Fri, 17 Jul 2009, Shawn J. Goff wrote:
>
> [bookmarks.js]
>
>>> That is JSON, a form of Javascript object literal. You could pull out
>>> everything with "http..." to get all the urls.
>>
>> Yeah, there's over 3000 of them.  It includes each tab's history.  I
>> thought of parsing the file programmatically enough to extract them that
>> way.
>>
>>> There is also a "Bookmark All Tabs" function under the bookmarks menu.
>>> This will create a bookmark folder with all your open pages in there.
>>
>> Good, I'll see if that works.  It might require that the tabs be loaded
>> before it bookmarks them, which puts me back where I started.  Wait, does
>> that only apply to the tabs in that window?  I suspect it does.
>
> It does.  It doesn't wait for loading to complete, but it only bookmarks
> those tabs which are loaded fully.
>
> I think I see how the file's structured:
>
> ({
>  windows:
>  [(
>   tabs:
>    [(
>     entries:
>      [(
>       url: "http://whatever"
>       title: "Whatever"
>       ...
>      )]
>    )]
>  )]
> })
>
> Extra spaces and linefeeds added for clarity.  Whitespace is generally
> ignored by compilers.  And I still don't know how to make a computer parse
> it enough to extract each tab's URL.  Maybe a two-RE sed command or several
> of them as part of a big one-liner?
>
> --
> -eben    QebWenE01R@vTerYizUonI.nOetP    royalty.mine.nu:81
> TAURUS:  You will never find true happiness - what you gonna
> do, cry about it?  The stars predict tomorrow you'll wake up,
> do a bunch of stuff and then go back to sleep.  -- Weird Al
> -----------------------------------------------------------------------
> This list is provided as an unmoderated internet service by Networked
> Knowledge Systems (NKS).  Views and opinions expressed in messages
> posted are those of the author and do not necessarily reflect the
> official policy or position of NKS or any of its employees.
>

-- 
With best regards,
Pavel Vassiliev

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:36:19 EDT