Home

Awesome

nim-registry

Deal with Windows Registry from Nim.

Online docs here: http://miere.ru/docs/registry/

import winregistry

var
  faceName: string
  fontSize: int32
  fontWeight: int32
  h: RegHandle

try:
  h = open("HKEY_CURRENT_USER\\Console\\Git Bash", samRead)
  faceName = h.readString("FaceName")
  fontSize = h.readInt32("FontSize")
  fontWeight = h.readInt32("FontWeight")
except RegistryError:
  echo "err: ", getCurrentExceptionMsg()
finally:
  close(h)

Tests

Run in command line:

$ nimble test
$ nimble testansi

You should see a "tests passed" message. If you get Access is denied error, try running with administrator rights.

Changelog

1.0.0

0.2.1

0.2.0

0.1.8