Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created March 13, 2014 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jugyo/9520536 to your computer and use it in GitHub Desktop.
Save jugyo/9520536 to your computer and use it in GitHub Desktop.
Example of using com.twitter.Extractor with gradle
buildscript {
repositories {
// mavenCentral()
mavenLocal()
}
dependencies {
classpath 'com.twitter:twitter-text:1.9.0'
}
}
import com.twitter.*
task extract << {
extractor = new Extractor()
println(extractor.extractURLsWithIndices('http://はじめよう.みんな')) // => [http://はじめよう.みんな(URL) [0,16]]
}
// Usage: gradle extract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment