Top

geofinder.GrampsCsv module

Functions

def capwords(

text)

Change text from lowercase to Title Case (but fix the title() apostrophe bug)

Args:

text:

Returns:

Text with Title Case

def hierarchy_level(

key)

Classes

class CSVEntry

Ancestors (in MRO)

Class variables

var ADMIN1_ID

var ADMIN2_ID

var ENCLOSED_BY

var FEAT

var ISO

var LAT

var LON

var NAME

var PLACE_ID

var TITLE

var TYPE

class GrampsCsv

Create a CSV file which can be used to import place names into Gramps This will create any missing 'enclosure' locations, e.g. Dallas, Texas is enclosed by Texas First call add_place() for each place. When done adding places, call create_enclosures(). This will create any missing enclosure locations Then call write_csv_file(). This will write out a CSV file

Ancestors (in MRO)

Static methods

def __init__(

self, in_path, geodata)

Args:

in_path: This will write to in_path with .CSV appended geodata: geodata.Geodata

def add_place(

self, place)

Create a CSV node in Dictionary for specified place with the following: Place (ID), Title, Name, Type, latitude, longitude, enclosed_by Call create_csv_node for each place in the ancestry file

Args:

place: Loc.Loc location

def create_enclosures(

self)

Walk through all entries and create any missing enclosure items

def write_asis(

self, entry)

Write entry as-is since it couldnt be found

def write_csv_file(

self)

Write out as CSV file for import to Gramps

Instance variables

var csvfile

var geodata

var hierarchy_dictionaries

var logger