core/meta.nim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import strutils const ymlconfig = "../min.yml".slurp var pkgName* {.threadvar.}: string var pkgVersion* {.threadvar.}: string var pkgAuthor* {.threadvar.}: string var pkgDescription* {.threadvar.}: string for line in ymlconfig.split("\n"): let pair = line.split(":") if pair[0].strip == "name": pkgName = pair[1].strip if pair[0].strip == "version": pkgVersion = pair[1].strip if pair[0].strip == "author": pkgAuthor = pair[1].strip if pair[0].strip == "description": pkgDescription = pair[1].strip |