Citeproc-hs installation script

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 and
http://code.haskell.org/hs-bibutils.

You can find the script here:

http://pastebin.com/m4fd5147e

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

Thanks,

Christian

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.

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

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

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

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.

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

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

Bruce

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:>

Here is the installer script I am using:

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:>

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

Bruce

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:>

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

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

and I have put a live installation here:

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 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:>

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

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:>

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

Bruce