View Single Post
Old 01-22-2013, 07:41 AM   #87
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by stepk View Post
twobob, I can't offer a pluggable replacement, I worked on an alternative parsing approach instead. The attached aloop.sh should more or less replace parse.sh with some plumbing on your part. It should be easy for you, easier than my trying to second guess some parts of parse.sh.
aloop.sh uses no external commands to parse json data. It's all pure shell. It's fast. It's here for your take. No offense taken if you turn it down.
If you want I could work on interfacing this module to downstream code, but I probably need some overall design info/documentation - I don't want to guess what you and ixtab have in mind.
File aloop.sh is the script. Instructions at top of file.
File aloop.out shows a run on my extensions folder - the list of parsed json/xml data as a set of sh variables.

P.S. helper/menu.json 411 entry has a typo, a [ instead of a {
In jason_parse()
Define: local IFS

Which should be supported in ASH, same as in BASH although I did not test it in Kindle-Busybox builds.
knc1 is offline   Reply With Quote