cslrepo.rb

Just FYI …

I had an idea last night that I started playing with. It’s a little
script that works with citeproc-rb to publish a CSL repository and
subdirectories. The idea is to load a directory of styles as an array
of CSL objects, and then from there be able to generate HTML and Atom
files based on categories, and which also contain previews.

So something like:

repo = CSLRepo.new(‘My CSL Repo’, ‘~/styles’)
bio_styles = repo.styles_by_category(‘biology’)
puts bio_styles.to_atom
puts bio_styles.to_xhtml

Right now, all that works is the loading part (which, BTW, is pretty
slow with REXML; I suspect nokogiri would be much faster).

It’s in citeproc-rb/examples.

Bruce