From 33d602bb9304b2daf54a5754f5fb51cfcad350dc Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Mon, 27 Oct 2014 20:04:00 -0400 Subject: Add YAML support Add support for YAML format configuration files. In addition, this commit adds instructions about YAML config files to the README, and it also changes the README to encourage use of YAML instead of JSON. --- bin/dotbot | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin') diff --git a/bin/dotbot b/bin/dotbot index 2c89bb0..09e2d0e 100755 --- a/bin/dotbot +++ b/bin/dotbot @@ -5,6 +5,16 @@ import sys, os PROJECT_ROOT_DIRECTORY = os.path.dirname( os.path.dirname(os.path.realpath(__file__))) +def inject(lib_path): + path = os.path.join(PROJECT_ROOT_DIRECTORY, 'lib', lib_path) + sys.path.insert(0, path) + +# version dependent libraries +if sys.version_info.major >= 3: + inject('pyyaml/lib3') +else: + inject('pyyaml/lib') + if os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'dotbot')): if PROJECT_ROOT_DIRECTORY not in sys.path: sys.path.insert(0, PROJECT_ROOT_DIRECTORY) -- cgit v1.2.3