Hi, 

 you can find a simple example
here
https://github.com/daitangio/org-mode-parser [4] 

with the source
code too. 

Anyway, the simpler way is to install the package (via npm)
and use the makelist(...) function to read and parse in an asyncronous
way the org-nodes: 

var
orgParser=require('org-mode-parser');
orgParser.makelist("README.org",
function (nodelist){
 // Here nodelist is a list of Orgnode objects
(ref:putyourcode)
 console.dir(nodelist);
});

I have just pushed the
revision 0.0.2.

Take a look here for unit testing
example

https://github.com/daitangio/org-mode-parser/blob/master/test/parserTest.js
[5]

On Wed, 5 Oct 2011 08:21:09 -0700, Chris Malone wrote: 

> Hi Gio,

> Perhaps it is my ignorance of how this all works, but do you have a
small example of how/why one would use this? As is obvious from my
question, I'm not familiar with nodejs. 
> Chris
> 
> On Oct 4, 2011, at
6:43 PM, Marcelo de Moraes Serpa wrote: 
> 
>>
This.is.simply.awesome!
>> 
>> I was procrastinating on this as well.
There's one for ruby as well which I've been playing with, this could
give me some inspiration to contribute back. 
>> 
>> Keep up the great
work,
>> 
>> - Marcelo.
>> 
>> On Tue, Oct 4, 2011 at 4:34 PM, Giovanni
Giorgi wrote:
>> 
>>> Hi all,
>>> I have just published my org-mode
parser for the node-js javascript based server: 
>>> 
>>>
http://gioorgi.com/org-mode-parser/ [1] 
>>> 
>>> It is a Javascript
parser for the Emacs Org-mode file format. 
>>> 
>>> I use org-mode as a
database for some programs (like games) where I need to mix meta
information to a bunch of long textual data. 
>>> 
>>> I wrote it
because I was unable to find an implementation for my needs. 
>>> 
>>> I
like too much org-mode to let nodejs without a parser, and as expected
the simple org-mode format was easy to parse.
>>> I started from the
Charles Cave's OrgNode python parser, but I need to modify it a lot
because of JavaScript different nature. 
>>> 
>>> Please feel free to
give me your feedback 
>>> 
>>> ---
>>> Gio's Blog http://gioorgi.com
[2]
 

Links:
------
[1] http://gioorgi.com/org-mode-parser/
[2]
http://gioorgi.com/
[3] mailto:j...@gioorgi.com
[4]
https://github.com/daitangio/org-mode-parser
[5]
https://github.com/daitangio/org-mode-parser/blob/master/test/parserTest.js

Reply via email to