firefox bookmarks verifier

Ernie Luzar luzar722 at gmail.com
Thu Dec 4 00:06:45 UTC 2014


Polytropon wrote:
> On Wed, 03 Dec 2014 16:21:42 +0800, Ernie Luzar wrote:
>   
>> Everything I read on firefox website everyone is complaining that they 
>> (firefox developers] used a bastardized version of .json4 which is a 
>> compressed version.
>> There is no way to read the file.
>>     
>
> This must be "new". Older versions of Firefox did use
> a simple text-based format (HTML and uncompressed JSON).
> If your description is true, it really sounds terrible
> and against the idea of interoperability (traditionally
> an important attribute of quality for UNIX and Linux
> programs).
>
> As I said, my Firefox here is very old, and it uses a
> kind of "stripped down" HTML for bookmarks, very easy
> to deal with; the subdirectory bookmarkbackups/ contains
> JSON files, not compressed, just "one-liners", also
> easy to deal with (at least by using a JSON access
> library).
>
>
>
>   
>> This is going to force me to leave 
>> firefox and move to something else that has a favorites/bookmarks style 
>> like MS browser
>>     
>
> You can use Opera: Its bookmarks file ~/.opera/bookmarks.adr
> is easy to pars, it contains "name=value" pairs, prefixed
> by a "#URL" or "#FOLDER" that indicates what the entry is,
> so it's easy to parse, verify, and recombine. You don't
> need complicated import/export tools here.
>
> Also check out Chromium.
>
>
>
>   
>> What ever were firefox developers thinking??? Smoking to much weed at 
>> work!!!!
>>     
>
> They probably did not assume that someone is so stupid
> to expect to be able to verify the validity of stored
> bookmark entries. ;-)
>
>
>
>   
For the archives

I am running Firefox version 32.0.2 on a XP laptop.
The bookmark info is stored in a sqlight database within folder order.
Firefox does a once a day backup of its bookmark sqlight database on 
first startup of firefox for that day.

This backup fie is a bastardized version labeled .json4 which is a compressed version of .json.
This backup fie is not intended for public consumption, its for automated internal Firefox usage only. 

Firefox has native function to export the contents of it's internal sqlight bookmark database in html 
format creating a file named bookmark.html. When the MS browser displays this file it looks like a flat
file of URL links. MS notepad shows this file as all wrapped lines which really is in Unix format and 
displays correctly on Freebsd using the ee editor. The content in this file is really in folder order. 
The reason the folders don't show is there is no embedded style html command. The following is the 
response Firefox tech support sent me.

"Although Firefox creates an HTML document as its basic export format 
(Export Firefox bookmarks to an HTML file to back up or transfer bookmarks <https://support.mozilla.org/en-US/kb/export-firefox-bookmarks-to-backup-or-transfer>),
it does not include any style rules to lay out the page, so it looks
flat. However, the structure is in there. If you want to see folders
indented to show the hierarchy, you can add a style rule by opening the
file in a text editor such as Notepad or Wordpad. You can paste the
following between the <TITLE> and <H1>:

<style type="text/css">
dl dl {margin-left:0.5in;}
</style>

(What that does is indent any dl (definition list) element that is 
within another dl element (i.e., nested folder) by half an inch.)

You might want to use [File > Save as] to avoid damaging the original file."


Now back to the original question. The following is th response Firefox 
tech support sent me.

Bookmarks Checker - check for bad links: 
https://addons.mozilla.org/firefox/addon/bookmarks-checker/

I installed this addon and tested it. It rolled through my 800+ 
bookmarks really fast. 98 percent of the bad bookmarks
were URL's that had invalid website navigation info to the right of the 
domain name. The only choose you have is to
check the box to remove the bad URL or keep it. No way to correct the 
reported bad link title or the URL.

MY work around was to use MS frontpage which has function to verify 
external links.
1. Export Firefox bookmarks in html format.
2. Pace bookmark.html file in a frontpage empty development website.
3. Using frontpage edit bookmark.html fie inserting style commands as 
shown above.
4. Execute frontpage verify external links function which results in a 
report containing URL links which failed.
    Clicking on the failed link takes me to that link in the 
bookmark.html file where I can correct the URL or delete it.
5. Repeat step 4 for all reported failed links shown in the report
6. Using Firefox import the corrected bookmark.html file from frontpage.

There are a lot of website builder ports in Freebsd.
Have to look for one that has a "valid external URL" function, then 
follow same logic as above.






More information about the freebsd-questions mailing list