De:Gramps 3.4 Wiki Handbuch - Stammbäume Verwalten: CSV Import und Export

From Gramps
Revision as of 10:46, 13 April 2012 by Leonhaeuser (talk | contribs) (Export)
Jump to: navigation, search
Gnome-important.png Spezielle Copyright Notiz: Alle Änderungen auf dieser Seite müssen unter zwei copyright Lizenzen stehen:

Diese Lizenzen ermöglichen es dem Gramps-Projekt die bestmögliche Verwendung dieses Handbuchs als freien Inhalt in zukünftigen Gramps Versionen. Wenn du mit dieser dual Lizenzierung nicht einverstanden bist, bearbeite diese Seite nicht. Du darfst zu anderen Seiten des Wiki die nur unter die GFDL Lizenz fallen nur über externe Links (verwende die Syntax: [http://www.gramps-project.org/...]), nicht über interne Links verlinken.
Außerdem verwende nur die Bekannten Drucktechnische Konventionen



Zurück Index Nächste


Gramps Tabellen Import/Export

Dieses Format ermöglicht dir eine Datentabelle am Stück zu Importieren/Exportieren. Die Tabelle muss das Komma getrennte Werte (CSV) Format besitzen. Die meisten Tabellenkalkulationsprogramme können dieses Format lesen und schreiben. Es kann auch einfach manuell geschrieben werden. Dies ist das einzige Gramps Importformat welches eine Zusammenführung mit bestehenden Daten ermöglicht.

Gramps-notes.png
Dieses Tabellenformat ermöglicht nicht den 100% Export der Gramps Daten

Es exportiert/importiert nur eine Teilmenge der Daten namentlich: Personen (Namen), Geburts- und Todesereignisse und Beziehungen(Eltern und Kinder).

Es gibt drei Hauptanwendungen für dieses Format:

  1. Du kannst deine Gramps Kerndaten in ein Tabellenformat exportieren, sie mit einer Tabellenkalkulation oder Textverarbeitung bearbeiten und die Änderungen und Zusätze zurück nach Gramps importieren. Dies ist praktisch um es an andere zum Ausfüllen zu senden oder für Unterwegs, wenn du nicht deine komplette Gramps Anwendung zur Verfügung hast.
  2. Du kannst neue Daten in deine Gramps Datenbank importieren. Zum Beispiel, wenn du eine Reihe von neuen Personen zum hinzuzufügen deiner Datenbank hast, aber nicht mühsam schauen und suchen willst, wo sie hingehören, kann es sein, das du es einfacher findest sie alle in eine Tabelle zu schreiben, und sie dann schnell auf einmal einzulesen. Dies ist praktisch wenn du eine große Menge von Daten aus einer anderen Anwendung oder dem Netz kopiert hast. Ein Beispiel dafür ist wiederherstellen deiner Gramps Datenbank durch laden der Erzählenden Website in eine Tabelle.
  3. Du kannst auch eine Reihe von Korrekturen und Ergänzungen importieren. Nehmen wir an, du hast einen Bericht ausgedruckt und gehst ihn durch und markierst Korrekturen. Wenn du aus jeder Korrektur einen Abschnitt einer Tabelle erstellst, kannst du "die Änderungen Skripten" und sie dann alle auf einmal durchführen.

Export

Um deine Datenbank zu exportieren:

  1. Starte Gramps
  2. Wähle Datei->Export aus dem Menü
  3. Wähle Komma getrennte Werte Tabelle (CSV)

Eine ausgewählte Anzahl von Feldern deiner Genealogiedaten wird in eine .csv Datei in dem unten beschriebenen Format geschrieben. Zusätzlich werden die Personen und Familien mit Verweisen versehen so das die Daten bearbeitet und wieder eingelesen werden können und dabei die Datenbank aktualisieren.

Es gibt einige leere Spalten besonders Notiz und Quellen Spalten. Sie werden in der Tabelle aufgeführt, so das du Notizen für den Import machen kannst, Notizen und Quellen werden nie mit diesem Werkzeug exportiert.

Deine Daten werden in drei Bereiche aufgeteilt Personen, Heiraten und Kinder. Die exportierten Felder und Spaltennamen sind:

Personen
Person, Nachname, Vorname, Rufname, Suffix, Präfix, Titel, Geschlecht, Geburtsdatum, Geburtsort, Geburtsquelle, Todesdatum, Todesort, Todesquelle, Notiz
Heiraten
Heirat, Ehemann, Frau, Datum, Ort, Quelle, Notiz
Familien
Familie, Kind

Die erste Spalte in jedem Bereich ist die Gramps ID. Dies ist was deine Bearbeitungen mit den original Daten verbindet, also ändere diese Daten nicht. Load this file into your favorite spreadsheet using comma separated, double-quote text delimited, and Text format (any encoding for now). Then you can add or correct data, and save it back out, keeping the same format. Du kannst dann die Daten über deine alten Daten importieren und sie werden korrigiert.

Gramps-notes.png
Open/Libre Office erlaubt dir die Autoformatierung auszuschalten wenn du die CSV Datei öffnest

If you don't do this, Open/Libre Office may interpret the dates incorrectly. Change the type of the column to Text rather than Standard. If your spreadsheet program doesn't allow you to format the fields before you get it into columns (eg, Excel) you need to change the display format of dates in GRAMPS before you export. You can do this under Edit -> Preferences -> Display -> Date Format.

Import

Um deine Daten zu importieren:

  1. use the file from above, or create a spreadsheet (described below) with genealogical data
  2. start up gramps
  3. import the file into your current database

The merge part of this code will only add or update information to your database, and it always assume that the spreadsheet data is the correct version.

If you load this spreadsheet into Open/Libre Office, make sure you select each column as type Text rather than Standard. Standard will reformat your dates and numbers. Also, if you use Excel, you will probably want to select all cells once opened, and change the format of the cells to Text.

The spreadsheet is data made up of columns. Each column should have at the top of it the name of what type of data is in the column. You must use special names for the columns. Currently they are:

Personen

person -  a reference to be used for families (marriages, and children) 
grampsid - to assign a gramps id to the person
firstname - a person's first name
surname/lastname - a person's last name
callname - a common name (nickname) for the person
prefix - surname prefix (von, de, etc)
suffix - a suffex of a person's name (Jr., Sr.)
title - a person's title (Dr., Mr.)
gender - male or female (you should use the translation for your language)
note - a note for the person's record
birthdate - date of birth
birthplace - place of birth
birthsource - source material for birth
grampsid - give a particular gramps id
deathdate - date of death
deathplace - place of death
deathsource - source material for death
deathcause - cause of death

Hochzeiten

marriage - if you want to reference this from a family, you'll need a matching name here
husband/father/parent1 - the reference of the person above who is the husband 
                         (for female parent1, you'll need to put gender in the person area, 
                         or edit it later in gramps)
wife/mother/parent2 - the reference of the person above who is the wife 
                         (for male parent2, you'll need to put gender in the person area, 
                         or edit it later in gramps)
date - the date of the marriage
place - the place of the marriage
source - source materials of the marriage
note - a note about the marriage/wedding

Familie

family - a reference to tie this to a marriage above (required)
child - the reference of the person above who is a child
source - source materials of the marriage
note - a note about the family
gender - male or female (you should use the translation for your language) 
         [You can put gender here, or in person above]

Details

Case doesn't matter. Notice that the names don't use underscores in them. You may use any combination of these, in any order. (Actually, you have to at least have a surname and a given name when defining a person, and you have to have a marriage and child columns when defining children, but that is it.) The column names are the English names given (for now) but the data should be in your language (including the words "male" and "female").

Each of these can go in its own area in a spreadsheet. There is no limit to the number of areas in a sheet, and each area can have any number of rows. Leave a blank row between "areas". Just make sure that areas are not next to each other; they must be above and below one another.

You can have mutiple areas of each kind on a spreadsheet. The only limitation is that if you refer to a person, you must do that in a row lower than where that person is described. Likewise, if you refer to a marriage, you must do that in a row lower than where the marriage is described.

If you are entering the data in a text file, and if you wish to have a comma inside one of the values, like "Clinton, Co., MO" then you need place the entire value in double-quotes and put the first double-quote right after the preceding comma. For example:

marriage, person1, person2, place
m1, p1, p2,"Clinton, Co., MO"
m2, p3, p4,"Havertown, PA"

A spreadsheet program will do this automatically for you.

Here is an example spreadsheet in Open/Libre Office, but any spreadsheet program should work.

Test-csv.jpg

Notice that the data need not begin in the first column, nor in the first row.

And here is the resulting data in gramps:

Screenshot-1.jpg

Here is an example of a CSV text spreadsheet with multiple areas:

Firstname, Surname, Birthdate
John,      Tester,  11/11/1965
Sally,     Tester,  01/26/1973

Person, Firstname, Surname
p1,     Tom,       Smith
p2,     Mary,      Jones
p3,     Jonnie,    Smith
p5,     James,     Loucher
p6,     Penny,     Armbruster
p7,     Tim,       Sparklet

Marriage, Husband, Wife
m1,       p1,      p2
m2,       p5,      p6

Family, Child
m1,     p3
m1,     p6
m2,     p7

If you cut and paste that into a file, you can import it directly.

If you make your references be gramps IDs inside square brackets, then you can refer to people already in the database, like this:

Person,    Firstname, Lastname
joe's boy, Harry,     Smith

Family,  Child
[F1524], joe's boy

Husband, Wife
[I0123], [I0562]

firstname, surname
Timothy, Jones

This example would create and add Harry Smith to the previously existing family in gramps, family F1524.

Also, this example would marry two previously existing people, I0123, and I0562.

Finally, this also creates a person named Timothy Jones who is not related to anyone.

Real World Example

In this example, I had an entire generation to enter, 16 names with marriage dates. The children I already had in the database. I entered them into Open/Libre Office:

Gen5-spreadsheet.jpg

Notice that you can use numbers or strings as the reference names between areas. In the person area, I used the numbers 1 through 16. That made it easy to refer to them in the second area of marriages. The marriages are labeled with the letters A through H.

HINT

Open/Libre Office allows you to turn off autoformatting when you open the CSV file. If you don't do this, Open/Libre Office may interpret the dates incorrectly. Change the type of the column to Text rather than Standard. If your spreadsheet program doesn't allow you to format the fields before you get it into columns (eg, Excel) you need to change the display format of dates in gramps before you export. You can do this under Edit -> Preferences -> Display -> Date Format.

Also note that the children in the third area are existing people as indicated by the brackets around the gramps IDs.

Saving as CSV and importing into gramps produces the far right-hand column in the tree:

Gen5-gramps.jpg


Zurück Index Nächste