# Citeproc-hs installation script

**URL:** <https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609>\
**Category:** CSL Development\
**Created:** [April 16, 2009, 10:30pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609 "2009-04-16T22:30:12Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 16, 2009, 10:30pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/1 "2009-04-16T22:30:12Z")

</div>

Hello everybody,

I have written a small script to ease the installation of  
pandoc/citeproc-hs with bibutils support according to Andrea’s  
documentation at [http://code.haskell.org/citeproc-hs](http://code.haskell.org/citeproc-hs) and  
[http://code.haskell.org/hs-bibutils](http://code.haskell.org/hs-bibutils).

You can find the script here:

[http://pastebin.com/m4fd5147e](http://pastebin.com/m4fd5147e)

I’d be happy if you try it out and/or make improvements.

Thanks,

Christian

---

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 17, 2009, 8:51am UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/2 "2009-04-17T08:51:23Z")

</div>

Hi Richard,

I tried the cabal way, but it did not work out, since, as you can see in  
Andrea’s documentation, there are several custom configuration options  
necessary in order to use pandoc/citeproc with bibutils. I could not find out  
how to do this with Cabal. I’d be thrilled if you can come up with a script  
that downloads Cabal, installs the packages, and then rebuilds them in the  
same way …Things have to be really easy for the user.

As to the trunk version of the packages - are they always stable?

I am currently experimenting with the php implementation. Hope to be able to  
publish something soon. Bruce, is it ok for me to create a new subfolder  
citeproc-php in the svn repository ?

Thanks,

Christian

P.S. I am having trouble with sourceforge/nabble, that’s why I could not  
answer directly to your post.

---

<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:** [April 17, 2009, 2:25pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/3 "2009-04-17T14:25:00Z")

</div>

> I tried the cabal way, but it did not work out, since, as you can see in  
> Andrea’s documentation, there are several custom configuration options  
> necessary in order to use pandoc/citeproc with bibutils. I could not find  
> out how to do this with Cabal.

This thread on the related gitit list seems to provide an answer on  
how to pass the options:

[http://groups.google.com/group/pandoc-discuss/browse\_frm/thread/c1670c3ca2fdeb20/f08f0c544e592ace?lnk=gst&q=bruce+john+%2Bciteproc+cabal#f08f0c544e592ace](http://groups.google.com/group/pandoc-discuss/browse_frm/thread/c1670c3ca2fdeb20/f08f0c544e592ace?lnk=gst&q=bruce+john+%2Bciteproc+cabal#f08f0c544e592ace)

> I’d be thrilled if you can come up with a  
> script that downloads Cabal, installs the packages, and then rebuilds them  
> in the same way …Things have to be really easy for the user.
> 
> As to the trunk version of the packages - are they always stable?

These installation issues seem to be a problem (there’s another thread  
on pandoc-discuss about this), and probably require a general  
solution. Hopefully Andrea can take a look at your script and offer  
suggestions. Ideally, we really should be able to just do the  
following and it all works:

cabal install -fhighlighting -fciteproc pandoc

> I am currently experimenting with the php implementation. Hope to be able  
> to publish something soon. Bruce, is it ok for me to create a new subfolder  
> citeproc-php in the svn repository ?

What are you intending to put there? A little PHP script that wraps citeproc-hs?

Bruce

---

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 17, 2009, 10:38pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/4 "2009-04-17T22:38:16Z")

</div>

Hi Bruce,

> I tried the cabal way, but it did not work out, since, as you can see in  
> Andrea’s documentation, there are several custom configuration options  
> necessary in order to use pandoc/citeproc with bibutils. I could not find  
> out how to do this with Cabal.

This thread on the related gitit list seems to provide an answer on  
how to pass the options:

[http://groups.google.com/group/pandoc-discuss/browse\_frm/thread/c1670c3ca2fdeb20/f08f0c544e592ace?lnk=gst&q=bruce+john+%2Bciteproc+cabal#f08f0c544e592ace](http://groups.google.com/group/pandoc-discuss/browse_frm/thread/c1670c3ca2fdeb20/f08f0c544e592ace?lnk=gst&q=bruce+john+%2Bciteproc+cabal#f08f0c544e592ace)

> I’d be thrilled if you can come up with a  
> script that downloads Cabal, installs the packages, and then rebuilds them  
> in the same way …Things have to be really easy for the user.
> 
> As to the trunk version of the packages - are they always stable?

These installation issues seem to be a problem (there’s another thread  
on pandoc-discuss about this), and probably require a general  
solution. Hopefully Andrea can take a look at your script and offer  
suggestions. Ideally, we really should be able to just do the  
following and it all works:

cabal install -fhighlighting -fciteproc pandoc

Sure, that’d be great. But this still would not take care of the hs-bibutils dependency, so a littel install script needs to be added in any case.

> I am currently experimenting with the php implementation. Hope to be able  
> to publish something soon. Bruce, is it ok for me to create a new subfolder  
> citeproc-php in the svn repository ?

What are you intending to put there? A little PHP script that wraps citeproc-hs?

Yep. A simple web service that provides formatting through a POST request, with a minimal front-end to test it.

---

<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:** [April 18, 2009, 10:14pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/5 "2009-04-18T22:14:26Z")

</div>

Christian,

> > These installation issues seem to be a problem (there’s another thread  
> > on pandoc-discuss about this), and probably require a general  
> > solution. Hopefully Andrea can take a look at your script and offer  
> > suggestions. Ideally, we really should be able to just do the  
> > following and it all works:
> > 
> > cabal install -fhighlighting -fciteproc pandoc
> 
> Sure, that’d be great. But this still would not take care of the hs-bibutils dependency, so a littel install script needs to be added in any case.

Right.

> > > I am currently experimenting with the php implementation. Hope to be able  
> > > to publish something soon. Bruce, is it ok for me to create a new subfolder  
> > > citeproc-php in the svn repository ?
> > 
> > What are you intending to put there? A little PHP script that wraps citeproc-hs?
> 
> Yep. A simple web service that provides formatting through a POST request, with a minimal front-end to test it.

Sounds good. The only concern I have is that people might be mislead  
to believe it’s a full native PHP port. You might want to see what you  
can do to clarify that.

I’d also like to recommend GitHub to people; it’s based on and really  
exploits Git’s distributed model of development, has a nice UI, and  
just got new features like an issue tracker. It’s free for “open”  
repositories. I put my experiments with the python port there, for  
example:

[http://github.com/bdarcus/citeproc-py/tree/master](http://github.com/bdarcus/citeproc-py/tree/master)

Of course, we also have a Git repo now, but it’s only a single one,  
for the whole project, which is awkward.

Bruce

---

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 26, 2009, 10:52pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/6 "2009-04-26T22:52:47Z")

</div>

A quick update:

The citeproc-hs-php bridge works on my Mac, but I have so far not been able  
to install citeproc/pandoc with bibutils support on my Debian servers (they  
are virtual servers). In fact, trying to compile with ghc 6.10 more often  
than not crashes the servers, not only my own guest system, but the whole  
machine. Seems like ghc 6.10 is not stable yet or there is a bug that occurs  
with virtualization.

I’ll keep trying …

Christian

Bruce D’Arcus-3 wrote:\>

---

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 26, 2009, 10:58pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/7 "2009-04-26T22:58:25Z")

</div>

Here is the installer script I am using:

[https://xbiblio.svn.sourceforge.net/svnroot/xbiblio/citeproc-hs-php/trunk/bin/install.sh](https://xbiblio.svn.sourceforge.net/svnroot/xbiblio/citeproc-hs-php/trunk/bin/install.sh)

On one of the machines, it crashes when it tries to install cabal.

Too bad ;-(

Christian Boulanger wrote:\>

---

<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:** [April 26, 2009, 11:21pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/8 "2009-04-26T23:21:03Z")

</div>

Ouch! Do you need to compile GHC? No way to install pre-compiled binaries?

Bruce

---

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 27, 2009, 8:34am UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/9 "2009-04-27T08:34:57Z")

</div>

Unfortunately, as far as I could gather, neither the old stable (Etch) nor  
the new stable (Lenny) version of Debian have ghc 6.10. I managed to compile  
it, after all, but am still struggling with the rest of the installation.  
Hope to get this going soon, I really would like to bring citeproc-hs “to  
the masses”.

Cheers, Christian

Bruce D’Arcus-3 wrote:\>

---

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 29, 2009, 10:52am UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/10 "2009-04-29T10:52:07Z")

</div>

Ok. Here is the deal: ghc 6.10 compilation is not possible on Citrix CTX  
virtual servers. For whatever reason. Great.

Anyways, so I use a different machine that I have acces to to finally get a  
step further. I managed to compile citeproc-hs with the script that I have  
already referred to:

[https://xbiblio.svn.sourceforge.net/svnroot/xbiblio/citeproc-hs-php/trunk/bin/install.sh](https://xbiblio.svn.sourceforge.net/svnroot/xbiblio/citeproc-hs-php/trunk/bin/install.sh)

without any problems. It has so far worked on Ubuntu 6.06 and 9.04. Would  
anybody be interested in testing this on different platforms (only  
linux/unix supported, sorry - anyone volunteer to write a windows  
installer?).

Phew, this has been extremely hard to figure out for me, since my  
compilation and shell knowledge is very limited. But it worked out after  
all.

You can check out the whole php bridge code here:

svn co [https://xbiblio.svn.sourceforge.net/svnroot/xbiblio/citeproc-hs-php](https://xbiblio.svn.sourceforge.net/svnroot/xbiblio/citeproc-hs-php)

and I have put a live installation here:

[http://rash.rewi.hu-berlin.de/boulanger/citeproc-hs-php/trunk/](http://rash.rewi.hu-berlin.de/boulanger/citeproc-hs-php/trunk/)

It works with the three supplied styles, and there is an already built-in  
feature to download styles from [zotero.org](http://zotero.org) which is working locally, but not  
on the remote server. Also, there will be a feature that will format  
references retrieved from the library of congress.

I’d be really happy if someone would be interested in collaborating and  
improving this stuff, since my time is extremely limited. Especially we  
need to start agreeing on and implementing the standard API for CSL web  
services that has already been discussed.

Thanks for any feedback!!

Christian

Christian Boulanger wrote:\>

---

<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:** [April 29, 2009, 8:09pm UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/11 "2009-04-29T20:09:44Z")

</div>

…

> I’d be really happy if someone would be interested in collaborating and  
> improving this stuff, since my time is extremely limited. Especially we  
> need to start agreeing on and implementing the standard API for CSL web  
> services that has already been discussed.

I don’t have time to help on the service part, but on the API, I still  
think we should be using the CSL URIs to set styles, and that other  
code should be responsible for retrieving the file (from wherever).

Bruce

---

<div class="post-metadata">

**Author:** ![panyasan](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@panyasan](https://discourse.citationstyles.org/u/panyasan)\
**Post date:** [April 30, 2009, 6:37am UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/12 "2009-04-30T06:37:41Z")

</div>

I wonder if Andrea is following this discussion at all, but if he does, one  
final question to close this thread: how could the compiled binaries be made  
transportable, i.e. which of the binaries and libraries have to be part of a  
"package" that I could put together on one machine where I compiled it and  
copy it over to another machine with the same architecture? This way, we  
could assemble a set of pre-compiled binary packages for  
pandoc/citeproc-hs/hs-bibutils that could be downloaded and installed  
without the hassle of compiling.

As to the API, we should make a Wiki page for this and put together what has  
already been said. I would really appreciate if I wouldn’t have to do this -  
I am extremely busy with work - I’ll be happy to implement for the PHP  
backend whatever you agree on. I’d style it as a simple REST service to  
begin with.

Thanks,

Christian

Bruce D’Arcus-3 wrote:\>

---

<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:** [April 30, 2009, 11:51am UTC](https://discourse.citationstyles.org/t/citeproc-hs-installation-script/609/13 "2009-04-30T11:51:02Z")

</div>

…

> As to the API, we should make a Wiki page for this and put together what has  
> already been said. I would really appreciate if I wouldn’t have to do this -  
> I am extremely busy with work - I’ll be happy to implement for the PHP  
> backend whatever you agree on. I’d style it as a simple REST service to  
> begin with.

I don’t have much time either, but I put up a wiki page for this that  
we can work on as time permits:

[https://apps.sourceforge.net/trac/xbiblio/wiki/ApiDesign](https://apps.sourceforge.net/trac/xbiblio/wiki/ApiDesign)

Bruce
