Skip to content

Instantly share code, notes, and snippets.

View raffazizzi's full-sized avatar
🌈

Raff Viglianti raffazizzi

🌈
View GitHub Profile
@raffazizzi
raffazizzi / README.md
Created August 1, 2012 15:57
RV extensions to MEItoVexFlow

This page shows a live example of extensions to the projects VexFlow (a music rendering JavaScript library) and MEItoVexFlow (a JS program to render MEI scores using VexFlow).

Most of the extension work is focusing on MEItoVexFlow to extend the support of MEI elements (I have been the main development since November 2011). Such as the repetition signs with multiple endings in the example above.

Changes to VexFlow include support for lyrics, musica ficta and crescendo / diminuendo signs. MIT's music analysis library Music21 uses my latest build for in-browser music display.

@raffazizzi
raffazizzi / README.md
Created August 2, 2012 15:34
MEI RelaxNG to ODD

I wrote this XSLT 2.0 for migrating the MEI schema specification (expressed in RelaxNG) into TEI ODD.

*The program creates ODD modules and determines which RelaxNG declarations fit better into an ODD model or a macro. The resulting organization is then reflected in the content of elementSpec declarations. The user is given warnings and structured information about the decisions made by the program through xsl:message instructions.

The XSLT is specific to the source MEI schema specification, but large parts of it could be used to perform more generic RelaxNG to ODD transformations.*

I started working on this after promoting the use of ODD as a member of the MEI advisory board. Here is a white paper that I submitted to the rest of the board in 2010.

The ODD resulting from this conversion has since been edited by hand and has been adopted as main source for the new release of MEI (forthcoming in the ne

@raffazizzi
raffazizzi / METSConverter.xsl
Created August 3, 2012 16:22
METS for CHARM
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Project: CHARM
- Author: Raffaele Viglianti
- Started on: 05-03-2009
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" exclude-result-prefixes="#all">
@raffazizzi
raffazizzi / README.md
Created August 5, 2012 09:14
Wrapper for "Integrating Digital Papyrology"

The Integrating Digital Papyrology was an international project that joined together several databases of (mainly) Greek papyri; converted them to Epidoc, a fully conformant TEI P5 flavour. It formed the basis of the editorial project papyri.info.

The source databases had many differences not only in the way the data was structured, but also in the representation of ancient Greek alphabet and editorial intervention. A number of tools were created by the project team (I contributed to the development of some of the tools as well) and I wrote the Python script below to "run" all the programs according to parametrized requirements.

Some of the programs called are XSLTs, which are passed to one Saxon instance through a socket (instead of opening and closing Saxon at every transformation).

@raffazizzi
raffazizzi / index.html
Created September 10, 2012 14:51
testing d3.js brush
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.brush .extent {
stroke: gray;
fill: blue;
fill-opacity: .165;
}
@raffazizzi
raffazizzi / gist:5090912
Created March 5, 2013 15:03
SGA ext resource - example
Template:
<resource> a ore:Aggregation, rdf:List, sc:TextAnnotationList ;
ore:isDescribedBy <external-URL> .
<external-URL> a ore:ResourceMap .
<manifest1> ore:aggregates <resource> .
JSON for <resource>:
"_:UUID": {
<!DOCTYPE html>
<html>
<head><script src='http://syssgx.github.com/xml.js/js/xmllint.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
</head>
<body>
<p id="results"></p>
<script>
validTEI = '<?xml version="1.0" encoding="UTF-8"?><?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/teilite.rng" schematypens="http://relaxng.org/ns/structure/1.0"?><TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader> <fileDesc> <titleStmt> <title>Title</title> </titleStmt> <publicationStmt> <p>Publication information</p> </publicationStmt> <sourceDesc> <p>Information about the source</p> </sourceDesc> </fileDesc> </teiHeader> <text> <body> <p>Some text here.</p> </body> </text></TEI>'

Keybase proof

I hereby claim:

  • I am raffazizzi on github.
  • I am raffazizzi (https://keybase.io/raffazizzi) on keybase.
  • I have a public key whose fingerprint is 32DC 2F75 D974 EF3C 7D23 E17E F04E B9EA 202C 4AC3

To claim this, I am signing this object:

@raffazizzi
raffazizzi / build.scala
Created October 10, 2014 20:13
Trying to run /sga in refactoring branch
import sbt._
import Keys._
object Scalanvas extends Build {
lazy val util: Project = Project(
id = "util",
base = file("util"),
settings = commonSettings ++ Seq(
libraryDependencies ++= Seq(
"org.scalaz" %% "scalaz-concurrent" % "7.0.6",
@raffazizzi
raffazizzi / CORS
Created February 27, 2015 22:13
Rewrite of CORS
<div type="div3" xml:id="CORS2"><head>Creating New Reference Systems</head>
<p>If a text has no canonical reference system of its own, a new custom reference
system may be used.</p>
<p>The global attributes <att>n</att> and <att>xml:id</att> may be used to
assign reference identifiers to segments of the text. Identifiers
specified by either attribute apply to the entire element for which they
are given. ID attributes must be unique within a single
document, and ID values must begin with a letter. No such restrictions
are made on the values of <att>n</att> attributes.