Only exporting places

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Only exporting places

Ron Johnson
Hi,

How does one do this?  (I want to load existing places into a new tree,
which is a GEDCOM I've received.)

--
World Peace Through Nuclear Pacification


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Only exporting places

paul womack
Ron Johnson wrote:
> Hi,
>
> How does one do this?  (I want to load existing places into a new tree, which is a GEDCOM I've received.)
Easiest way is to decompress the .gramps file, and simple remove everything else in an editor, then recompress.

  BugBear


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Only exporting places

Ron Johnson
In reply to this post by Ron Johnson
On 11/28/2017 02:59 AM, paul womack wrote:
> Ron Johnson wrote:
>> Hi,
>>
>> How does one do this?  (I want to load existing places into a new tree,
>> which is a GEDCOM I've received.)
> Easiest way is to decompress the .gramps file, and simple remove
> everything else in an editor, then recompress.

Perl one-liner I found to extract all data between two tags:

$ perl -lne 'BEGIN{undef $/} while (/<places>(.*?)<\/places>/sg){print $1}'
mytree.gramps > mytree_places.xml

--
World Peace Through Nuclear Pacification


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Only exporting places

prculley
A difficulty with extracting places ONLY from the XML is that if the places contain references to citations, notes, or media, then the resulting XML file will be incomplete.  I'm not sure what Gramps would do with that...

And you don't have to re-compress, Gramps will happily accept uncompressed XML files.

I would suggest trying to export via CSV, then drop everything but places, and import again, but I think I remember that there was a bug on that recently, and I am not sure if a released version of Gramps has the fix yet.

Paul C.

On Tue, Nov 28, 2017 at 8:30 AM, Ron Johnson <[hidden email]> wrote:
On 11/28/2017 02:59 AM, paul womack wrote:
Ron Johnson wrote:
Hi,

How does one do this?  (I want to load existing places into a new tree, which is a GEDCOM I've received.)
Easiest way is to decompress the .gramps file, and simple remove everything else in an editor, then recompress.

Perl one-liner I found to extract all data between two tags:

$ perl -lne 'BEGIN{undef $/} while (/<places>(.*?)<\/places>/sg){print $1}' mytree.gramps > mytree_places.xml


--
World Peace Through Nuclear Pacification


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Only exporting places

Dave Scheipers
In reply to this post by Ron Johnson
Hi Ron, Try this.

Export your database to .gramps XML using a filter that actually selects no one.

Filter Rule >> Select Everyone
Check the box to do the opposite

Then Import this file into a new empty database. This will be
everything except people and families.

Then start deleting. Start with events which they all can be deleted.
Then in other areas delete the unused items. I suggest using a filter
in each area (Reference Count = 0)

When you are done deleting, you should be left with all the place
records and only those other items (citations, media, etc) attached to
place records. Whether or not you want these you will at least know
which items you may need to deal with.

Hope this helps, Dave


On Mon, Nov 27, 2017 at 4:31 PM, Ron Johnson <[hidden email]> wrote:

> Hi,
>
> How does one do this?  (I want to load existing places into a new tree,
> which is a GEDCOM I've received.)
>
> --
> World Peace Through Nuclear Pacification
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org