* src/WriteGedcom.py: add space between given and surname in output.
* src/ReadGedcom.py: encoding list change * src/DateParser.py: match end of string for regex matching svn: r5407
This commit is contained in:
parent
fd10da84a2
commit
421cda654c
@ -1,3 +1,8 @@
|
||||
2005-11-19 Don Allingham <don@gramps-project.org>
|
||||
* src/WriteGedcom.py: add space between given and surname in output.
|
||||
* src/ReadGedcom.py: encoding list change
|
||||
* src/DateParser.py: match end of string for regex matching
|
||||
|
||||
2005-11-18 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/Utils.py (find_file): new method that tries to check the existance
|
||||
of a file by trying out multiple encoding variants for the filename.
|
||||
|
@ -275,28 +275,28 @@ class DateParser:
|
||||
self._modifier_after = re.compile('(.*)\s+%s' % self._mod_after_str,
|
||||
re.IGNORECASE)
|
||||
self._abt2 = re.compile('<(.*)>',re.IGNORECASE)
|
||||
self._text = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?' % self._mon_str,
|
||||
self._text = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._mon_str,
|
||||
re.IGNORECASE)
|
||||
self._text2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
|
||||
self._text2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._mon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?' % self._jmon_str,
|
||||
self._jtext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
|
||||
self._jtext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._jmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ftext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?' % self._fmon_str,
|
||||
self._ftext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._fmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ftext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?' % self._fmon_str,
|
||||
self._ftext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._fmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ptext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?' % self._pmon_str,
|
||||
self._ptext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._pmon_str,
|
||||
re.IGNORECASE)
|
||||
self._ptext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?' % self._pmon_str,
|
||||
self._ptext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._pmon_str,
|
||||
re.IGNORECASE)
|
||||
self._itext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?' % self._imon_str,
|
||||
self._itext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._imon_str,
|
||||
re.IGNORECASE)
|
||||
self._itext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?' % self._imon_str,
|
||||
self._itext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._imon_str,
|
||||
re.IGNORECASE)
|
||||
self._numeric = re.compile("((\d+)[/\.])?((\d+)[/\.])?(\d+)")
|
||||
self._iso = re.compile("(\d+)-(\d+)-(\d+)")
|
||||
self._numeric = re.compile("((\d+)[/\.])?((\d+)[/\.])?(\d+)\s*$")
|
||||
self._iso = re.compile("(\d+)-(\d+)-(\d+)\s*$")
|
||||
self._rfc = re.compile("(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+(\+|-)\d\d\d\d"
|
||||
% (self._rfc_day_str,self._rfc_mon_str))
|
||||
|
||||
|
@ -1863,7 +1863,7 @@ class GedcomParser:
|
||||
self.gedsource = self.gedmap.get_from_source_tag(matches[2])
|
||||
self.broken_conc = self.gedsource.get_conc()
|
||||
elif matches[1] == "CHAR" and not self.override:
|
||||
if matches[2] == "UNICODE" or matches[2] == "UTF-8" or matches[2] == "UTF8":
|
||||
if matches[2] in ["UNICODE","UTF-8","UTF8"]:
|
||||
self.cnv = nocnv
|
||||
elif matches[2] == "ANSEL":
|
||||
self.cnv = ansel_to_utf8
|
||||
|
@ -1162,14 +1162,14 @@ class GedcomWriter:
|
||||
title = self.cnvtxt(name.get_title())
|
||||
if suffix == "":
|
||||
if surPref == "":
|
||||
self.writeln("1 NAME %s/%s/" % (firstName,surName))
|
||||
self.writeln("1 NAME %s /%s/" % (firstName,surName))
|
||||
else:
|
||||
self.writeln("1 NAME %s/%s %s/" % (firstName,surPref,surName))
|
||||
self.writeln("1 NAME %s /%s %s/" % (firstName,surPref,surName))
|
||||
else:
|
||||
if surPref == "":
|
||||
self.writeln("1 NAME %s/%s/%s" % (firstName,surName,suffix))
|
||||
self.writeln("1 NAME %s /%s/ %s" % (firstName,surName,suffix))
|
||||
else:
|
||||
self.writeln("1 NAME %s/%s %s/%s" % (firstName,surPref,surName,suffix))
|
||||
self.writeln("1 NAME %s /%s %s/ %s" % (firstName,surPref,surName,suffix))
|
||||
|
||||
if firstName:
|
||||
self.writeln("2 GIVN %s" % firstName)
|
||||
|
Loading…
Reference in New Issue
Block a user