Skip to content

Instantly share code, notes, and snippets.

@mglont
mglont / tika-matlab.groovy
Created December 11, 2016 16:04
Simple script attempting to detect the media type for a matlab script using Apache Tika
// Matlab script taken from https://issues.apache.org/jira/browse/TIKA-1634
@Grab('org.apache.tika:tika-core:1.14')
import org.apache.tika.metadata.Metadata
import org.apache.tika.mime.*
def f = File.createTempFile("matlab", ".m", new File("."))
f.deleteOnExit()
f.text = """function b=wtsgaus(p,N)