Skip to content

Instantly share code, notes, and snippets.

@mooskagh

mooskagh/x.nim Secret

Last active May 19, 2018 19:02
Show Gist options
  • Save mooskagh/363c5a895a692ea92c53f9dd1aac2ec1 to your computer and use it in GitHub Desktop.
Save mooskagh/363c5a895a692ea92c53f9dd1aac2ec1 to your computer and use it in GitHub Desktop.
# This file is part of Leela Chess Zero.
# Copyright (C) 2018 The LCZero Authors
#
# Leela Chess is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Leela Chess is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Leela Chess. If not, see <http://www.gnu.org/licenses/>.
import os
import ospaths
import parsetoml
proc GetConfigFileName() : string =
return joinPath(getAppDir(), "lc0client.toml")
proc ReadConfig() : TomlTableRef =
return parseFile(GetConfigFileName())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment