Difference between revisions of "Addon:Import Text Gramplet"
(→Issues) |
m (add links to CSV configurable delimiter dialects docs) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 6: | Line 6: | ||
The {{man label|Import Text}} Gramplet allows you to paste the content of selected file formats and import directly into Gramps without having data in a file. | The {{man label|Import Text}} Gramplet allows you to paste the content of selected file formats and import directly into Gramps without having data in a file. | ||
* Gramps XML | * Gramps XML | ||
| − | * [[Addon:ImportGramplet#Import_CSV_.28spreadsheet_input.29|CSV (spreadsheet input)]] | + | * [[Addon:ImportGramplet#Import_CSV_.28spreadsheet_input.29|CSV (spreadsheet input)]] with [[Gramps_{{man version}}_Wiki_Manual_-_Settings#CSV_Dialect|configurable delimiter dialects]] |
* [https://wikipedia.org/wiki/VCard vCard] files - The vCard (Virtual Contact File or VCF) import and export currently supports only the version 3.0 format with property types for the name (FN, N, NICKNAME, SORT-STRING), address (ADR), telephone number (TEL), birthday (BDAY), occupation (ROLE), URL (URL), email address (EMAIL), and gender (GENDER, X-GENDER). This is a core subset of the dozens of property types available in the vCard format. | * [https://wikipedia.org/wiki/VCard vCard] files - The vCard (Virtual Contact File or VCF) import and export currently supports only the version 3.0 format with property types for the name (FN, N, NICKNAME, SORT-STRING), address (ADR), telephone number (TEL), birthday (BDAY), occupation (ROLE), URL (URL), email address (EMAIL), and gender (GENDER, X-GENDER). This is a core subset of the dozens of property types available in the vCard format. | ||
{{-}} | {{-}} | ||
| Line 22: | Line 22: | ||
* Create a new Family Tree to test the following. | * Create a new Family Tree to test the following. | ||
* Add the {{man label|Import Text}} Gramplet to your Dashboard. | * Add the {{man label|Import Text}} Gramplet to your Dashboard. | ||
| − | * Copy the contents of the [[Gramps_{{ | + | * verify which [[Gramps_{{man version}}_Wiki_Manual_-_Settings#CSV_Dialect|configurable delimiter dialect]] option is selected |
| + | * Copy the contents of the [[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees:_CSV_Import_and_Export#Example_CSV_with_multiple_areas|CSV example]] from User manual | ||
* Paste the contents directly into the text input area of the Gramplet. | * Paste the contents directly into the text input area of the Gramplet. | ||
* Then select the {{man button|Import}} button '''only once''' unless you want the same information imported multiple times. | * Then select the {{man button|Import}} button '''only once''' unless you want the same information imported multiple times. | ||
| Line 67: | Line 68: | ||
== See also == | == See also == | ||
| + | * [[Gramps_{{man version}}_Wiki_Manual_-_Settings#CSV_Dialect|configurable delimiter dialects]] | ||
| + | |||
Discourse forum discussion: | Discourse forum discussion: | ||
* [https://gramps.discourse.group/t/csv-template-for-text-import/5277/5 CSV template for Text Import] | * [https://gramps.discourse.group/t/csv-template-for-text-import/5277/5 CSV template for Text Import] | ||
| − | |||
* [[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees:_CSV_Import_and_Export|CSV Import]] (the CSV foundation for the interactive [[Addon:ImportGramplet|Import Gramplet]] addon) | * [[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees:_CSV_Import_and_Export|CSV Import]] (the CSV foundation for the interactive [[Addon:ImportGramplet|Import Gramplet]] addon) | ||
Latest revision as of 14:53, 1 March 2026
This is a Third-party Addon. The Addon/Plugin system is controlled by the Plugin Manager. Please use carefully on data that is backed up, and help make it better by reporting any issues to the bug tracker. |
The Import Text Gramplet allows you to paste the content of selected file formats and import directly into Gramps without having data in a file.
- Gramps XML
- CSV (spreadsheet input) with configurable delimiter dialects
- vCard files - The vCard (Virtual Contact File or VCF) import and export currently supports only the version 3.0 format with property types for the name (FN, N, NICKNAME, SORT-STRING), address (ADR), telephone number (TEL), birthday (BDAY), occupation (ROLE), URL (URL), email address (EMAIL), and gender (GENDER, X-GENDER). This is a core subset of the dozens of property types available in the vCard format.
Contents
Usage
From the Dashboard use the context menu (right-click) to add the Import Text Gramplet.
Example
Import CSV (spreadsheet input)
To import a CSV you could:
- Create a new Family Tree to test the following.
- Add the Import Text Gramplet to your Dashboard.
- verify which configurable delimiter dialect option is selected
- Copy the contents of the CSV example from User manual
- Paste the contents directly into the text input area of the Gramplet.
- Then select the Import button only once unless you want the same information imported multiple times.
- Then empty the text input area by selecting the Clear button.
- View the imported results in Gramps
- If you want to reverse the imported result because you made a mistake or pressed the Import button multiple times you can select Edit > Undo CSV import from the Gramps menu as many times as you need.
Troubleshooting a Place list Import
Every text parser has expectations of the format. So it is important to do that testing with a blank Family Tree. Empty Family Trees make it easier to find where each piece of data lands.
Generally, CSV files that contain text strings simply enclose that data with double-quotes to make it seem as a single block of text. Experiments with this parser have shown that any extra spaces after the Comma Separators made it ignore those quotes and the line breaks too.
Place,Name,Type,latitude,longitude [P001],"Columbus,Franklin,OH,USA",City,, [P002],"Las Cruces,Dona Ana,NM,USA",City,, [P003],"Dunellen,Middlesex,NJ,USA",City,, [P004],"New York,New York,NY,USA",City,, [P005],"Metairie,Jefferson,LA,USA",City,, [P006],"Hopkins,Hennepin,MN,USA",City,, [P007],"Camarillo,Ventura,CA,USA",City,34.2164,-119.0376 [P008],"San Antonio,Bexar,TX,USA",City,, [P009],"Abilene,Dickinson,KS,USA",City,, [P010],"Fairbanks,Fairbanks North Star,AK,USA",City,, [P011],"Miami,Miami-Dade,FL,USA",City,,
Notice that the sample place list has placeholder commas when the Latitude and Longitude are missing for 10 of the 11 rows. And this test data has the Place name in the flat form. After importing, you can use the Generate hierarchy option of the Place Update addon Gramplet to convert the flat form into a hierarchy. Then filter for Unknown types and use the Place Type option to set the State and County types to an extended selection of the enclosing Places.
The example above is for importing non-hierarchical Place definitions. You would still have to reassemble the hierarchy. The following example assembles a country enclosing a state having 2 counties. And one of those counties has a city.
You'll notice that the last line does not specify a Place ID. This lets Gramps use the next automatically generated ID. But, the drawback is that if you were to run this import twice, The Import Text addon wouldn't recognize it as an existing place and would create a duplicate Place of the same name, in the same county. This addon ONLY compares IDs and uses matching IDs to update/overwrite records rather than create new ones.
Place,Enclosed_by,Name,Type,Latitude,Longitude [P23],,USA,Country,38.9072,-77.0369 [P35],[P23],OH,State,39.9612,-82.9988 [P36],[P35],Franklin county,County,40.0155,-82.9932 [P30],[P36],Columbus,City,39.9612,-82.9988 ,[P35],Mahoning county,County,40.9872,-80.7214
Issues
- Feature Request: 5436 allow import from pasted GEDCOM file.
See also
Discourse forum discussion:
- CSV Import (the CSV foundation for the interactive Import Gramplet addon)

