xonecas.io
322
Jr

jarvis / files

jarvis / jarvis.py

1.1 KB
1#!/usr/bin/env python
2
3"""
4Jarvis.py
5
6Jarvis helps us maintain our dev environment, and easily use it on any
7machine we might need it on
8
9`$ jarvis vim read|write`
10
11Interface to handle vim configurations, only two actions supported:
12    read -- Read from the current environment the vim setup, including config
13            and any plugin installed (pathogen might be a special case)
14
15    write - import the last read setup, this requires the repo to be up to date
16            and we will use git to version this for us.
17
18
19@TODO:  bash configuration and aliases, should also have read and write cmds.
20@TODO:  ensure the right environments tools are installed
21        (nvm, rbenv, and virtualenv)
22"""
23
24import argparse
25import sys
26
27
28def main():
29    """ command disambiguiation """
30    parser = argparse.ArgumentParser(description="Disambiguate commands")
31    # It would be nice to parse `jarvis vim read`
32    parser.add_argument('vim', action='store_true')
33    args = parser.parse_args()
34
35    print args
36    print args.vim
37
38    return 0
39
40
41if __name__ == "__main__":
42    sys.exit(main())