Skip to content

Instantly share code, notes, and snippets.

@RAnders00
Last active January 19, 2016 21:10
Show Gist options
  • Save RAnders00/d4f70c907994079db366 to your computer and use it in GitHub Desktop.
Save RAnders00/d4f70c907994079db366 to your computer and use it in GitHub Desktop.
var s = ""; $.each($('div[class=magiclist] > ol > li > a'), function(a, b) { if ($(b).closest('div').css('display') !== 'none') s += $(b).attr('href') + '\n' }); console.log(s);
println "Target directory: ${new File('.').canonicalPath}"
def url = 'https://gist.githubusercontent.com/RAnders00/d4f70c907994079db366/raw/67fdd2b2711a032a6e190b0a99bd82a25fc44360/links.txt'
def fulltext = url.toURL().getText('utf8')
fulltext.eachLine {
if (Thread.interrupted())
System.exit(-1);
def fullContext = "http://open-evidence.s3-website-us-east-1.amazonaws.com$it"
def str = new File(it.replaceAll(/\/files\//, '')).newOutputStream()
str << fullContext.toURL().openStream()
str.close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment