From 9b88afec332555b4a7a9636943676d85ac8f18be Mon Sep 17 00:00:00 2001 From: John Shanahan Date: Mon, 2 Sep 2013 07:39:43 -0400 Subject: [PATCH 1/3] Added GPL3 license to top of 'cheat' as required. --- cheat | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cheat b/cheat index 6d1bddc..9aa85e0 100755 --- a/cheat +++ b/cheat @@ -1,4 +1,22 @@ #!/usr/bin/env python +""" +cheat.py -- Quick, abridged man pages with examples (main routines) + Copyright (C) 2013, Chris Lane + + This program 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. + + This program 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 this program. If not, see . +""" + import os import sys import subprocess From 139ff6c32ea61f1a9f2ebccce2cd6a087ab33f00 Mon Sep 17 00:00:00 2001 From: John Shanahan Date: Tue, 3 Sep 2013 23:53:58 -0400 Subject: [PATCH 2/3] Merge --- cheat | 4 ++-- setup.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cheat b/cheat index 9aa85e0..a8d3af7 100755 --- a/cheat +++ b/cheat @@ -141,8 +141,8 @@ def main(): # create/edit option option = sys.argv[1].lower() if option in ['-e', '--edit', '-c', '--create']: - # make sure EDITOR environment variable is set and that at least 3 arguments - # are given + # make sure EDITOR env variable is set and that at least + # 3 arguments are given if 'EDITOR' not in os.environ: print('In order to use "create" or "edit" you must set your ' 'EDITOR environment variable to your favorite editor\'s path') diff --git a/setup.py b/setup.py index c115c4c..38cf968 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,8 @@ from distutils.core import setup import os -setup(name='cheat', +setup( + name='cheat', version='1.0', summary='Create and view interactive cheatsheets on the command-line', homepage='', From 4fe31ec47957cbe9bbdfe949604d18889979b7ad Mon Sep 17 00:00:00 2001 From: John Shanahan Date: Thu, 5 Sep 2013 22:50:55 -0400 Subject: [PATCH 3/3] Added 'import argparse' to 'cheat' --- cheat | 1 + setup.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cheat b/cheat index a8d3af7..8d27c2d 100755 --- a/cheat +++ b/cheat @@ -19,6 +19,7 @@ cheat.py -- Quick, abridged man pages with examples (main routines) import os import sys +import argparse import subprocess DEFAULT_CHEAT_DIR = os.environ.get('DEFAULT_CHEAT_DIR') or \ diff --git a/setup.py b/setup.py index 38cf968..c115c4c 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,7 @@ from distutils.core import setup import os -setup( - name='cheat', +setup(name='cheat', version='1.0', summary='Create and view interactive cheatsheets on the command-line', homepage='',