all repos — mn @ 70ce1af3f6d8c1ff7b0e96b23dd999cf9290abce

A truly minimal concatenative programming language.

mnpkg/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 = "../mn.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