Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] parsing rebsites

From: anton::lexicon::net at: 26-Jul-2002 18:59

Anyone interested in parsing rebsite index.r files (eg. to make a reb browser or desktop replacement) can find the parser function used by desktop here: ctx-viewtop/parse-index Here is a chunk of code that parses an index file, then prints out all the folders. page: load/all file if block? ctx-viewtop [ctx-viewtop: context ctx-viewtop] obj: ctx-viewtop/parse-index page if obj [ ; index file parsed ok? foreach icon obj/icons [ if icon/type = 'folder [print icon/item] ] ] To see the full contents of obj: probe obj Anton.