xonecas.io
322
Jr

jarvis / commit 38130ce

Initial commit

xonecas2017-11-23 38130ce6e1e9ee3895503329d82c095fe692c49f

1 file changed

jarvis.py+42−0
@@ -0,0 +1,42 @@
1+#!/usr/bin/env python
2+
3+"""
4+Jarvis.py
5+
6+Jarvis helps us maintain our dev environment, and easily use it on any
7+machine we might need it on
8+
9+`$ jarvis vim read|write`
10+
11+Interface 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+
24+import argparse
25+import sys
26+
27+
28+def 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+
41+if __name__ == "__main__":
42+ sys.exit(main())