Skip to content

Instantly share code, notes, and snippets.

@nafg
Created August 5, 2016 03:56
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 nafg/05fafb7050ed38854184b4ca64612da7 to your computer and use it in GitHub Desktop.
Save nafg/05fafb7050ed38854184b4ca64612da7 to your computer and use it in GitHub Desktop.
Ammonite script to scrape available Activator templates
import $ivy.`org.jsoup:jsoup:1.7.2`, org.jsoup._
val doc = Jsoup.connect("https://www.lightbend.com/activator/templates").get()
import collection.JavaConverters._
doc.select("#searchFilterContent h1 > a").asScala.map(_.attr("href").stripPrefix("/activator/template/"))
@nafg
Copy link
Author

nafg commented Aug 5, 2016

Idea: combine with https://gist.github.com/nafg/801baa21c7e770d7d7edce9167ce411d to prompt for one (also scraping the description), then download from s"https://www.lightbend.com/activator/template/bundle/$templateId"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment