Re: [Zim-wiki] JSON file going wrong - help
On Thu, 14 Jul 2011 13:47:15 +0800 "Li-aung Yip ('Lewis')" wrote: > Under Linux, the command > > grep -P \"http://.+?\"; foo.txt --only-matching > urls.txt > > will parse through foo.txt, looking for URLs that begin and end with > ""quote marks. Any URLs found are output to > Not quite a zim-specific solution, but grep is a better tool for this > job. :) Thank you so much for the grep command. That really helped :) -- nomnex ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] JSON file going wrong - help
On Thu, Jul 14, 2011 at 4:05 AM, nomnex 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 ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
[Zim-wiki] JSON file going wrong - help
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. -- nomnex ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp