← Back to team overview

zim-wiki team mailing list archive

Re: JSON file going wrong - help

 

On Thu, Jul 14, 2011 at 4:05 AM, nomnex <nomnex@xxxxxxxxx> wrote:

> My bookmark file got corrupted. I could export them into a readable
> format using a FF json reader add-on. I ended up with ~3000 bookmarks
> in a text file garbled with text.
>
> [sample] PME - Cadre et plan
> comptable :914, :906, 1261790738107521, 1281079170173945,
> "placesInternal/GUID", , 4,  3, :"g3ssff3h-79" ,
> "http://www.kmu.admin.ch/themen/00970/00999/index.html?lang=fr";  8,
> "Small and medium enterprises - Wikipedia, the free
>
> I have imported the page in Zim to show the URL vs. simple text, and
> removed as much as I could using the Replace function. Unfortunately, I
> don't know about RegEx. With a single string I could probably preserve
> the URLs part, remove the text, and save myself the trouble to clean
> each line manually :$ Thank.
>

Sounds like you actually need some script to parse the data, doesn't sound
like something I would use zim for to be honest.

Is the data still valid json ? In that case you could read it in with the
python json library and just spit out the fields you want.

-- Jaap

References