The legal styles we're building on CitationStylist will need to share
a lot of code, since citation forms are jurisdiction-specific. This
looked like becoming a maintenance headache, so I spent the better
part of yesterday building a Python script to populate self-contained
macro sets from a "home" style to others that depend on it. It's
worked out pretty well, so this afternoon I did some more work to
generalize the script. It's now available here:

  https://bitbucket.org/fbennett/cslmodules

A README in the repo explains how it works, but basically you set up a
config file for each style that has dependencies, indicating the names
of the code bundles it needs and the style that contains each one. The
script will then check for a <name>-bundle-start macro in both the
receiving and the source style, and if both are found, it will grab
all macros ultimately called through the <name>-bundle-start macro and
move them across. To allow small variations in formatting, macros that
don't change apart from a small list of "cosmetic" attributes are not
overwritten.

The script might be useful for sharing code within a family of styles,
or for self-contained citation types (patent?) that might be shared
more widely.

Hope it's useful.

Frank

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
xbiblio-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

Reply via email to