Last active
November 17, 2020 15:54
-
-
Save Sciss/49d1e9350ae9cd85dd50165e9b89e0a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// output of 'sbt dependencyTree' | |
val e = scala.io.Source.fromFile(userHome/"Downloads"/"dep.txt") | |
.getLines.toList.filter(_.contains("+-de.sciss")) | |
.map { ln => | |
val i = ln.indexOf("+-") + 2 | |
val j = ln.indexOf(" ", i) | |
val k = ln.lastIndexOf(":", if (j < 0) ln.length else j) | |
ln.substring(i, k) | |
} | |
.sorted.distinct | |
e.foreach(println) | |
val f = e.map { s => | |
val i = s.indexOf(":") | |
val j = s.indexOf("_", i) + 1 | |
// if (j < i) println(s"ERROR: $s") | |
val k = if (j < i) s.substring(i + 1) else s.substring(i + 1, j) + "*" | |
s""" \"${s.substring(0, i)} $k\": \"Sciss/???\",""" | |
} | |
f.foreach(println) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment