Summarizing content on bintray

Summarizing contents of bintray repositories.

Bintray is the perfect complement to a versioned source control host like github: versioned binaries available through a variety of protocols (Maven, Gradle, Ivy… ) Bintray also has a public REST API that returns a straightforward JSON description of packages.

To automate collecting and formatting information about bintray packages in markdown so I could include it on web sites, I put together a Scala package, with a quick guide here.

Overview of reporting on bintray packages

You instantiate a BintrayRepo object from owner and repository names:

val owner = "neelsmith"
val repo = "maven"
val btRepo = BintrayRepo(owner, repo)

You can collect BintrayPackages from the repository by name, or from a vector of names. The result is one or more scala Options, so we can flatten a list to get BintrayPackages.

val pkgNames = Vector("greek", "latphone", "gsphone")
val langPkgs = btRepo.bintrayPackages(pkgNames).flatten

You can use normal Scala to sort the list, say alphabetically, by name:

val alpha = langPkgs.sortWith( <

Repository objects have a function for writing the header of a markdown-formatted table; package objects have a function for describing the package in a markdown row. Again, with a little normal Scala, you can put a whole markdown table together in one line:

val mdTable = btRepo.markdownTableHeader +"\n")


The output is a github-flavored markdown table. On this web site, it is displayed like this:

PackageCurrent versionPublishedSummaryGithub repositoryBinary download
greek1.4.0March 29, 2018A cross-platform library for working with strings representing ancient Greek in a variety of alphabetic systems.
gsphone1.1.0March 29, 2018A cross-platform library for phonological manipulation of GreekString objects.
latphone1.5.1January 10, 2019A library working with Latin texts in specified orthographies.

To use it

The source code is available on github, along with a brief tutorial here.

Binaries, of course, are available on bintray! At you can find coordinates for maven, etc, to use in your build system, or download it direclty.