porting citeproc; wanna help?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

porting citeproc; wanna help?

Bruce D'Arcus-3
I, with some help from David, have been playing with porting citeproc
to Ruby. I also experimented a bit with Python, but I'm not much of a
programmer and so need all the help I can get, and Ruby is more
intuitive to me.

Anyway, the stage where I'm at is that this simple method call:

        reference_list.format

... generates this output:

Another Title (2000a)
Some Title (2000b)
X Title (2001)
Title (2001)
Other Title (2003)

... where:

1) the source data are reference objects and the processing handles all
sorting and grouping necessary to get the proper order and year
suffixes. It's all object-oriented in other words.

2) the formatting itself is generated from a CitationStyle object.

Here's an example of some code that does the formatting based on those
objects:

       style = csl.bibliography_item_layout.csl_defs
       result = ""
       style.each do |render|
         if render.prefix then
           result << render.prefix
         end
         # a clever way to generate the method call dynamically
         result << self.send(render.name)
         if render.name == "year" and bibparams[:suffix] then
           result << bibparams[:suffix]
         end
         if render.suffix then
           result << render.suffix
         end
       end
       puts result
     end

So I feel I know how to do this.

The fact remains I'm not much of an actual coder, though, and my time
is limited.  Anyone want to help make it happen?  I really don't care
where it's Python or Ruby, since both are object-oriented, and both are
easy to read.  Peter, you still there?

Python has two things in its favor though: better unicode support, and
a UNO binding. Actually, there's a third thing that Python might add:
IronPython, and potentially the ability to integrate with Word
solutions.

If we were to do this, I would probably host it at the xbiblio
sourceforge project, and we would write some little glue to integrate
into OOo. My goal has always been the citeproc and related work (in
whatever language) is independent of this OOo, but that we can still
use it.

I think now is a critical time for this project. We need to start
making things happen.

Bruce



Reply | Threaded
Open this post in threaded view
|

Re: porting citeproc; wanna help?

Bruce D'Arcus-3
On Jan 28, 2006, at 10:43 AM, Bruce D'Arcus wrote:

> I really don't care whether it's Python or Ruby, since both are
> object-oriented, and both are easy to read.

At any rate, ultimately I'd like to see both citeproc-rb (think a
module that could be included trivially in rails apps for example), AND
citeproc-py (think integrating citation processing into, oh, textile
processing). I don't care much how we get there though ;-)

Also, obviously c++ or obj-c would be good, but it seems like the
dynamic languages would be better for quick coding, and code that can
be a good blue-print for other implementations.

Bruce