Created
September 24, 2011 04:40
-
-
Save Reder/1238974 to your computer and use it in GitHub Desktop.
GroovyScript for checking link between Notational Velocity Data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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