On 12/31/17, Richard Owlett <rowl...@cloud85.net> wrote: > On 12/30/2017 07:47 AM, Richard Owlett wrote: >> On 12/29/2017 10:27 PM, null wrote: >> >>> The OP's problem is organizing the contents of his bookmarks file, >>> which is an sqlite file unamenable to manual editing. >>> >> >> I had in mind an end run around that problem. >> SeaMonkey has two modes of dealing with sets of bookmarks: >> 1. Save/Restore which uses JSON >> 2. Export/Import HTML >> The "Export" function resembles a lossy conversion of the JSON. >> It does not _appear_ to preserve nesting information. I'll have >> to run more tests to confirm. My initial test flopped as I've not >> read the relevant Help contents. >> >> I had in mind: >> 1. Save the bookmarks. >> 2. Pretty print the JSON to a file. >> 3. Edit the "pretty file" - awkward but doable. >> 4. "Uglify" {if required} to have syntactically correct JSON. >> 5. Replace the current set of bookmarks using "Restore" function. >> > > Other people have worked on related tools. > Searching planet.mozilla.org and mozillazine.org has been productive. > In fact the second article on planet.mozilla.org {Templating JSON/YAML > with json-e} suggests some aspects of json-e would be applicable to my > problem. > > I am also searching Debian repositories. Packages related to "aeson" > appear promising.
have you come across 'jq' yet? eg: to prettyprint json: $ jq . bookmarks-2017-12-31.json |more { "guid": "root________", "title": "", "index": 0, "dateAdded": 1496405759960000, "lastModified": 1514747427222000, "id": 1, "type": "text/x-moz-place-container", "root": "placesRoot", "children": [ { "guid": "menu________", "title": "Bookmarks Menu", <.. snip ..> which looks like a pain to manually edit. What was your initial test with export as html? I've done export as html, edit the file, delete all bookmarks, import the edited html & not noticed any problems. What did you see? Regards Lee _______________________________________________ support-seamonkey mailing list support-seamonkey@lists.mozilla.org https://lists.mozilla.org/listinfo/support-seamonkey