diff options
author | Anish Athalye <me@anishathalye.com> | 2014-10-27 20:04:00 -0400 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2014-10-27 20:31:40 -0400 |
commit | 33d602bb9304b2daf54a5754f5fb51cfcad350dc (patch) | |
tree | 98209eed7081309a14612d4be5c244cc2d3257d5 /bin | |
parent | afebc0bb2fe817778f77d0fcfe30e508bf15d441 (diff) |
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.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dotbot | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) |