From 3659e7593153712aa5e98bb5e7477eca84d2ac5d Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 14 Feb 2012 16:04:31 +0100 Subject: [PATCH] Added formalities. This is now version 1.0. --- afo.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/afo.py b/afo.py index 56d8c4f..f89eae3 100755 --- a/afo.py +++ b/afo.py @@ -1,5 +1,7 @@ #!/usr/bin/python # afo - automatized file opener. +# Copyright (C) 2010, 2011 Roman Zimbelmann +# This software is licensed under the terms of the GNU GPL version 3. # # ----------------------------------------------------- # Environment Variables are: @@ -75,6 +77,10 @@ # avi$: -qf mplayer $f # txt$: -p cat $f +__version__ = '1.0' +__license__ = 'GPL3' +__author__ = 'Roman Zimbelmann' + import mimetypes import optparse import os.path @@ -162,7 +168,7 @@ class AFO(object): 'args': " ".join(self.args), }) for i, arg in enumerate(self.args): - env[str(i+1)] = self.args[i] + env["a%d" % (i+1)] = self.args[i] return env def _shell(self, commands): @@ -211,6 +217,7 @@ class AFO(object): list=lambda _, __, value: value.split(',')) p = optparse.OptionParser(option_class=MoreOptions, + version='%prog ' + str(__version__), usage="%prog [options] path [-- args...]") p.add_option('-p', action='store_true', help='pipe output into a pager') p.add_option('-w', action='store_true', -- 2.11.4.GIT