diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index e393e8936..2254647a4 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -3,7 +3,11 @@ Remove extra files. * AUTHORS: Consolidate with src/AUTHORS. * src/plugins/Makefile.am, src/plugins/Makefile.in: Ship RelGraph.py - and rel_it.py. + and rel_it.py. + * src/ArgHandler.py: Split off gramps_main into a separate file. + * src/gramps_main.py: Likewise. + * src/Makefile.am, src/Makefile.in: Ship src/ArgHandler.py. + * NEWS: More items. 2003-10-12 Don Allingham * src/RelLib.py : support for capitalized name formats diff --git a/gramps2/NEWS b/gramps2/NEWS index 52f959c5c..db04bfc7a 100644 --- a/gramps2/NEWS +++ b/gramps2/NEWS @@ -1,6 +1,11 @@ -Version 0.9.6? -* Person View uses a tree format instead of list format -* Captialization is done as a display format, not as a database modification +Version 0.9.6 +* More compliance with GNOME HIG. +* New BookReport dialog layout. +* Person View uses a tree format instead of list format. +* Captialization is done as a display format, not as a database modification. +* New Advanced Relationship Graph report generator (Lorenzo Cappelletti). +* Italian relationship calculator (Lorenzo Cappelletti). +* Bugfixes. Version 0.9.5 -- the "Fix me up" release * Fixed problem with deleting/merging people. diff --git a/gramps2/src/ArgHandler.py b/gramps2/src/ArgHandler.py new file mode 100644 index 000000000..48549d520 --- /dev/null +++ b/gramps2/src/ArgHandler.py @@ -0,0 +1,334 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2003 Donald N. Allingham +# +# 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 2 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# $Id$ + +# +# Written by Alex Roitman +# + +""" +Module responsible for handling the command line arguments for GRAMPS. +""" + +#------------------------------------------------------------------------- +# +# Standard python modules +# +#------------------------------------------------------------------------- +import os +import getopt + +#------------------------------------------------------------------------- +# +# gramps modules +# +#------------------------------------------------------------------------- +import const +import ReadXML + +#------------------------------------------------------------------------- +# +# ArgHandler +# +#------------------------------------------------------------------------- +class ArgHandler: + + def __init__(self,parent,args): + self.parent = parent + self.handle_args(args) + + def handle_args(self,args): + try: + options,leftargs = getopt.getopt(args, + const.shortopts,const.longopts) + except getopt.GetoptError,msg: + print "Error: %s. Exiting." % msg + os._exit(1) + except: + print "Error parsing arguments: %s " % args + if leftargs: + print "Unrecognized option: %s" % leftargs[0] + os._exit(1) + exports = [] + actions = [] + imports = [] + for opt_ix in range(len(options)): + o = options[opt_ix][0][1] + if o == '-': + continue + elif o == 'i': + fname = options[opt_ix][1] + if opt_ix