makecsl: does this make sense?

So WRT to the idea for the web interface, what I’m essentially thinking
of is a wizard that allows a collection of arrays and parameters to be
sent to a server, where the style gets constructed from existing CSL files.

The content of the arrays would be a list of style and macro names; e.g.
an abbreviated example for illustration:

{
“base_uri”: “http://zotero.org/styles/”,
“base_style”: “apa”,
“title”: “Some Journal Style”,
“primary_field”: “sociology”,
“citation”: {
“layout”: [
“apa#author-short”,
“apa#date-short”,
“harvard#cite-prefix”,
“harvard#point-locator”
]
}
}

So the target name would use the convention from HTML, where the hash
refers to the local name for the macro (although might be better to be a
full URI, at least optionally).

The script to create the style would just grab those macros, put them
together in the right order, and spit out the CSL file.

Yes, this has some limitations depending on exactly how implemented, but
I think this is fantastically cool idea in the sense that it’s pretty
simple, and I think it would actually work.

Thoughts? Am I missing something?

Bruce

Bruce D’Arcus wrote:

So WRT to the idea for the web interface, what I’m essentially thinking
of is a wizard that allows a collection of arrays and parameters to be
sent to a server, where the style gets constructed from existing CSL files.

Alright, I thought about the details of this some more, and added the
following to csl/doc/makecsl.txt for later reference:

Model-----

At its core, MakeCSL is a simple web application that take a series of
parameters, and outputs a compliant CSL style. The parameters should
probably be encoded in JSON, and consist of the following:

  • info:
    • title
    • description
    • author_name
    • author_email
    • primary_field
    • class
    • type
  • citation:
    • options (array)
    • layout (array)
  • bibliography:
    • options (array)
    • layout (array)

The layout parameters would consist of a list of hashes to style macros,
of the form:

{“[style id]”: “[macro name]”}

To generate the style, then, a script would simply assemble the macros
from the relevant styles.

Such an application could be easily extended to a full database backend,
of course, with classes/tables for styles, macros, citations,
bibliographies, and layouts.

Bruce

Bruce D’Arcus wrote:

Alright, I thought about the details of this some more, and added the
following to csl/doc/makecsl.txt for later reference:

And for nicer looking HTML:

http://www.users.muohio.edu/darcusb/citations/MakeCSL/makecsl.html

Bruce