It:Manuale Wiki per Gramps 5.0 - Importare ed esportare CSV
Precedente | Indice | Successivo |
Contents
Importare/esportare i fogli di calcolo Gramps
Questo formato consente di importare / esportare un foglio di calcolo di dati tutti in una volta. Il foglio di calcolo deve essere nel formato CSV (acronimo di Comma Separated Value, letteralmente Valori separati da virgole). La maggior parte dei programmi di fogli di calcolo può leggere e scrivere questo formato. È anche facile da scrivere a mano. Questo è l'unico formato di importazione di Gramp che consente l'unione con i dati esistenti.
Ci sono tre usi principali per questo formato:
- Puoi esportare i dati principali di Gramp in un formato di foglio di calcolo, modificarlo con un programma di testo o foglio di calcolo e importare le modifiche e le aggiunte in Gramps. Questo è utile per l'invio ad altri che lo devono compilare, o per iniziare quando non hai la tua piena padronanza di Gramps.
- Puoi importare nuovi dati nel tuo database di Gramps. Ad esempio, se hai un gruppo di nuove persone da aggiungere al tuo database, ma non vuoi cercare e trovare il modo per trovare dove vanno inseriti, potresti trovare più facile scriverle in un foglio di calcolo e poi portarle rapidamente tutti in una volta. Questo è utile se hai una grande quantità di dati che stai tagliando e incollando da un'altra applicazione o dal web. Un esempio di questo restoring your Gramps database che carica le Narrative Website in un foglio di calcolo.
- Puoi anche importare una serie di correzioni e aggiunte. Immagina di aver stampato un rapporto, e lo stai seguendo segnando le correzioni. Se copi a ciascuna correzione in una sezione di un foglio di calcolo, puoi "scrivere le modifiche" e quindi eseguirle tutte in una volta.
Esporta
Per esportare la tua base di dati:
- Avvia GrampsSeleziona dal menu Alberi genealogici ->Esporta....
- Seleziona Successivo nella finestra Salvataggio dei dati.
- Seleziona Foglio di calcolo Comma Separated Values (CSV) nella finestrae Scelta del formato di output.
- Nella finestra Opzioni di esportazione.
- Nella parte superiore seleziona quali filtri applicare al tuo Albero genealogico
- Dalle caselle di controllo seleziona quali elementi includere nell'esportazione (persone, matrimoni, figli, luoghi) e se tradurre le intestazioni nella lingua che stai utilizzando.
Un insieme selezionato di campi dei tuoi dati genealogici verranno salvati nel file .csv nel formato descritto di seguito. Inoltre, le persone e le famiglie sono referenziate in modo che possano essere modificate e reinserite, aggiornando così la base dei dati.
Ci sosono delle colonne che potranno apparire vuote, in sparticolare le colonne note e fonti. Questi sono elencati nel foglio di calcolo in modo da poter prendere appunti per l'importazione, ma le note non vengono mai esportate con questo strumento.
Da Gramps 3.3 Adesso puoi esportare anche le fonti; in precedentza nessuna fonte veniva esportata. |
I tuoi dati sono suddivisi in quattro sezioni che rappresentano luoghi, individui, matrimoni e figli. I nomi dei campi e delle colonne esportate sono:
- Luoghi
- Luogo, Titolo, Nome, Tipo, Latitudine, Longitudine, Codice, Enclosed_by, Data
- Persone
- Persona, Cognome, Nome, Callname, Suffisso, Prefisso, Titolo, Genere, Data di nascita, Luogo di nascita (o relativo id), fonte della nascita, data del Battesimo, luogo di Battesimo (o relativo id), fonte del battesimo, data del decesso, luogo del decesso (o relativo id), fonte del decesso, data di sepoltura, luogo di sepoltura (o relativo id), fonte della sepoltura, Note
- Matrimoni
- Matrimonio, Marito, Moglie, Data, Luogo (o relativo id), Fonte, Nota
- Famiglie
- Famiglia, Figli
LA prima colonna in ogni area è il gramps ID. Questo è ciò che legherà le tue modifiche ai dati corretti, quindi non modificare questi dati. Carica questo file nel tuo foglio di lavoro preferito usando il testo delimitato da virgole, o testo tra virgolette doppie e testo (qualsiasi codifica per ora). Quindi puoi aggiungere o correggere i dati e salvarli di nuovo, mantenendo lo stesso formato. È quindi possibile reimportare i dati sovrascrivendoli ai vecchi dati verranno corretti.
.
.
Importare
Per importare i tuoi dati:
- Usa il file creato come sopra, o crea un foglio di calcolo (come descritto di seguito) con dati genealogici
- Avvia Gramps
- Crea un nuovo albero genealogico
- Seleziona da menu Alberi genealogici ->Importa...
- Seleziona il file Foglio di calcolo Comma Separated Values (CSV) e poi premi il pulsante Importa
La parte di unione di questo codice aggiungerà o aggiornerà solo le informazioni sulla base di dati e presumerà sempre che i dati del foglio di calcolo siano la versione corretta.
Se carichi questo foglio di calcolo in LibreOffice, assicurati di selezionare ogni colonna come tipo Testo al posto di Standard. Standard riformatterà le tue date e numeri. Inoltre, se si utilizza Excel, è probabile che si desideri selezionare tutte le celle una volta aperte e modificare il formato delle celle in Testo.
Il foglio di calcolo è composto da colonne. Ogni colonna dovrebbe avere in cima al nome il tipo di dati nella colonna. È necessario utilizzare nomi speciali per le colonne. Attualmente sono:
Luoghi
place - a reference to this place title - title of place name - name of place type - type of place (eg, City, County, State, etc.) latitude - latitude of place longitude - longitude of place code - postal code, etc. enclosed_by - the reference to another place that encloses this one date - date that the enclosed_by place was in effect
Persone
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 suffix 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 birthplaceid - place id of birth birthsource - source title for birth baptismdate - date of baptism baptismplace - place of baptism baptismplaceid - place id of baptism baptismsource - source title of baptism deathdate - date of death deathplace - place of death deathplaceid - place id of death deathsource - source title for death deathcause - cause of death burialdate - date of burial burialplace - place of burial burialplaceid - place id of burial burialsource - source title of baptism
Matrimoni
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 placeid - the place id of the marriage source - source title of the marriage note - a note about the marriage/wedding
Famiglie
family - a reference to tie this to a marriage above (required) child - the reference of the person above who is a child source - source title 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
Column names are not case-sensitive. You may use any combination of the columns, in any order. (Actually, you have to at least have a surname and a given name when defining a person, you have to have a marriage and child columns when defining children, and places need a place reference, 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").
Top-to-bottom order is important in that if you want to reference something in one area to another, the definition MUST come first. For example, if you want to define families of people, the individuals must be defined before the families. The same applies to places. So it is usually best to put the Places data first, people next, then marriages and families.
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 multiple 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. References to enclosed_by places must already exist in the database, or be defined in rows above in the spreadsheet.
If you use the 'grampsid' as a way to assign specific ids, be very careful when importing to a current database. Any data you enter will overwrite the data assigned to that grampsid. If you use ids in the place, person, marriage, or family columns that are surrounded by brackets (for example '[I0001]'), the values you use will be interpreted as grampsids as well. If you are adding new items, you are encouraged to avoid use of the bracket format or grampsid columns, so as to avoid accidentally overwriting your data. If you are mixing the bracket (or grampsid) methods with plain references (no brackets), put the plain referenced data after the bracket referenced data.
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, parent1, parent2, 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 LibreOffice, but any spreadsheet program should work.
Notice that the data need not begin in the first column, nor in the first row.
And here is the resulting data in Gramps:
Example CSV with multiple areas
Here is an example of a CSV text spreadsheet with multiple areas:
Place, Title, Name, Type [P0001], Michigan, Michigan, State L1, Canada, Canada, Country L2, USA, USA, Country Firstname, Surname, Birthdate, Birth place id John, Tester, 11/11/1965, L1 Sally, Tester, 01/26/1973, L1 Person, Firstname, Surname, Birthdate, Birth place id p1, Tom, Smith, 22 Jan, 1970, [P0001] p2, Mary, Jones p3, Jonnie, Smith p5, James, Loucher p6, Penny, Armbruster [P0002],Tim, Sparklet Marriage, Husband, Wife m1, p1, p2 m2, p5, p6 Family, Child m1, p3 m1, p6 m2, [P0002]
If you cut and paste that into a file (or use the Import Gramplet), you can import it directly.
A date can be any valid Gramps date, including dates formats like "26 JAN 1973" or "26.1.1973".
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 place, enclosed_by [P0001], [P0002]
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.
This also creates a person named Timothy Jones who is not related to anyone.
Finally, this also make place P0001 be enclosed by place P0002.
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 LibreOffice:
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.
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:
Previous | Index | Next |
Special copyright notice: All edits to this page need to be under two different copyright licenses:
These licenses allow the Gramps project to maximally use this wiki manual as free content in future Gramps versions. If you do not agree with this dual license, then do not edit this page. You may only link to other pages within the wiki which fall only under the GFDL license via external links (using the syntax: [https://www.gramps-project.org/...]), not via internal links. |