# porting citeproc; wanna help?

**URL:** <https://discourse.citationstyles.org/t/porting-citeproc-wanna-help/121>\
**Category:** CSL Development\
**Created:** [January 28, 2006, 3:43pm UTC](https://discourse.citationstyles.org/t/porting-citeproc-wanna-help/121 "2006-01-28T15:43:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [January 28, 2006, 3:43pm UTC](https://discourse.citationstyles.org/t/porting-citeproc-wanna-help/121/1 "2006-01-28T15:43:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [January 28, 2006, 4:08pm UTC](https://discourse.citationstyles.org/t/porting-citeproc-wanna-help/121/2 "2006-01-28T16:08:37Z")

</div>

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
