Hi, all, it's still in the very early prototyping stages, but the proof of concept is in place for a libfossil-based shell interactive:
(A thanks to list member Steve Bennett for his work on 'linenoise', a CLI editing library used here...) [stephan@host:~/cvs/fossil/libfossil/th1ish]$ ./fossi1ish linenoiseish.th1ish ln = native@E18800 Just FYI... console width = 157 prompt > import('fossil-extend.fossi1ish'); api.f = Fossil.createContext() FossilContext FossilContext@E1F2F0 prompt > api.f.symToUuid('rid:1') string 99237c3636730f20ed07b227c5092c087aea8b0c prompt > api.f.symToUuid('trunk') string 9c10390c49a8a06a63588b9dd01c4e9d608351f7 prompt > api.f.selectVal(<<<X select comment from event order by mtime desc X) string latest th1ish, with allocation metrics. prompt > api.f.dumpQuery(<<<X select * from event order by mtime desc limit 3 X) type mtime objid tagid uid bgcolor euser user ecomment comment brief omtime ci 2456765.368301 5463 null null null null stephan null latest th1ish, with allocation metrics. null 2456765.368301 ci 2456761.292003 5459 null null null null stephan null latest th1ish amalgamation (a couple new features). null 2456761.292003 ci 2456760.028887 5450 null null null null stephan null latest th1ish: do/while loop and Array.isEmpty(). null 2456760.028887 prompt > oops, an exception EXCEPTION: 301 : {"line": 0, "column": 0, "message": "Unknown identifier 'oops'", "code": 301} prompt > var m = api.f.loadManifest('trunk'); print(m.U,strftime('%Y-%m-%d %H:%M', Fossil.time.julianToUnix(m.D)), m.C) stephan 2014-04-17 20:50 latest th1ish, with allocation metrics. prompt > api.ob.push() prompt > print("This is buffered.") prompt > print("This is buffered.") prompt > print("This is buffered.") prompt > var x = api.ob.takeString(); api.ob.pop(); print("Buffered:",x); Buffered: This is buffered. This is buffered. This is buffered. prompt > Done looping As usual: http://fossil.wanderinghorse.net/repos/libfossil/ Happy fossiling! -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users