a 1.0 repo for styles [IMPORTANT]

I hate to keep going on about the Drupal CMS, but it’s really tailor
made for this because you can map URI’s to callback functions. For
instance, you could map “Redirecting…” to a
callback function “get_style()”, now anything following /styles in the
URI is passed to the function as arguments, so
http://citationstyles.org/styles/apa/0.8 would call get_style(‘apa’,
0.8), then within the callback function you could pull the appropriate
file from github (using their php-api) and return it the user based on
the arguments provided (or list of available files if no arguments
are given). Similarly, arguments could be added to the URI
(http://citationstyles.org/styles/apa/install) which would trigger the
callback function to add the appropriate mime type (text/x-csl) in the
response header for Zotero.

Pulling the styles from GitHub for every request might be the greatest
idea though, so you could cache the styles locally in the DB on
citationsyles.org and update the cache daily (or some other
predetermined frequency) from GitHub.

I vaguely remember you mentioned Drupal in this context previously. So
are you suggesting moving citationstyles.org to Drupal, and using that
as a front-end for the repository?

Yes, that’s exactly what I’m proposing and writing a bridge module
between GitHub and Drupal. I just tested the PHP API to access
GitHub, and it’s fairly straightforward, but as I suspected, it’s not
very fast. So I don’t think serving csl styles directly from GitHub
would be scalable to large numbers of clients.

What is citestyles.org currently running on in terms of it’s framework?

WordPress.

Is there something in particular that Drupal does that some simply PHP functions couldn’t?

Yes, the path mapping to callback functions that I described earlier,
for one, but there are a multitude of others RDF would be another that
you would be interested in, not to mention the modular architecture,
which allows you to extend the core functionality very easily. I
would be willing to bet that I could craft a GitHub<->Drupal bridge
module within a day or two.

Well then I’ll just have to dare you to :slight_smile:

Seriously, if you have time, that’d be cool.

I’ll see if I can put together a little prototype, and I’ll report
back in a week or so, then you can be the judge.

So from that perspective, Drupal would give us authentication, the
callback structure, and it should be pretty easy to set up per-style
preview pages with comments.

Not sure of the scope of the “authentication” you are talking about,
but I believe the short answer is yes. There is a rich infrastructure
for granting anonymous and authenticated users access to various
pieces of content. A quick google search of Drupal vs. Wordpress will
yield plenty of comparisons, and I think the most obvious one is that
Drupal has a steeper learning curve for administrators, but from a
developers point of view it’s probably superior.

What I’m thinking is setting up a new content type which would
essentially wrap all the information and attributes that describe a
CSL style, and you could even use my handy-dandy CiteProc php class to
spit out a preview.

How about indexing and searching of styles?

Yes, there is built-in indexing of content or you can also use Apache
Solr if so desired, but there really aren’t that many styles so I
suspect Solr would be overkill.

Ron.