merge trunk from 19853 to 19947
svn: r19949
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
|
||||
pkgpython_PYTHON = \
|
||||
export.gpr.py \
|
||||
ExportCsv.py \
|
||||
ExportFtree.py \
|
||||
ExportGedcom.py \
|
||||
ExportGeneWeb.py \
|
||||
ExportPkg.py \
|
||||
ExportVCalendar.py \
|
||||
ExportVCard.py \
|
||||
ExportXml.py
|
||||
exportcsv.py \
|
||||
exportftree.py \
|
||||
exportgedcom.py \
|
||||
exportgeneweb.py \
|
||||
exportpkg.py \
|
||||
exportvcalendar.py \
|
||||
exportvcard.py \
|
||||
exportxml.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/plugins/export
|
||||
pkgpythondir = $(datadir)/@PACKAGE@/plugins/export
|
||||
|
||||
@@ -34,7 +34,7 @@ plg.description = _("CSV is a common spreadsheet format.")
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportCsv.py'
|
||||
plg.fname = 'exportcsv.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'exportData'
|
||||
plg.export_options = 'CSVWriterOptionBox'
|
||||
@@ -55,7 +55,7 @@ plg.description = _("Web Family Tree format")
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportFtree.py'
|
||||
plg.fname = 'exportftree.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'writeData'
|
||||
plg.export_options = 'WriterOptionBox'
|
||||
@@ -77,7 +77,7 @@ plg.description = _('GEDCOM is used to transfer data between genealogy programs
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportGedcom.py'
|
||||
plg.fname = 'exportgedcom.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'export_data'
|
||||
plg.export_options = 'WriterOptionBox'
|
||||
@@ -98,7 +98,7 @@ plg.description = _('GeneWeb is a web based genealogy program.')
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportGeneWeb.py'
|
||||
plg.fname = 'exportgeneweb.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'exportData'
|
||||
plg.export_options = 'WriterOptionBox'
|
||||
@@ -120,7 +120,7 @@ plg.description = _('Gramps package is an archived XML family tree together '
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportPkg.py'
|
||||
plg.fname = 'exportpkg.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'writeData'
|
||||
plg.export_options = 'WriterOptionBox'
|
||||
@@ -143,7 +143,7 @@ plg.description = _('Gramps XML export is a complete archived XML backup of a'
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportXml.py'
|
||||
plg.fname = 'exportxml.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'export_data'
|
||||
plg.export_options = 'WriterOptionBox'
|
||||
@@ -164,7 +164,7 @@ plg.description = _('vCalendar is used in many calendaring and PIM applications
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportVCalendar.py'
|
||||
plg.fname = 'exportvcalendar.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'exportData'
|
||||
plg.export_options = 'WriterOptionBox'
|
||||
@@ -185,7 +185,7 @@ plg.description = _('vCard is used in many addressbook and pim applications.')
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.5'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'ExportVCard.py'
|
||||
plg.fname = 'exportvcard.py'
|
||||
plg.ptype = EXPORT
|
||||
plg.export_function = 'exportData'
|
||||
plg.export_options = 'WriterOptionBox'
|
||||
|
||||
@@ -52,7 +52,7 @@ LOG = logging.getLogger(".ExportCSV")
|
||||
import gen.lib
|
||||
from gen.lib.eventroletype import EventRoleType
|
||||
from gui.plug.export import WriterOptionBox
|
||||
import Utils
|
||||
from gen.utils.string import gender as gender_map
|
||||
import gen.datehandler
|
||||
from gui.glade import Glade
|
||||
|
||||
@@ -208,7 +208,6 @@ class CSVWriterOptionBox(WriterOptionBox):
|
||||
|
||||
return option_box
|
||||
|
||||
|
||||
def parse_options(self):
|
||||
WriterOptionBox.parse_options(self)
|
||||
if self.include_individuals_check:
|
||||
@@ -366,11 +365,11 @@ class CSVWriter(object):
|
||||
callname = primary_name.get_call_name()
|
||||
gender = person.get_gender()
|
||||
if gender == gen.lib.Person.MALE:
|
||||
gender = Utils.gender[gen.lib.Person.MALE]
|
||||
gender = gender_map[gen.lib.Person.MALE]
|
||||
elif gender == gen.lib.Person.FEMALE:
|
||||
gender = Utils.gender[gen.lib.Person.FEMALE]
|
||||
gender = gender_map[gen.lib.Person.FEMALE]
|
||||
else:
|
||||
gender = Utils.gender[gen.lib.Person.UNKNOWN]
|
||||
gender = gender_map[gen.lib.Person.UNKNOWN]
|
||||
# Birth:
|
||||
birthdate = ""
|
||||
birthplace = ""
|
||||
@@ -43,12 +43,12 @@ import time
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
import const
|
||||
from gen.const import VERSION
|
||||
import libgedcom
|
||||
from gen.errors import DatabaseError
|
||||
from gui.plug.export import WriterOptionBox
|
||||
from gen.updatecallback import UpdateCallback
|
||||
from Utils import media_path_full
|
||||
from gen.utils.file import media_path_full
|
||||
from gen.utils.place import conv_lat_lon
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -329,7 +329,7 @@ class GedcomWriter(UpdateCallback):
|
||||
|
||||
self._writeln(0, "HEAD")
|
||||
self._writeln(1, "SOUR", "Gramps")
|
||||
self._writeln(2, "VERS", const.VERSION)
|
||||
self._writeln(2, "VERS", VERSION)
|
||||
self._writeln(2, "NAME", "Gramps")
|
||||
self._writeln(1, "DATE", date_str)
|
||||
self._writeln(2, "TIME", time_str)
|
||||
@@ -48,7 +48,6 @@ log = logging.getLogger(".WriteGeneWeb")
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
from gui.plug.export import WriterOptionBox
|
||||
#import const
|
||||
from gen.utils.alive import probably_alive
|
||||
from gui.glade import Glade
|
||||
from gen.config import config
|
||||
@@ -60,8 +60,8 @@ from gi.repository import Gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gui.plug.export import WriterOptionBox
|
||||
from ExportXml import XmlWriter
|
||||
import Utils
|
||||
from exportxml import XmlWriter
|
||||
from gen.utils.file import media_path_full, get_unicode_path_from_file_chooser
|
||||
from gen.constfunc import win
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -157,18 +157,18 @@ class PackageWriter(object):
|
||||
# pass
|
||||
|
||||
# def fs_ok_clicked(obj):
|
||||
# name = Utils.get_unicode_path_from_file_chooser(fs_top.get_filename())
|
||||
# name = get_unicode_path_from_file_chooser(fs_top.get_filename())
|
||||
# if os.path.isfile(name):
|
||||
# archive.add(name)
|
||||
|
||||
# fs_top = Gtk.FileChooserDialog("%s - GRAMPS" % _("Select file"),
|
||||
# buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
|
||||
# Gtk.STOCK_OK, Gtk.ResponseType.OK)
|
||||
# fs_top = gtk.FileChooserDialog("%s - GRAMPS" % _("Select file"),
|
||||
# buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
||||
# gtk.STOCK_OK, Gtk.ResponseType.OK)
|
||||
# )
|
||||
# response = fs_top.run()
|
||||
# if response == Gtk.ResponseType.OK:
|
||||
# fs_ok_clicked(fs_top)
|
||||
# elif response == Gtk.ResponseType.CANCEL:
|
||||
# elif response == gtk.RESPONSE_CANCEL:
|
||||
# fs_close_window(fs_top)
|
||||
|
||||
# fs_top.destroy()
|
||||
@@ -185,7 +185,7 @@ class PackageWriter(object):
|
||||
# during the process (i.e. when removing object)
|
||||
for m_id in self.db.get_media_object_handles(sort_handles=True):
|
||||
mobject = self.db.get_object_from_handle(m_id)
|
||||
filename = Utils.media_path_full(self.db, mobject.get_path())
|
||||
filename = media_path_full(self.db, mobject.get_path())
|
||||
archname = str(mobject.get_path())
|
||||
if os.path.isfile(filename) and os.access(filename, os.R_OK):
|
||||
archive.add(filename, archname)
|
||||
@@ -48,7 +48,7 @@ log = logging.getLogger(".ExportVCal")
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gui.plug.export import WriterOptionBox
|
||||
import Utils
|
||||
from gen.utils.db import family_name
|
||||
from gen.lib import Date, EventType
|
||||
from gui.glade import Glade
|
||||
|
||||
@@ -133,8 +133,7 @@ class CalendarWriter(object):
|
||||
m_date = event.get_date_object()
|
||||
place_handle = event.get_place_handle()
|
||||
# feature requests 2356, 1657: avoid genitive form
|
||||
text = _("Marriage of %s") % Utils.family_name(family,
|
||||
self.db)
|
||||
text = _("Marriage of %s") % family_name(family, self.db)
|
||||
if place_handle:
|
||||
place = self.db.get_place_from_handle(place_handle)
|
||||
self.write_vevent( text, m_date, place.get_title())
|
||||
@@ -48,7 +48,7 @@ log = logging.getLogger(".ExportVCard")
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
from gui.plug.export import WriterOptionBox
|
||||
import const
|
||||
from gen.const import PROGRAM_NAME, VERSION
|
||||
from gen.lib import Date
|
||||
from gen.lib.urltype import UrlType
|
||||
from gen.lib.eventtype import EventType
|
||||
@@ -180,7 +180,7 @@ class VCardWriter(object):
|
||||
self.writeln("BEGIN:VCARD")
|
||||
self.writeln("VERSION:3.0")
|
||||
self.writeln("PRODID:-//Gramps//NONSGML %s %s//EN" %
|
||||
(const.PROGRAM_NAME, const.VERSION))
|
||||
(PROGRAM_NAME, VERSION))
|
||||
|
||||
def write_footer(self):
|
||||
"""Write the closing lines of a VCard."""
|
||||
@@ -60,7 +60,7 @@ LOG = logging.getLogger(".WriteXML")
|
||||
import gen.lib
|
||||
from gen.updatecallback import UpdateCallback
|
||||
from gen.db.exceptions import DbWriteFailure
|
||||
import const
|
||||
from gen.const import VERSION
|
||||
from gen.constfunc import win
|
||||
from gui.plug.export import WriterOptionBox
|
||||
import libgrampsxml
|
||||
@@ -1279,7 +1279,7 @@ class XmlWriter(GrampsXmlWriter):
|
||||
|
||||
def __init__(self, dbase, user, strip_photos, compress=1):
|
||||
GrampsXmlWriter.__init__(
|
||||
self, dbase, strip_photos, compress, const.VERSION, user)
|
||||
self, dbase, strip_photos, compress, VERSION, user)
|
||||
self.user = user
|
||||
|
||||
def write(self, filename):
|
||||
@@ -37,8 +37,8 @@ import subprocess
|
||||
import libxml2
|
||||
|
||||
from libgrampsxml import GRAMPS_XML_VERSION
|
||||
from const import VERSION
|
||||
import ExportVCard
|
||||
from gen.const import VERSION
|
||||
import exportvcard
|
||||
|
||||
class VCardCheck(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user