Skip to content

Instantly share code, notes, and snippets.

@Reder
Created September 24, 2011 04:40
Show Gist options
  • Save Reder/1238974 to your computer and use it in GitHub Desktop.
Save Reder/1238974 to your computer and use it in GitHub Desktop.
GroovyScript for checking link between Notational Velocity Data
def nvDir = '/Users/mac/Documents/Notational Data'
def files = new File(nvDir).list() as List
def result = new ArrayList(files)
new File(nvDir).eachFile {
def text = it.text
files.each {
def name = it.replaceAll('\\.txt$|\\.markdown$', '')
if (text.contains("[[${name}]]")){
result.remove(it)
}
}
}
result.each {
println it
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment