Re: Problem with custom events

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

Re: Problem with custom events

J. Allen Crider-2
One way to do it would be to edit a Gramps XML file.  Export the
database to either a Gramps XML file or Gramps XML Package.  The Gramps
XML file is a compressed XML file so you can use gunzip to uncompress it
and then edit it in any text editor.  After editing it, create a new
family tree and import the modified file.

If you export to a Gramps XML Package, it will be a compressed tar file
that contains all media objects and a compressed XML file.  Uncompress
and untar it, uncompress the XML file, edit it, and rebuild the
compressed tar file using the modified XML file.  Import this into a new
family tree to recover your family tree with media objects and the
modified event types.

Allen Crider

On 03/10/2018 02:05 PM, Doug wrote:

> Hi,
>
> I'd be glad of some help.
>
> Some years ago I created a custom event with the name "port of call" and
> entered a number of events that way, then some time later, I couldn't
> find it, because at that time custom events appeared only as a haphazard
> list. So I created it again.
>
> The name I chose was supposed to be the same but turned out minutely
> different,  "Port of Call".
>
> As both versions appear in the custom event type list  - now thank
> heavens in alphabetical order - that didn't seem to matter.
>
> However since then I've gone through several updates of gramps and I now
> find that all the "Port of Call" events have been removed from the
> people they were attached to and are listed as Unused Objects. It's been
> a very painful business putting them back in place. The "port of call"
> events are OK.
>
> So my questions are:
>
> where is the list of custom events kept?
>
> is it possible to edit this, in or out of gramps, to get rid of one or
> other of the clashing alternatives?
>
> Why does the custom list show both alternatives happily while at some
> stage during exporting and importing small letter "p" kills capital "P"?
>
> If I now export with the unedited list but no actual  "port of call"
> events,  but all changed to "Port of Call", do I lose the lot?
>
> Doug
>
>
> ------------------------------------------------------------------------------
>
> 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: Problem with custom events

Doug-11
Thanks. I'm aware of the gramps XML file.
However my problem is not with the actual data - I've
already corrected those.
It's with the place in the underlying program where
particular lists are kept. Sorry, that must be as clear as mud.

I'm thinking of something equivalent to
./.gramps/gramps42/custom_filters.xml where custom filters
are kept.
Where is such a file for custom events to be found?

Doug


On 10/03/18 21:10, J. Allen Crider wrote:

> One way to do it would be to edit a Gramps XML file. 
> Export the database to either a Gramps XML file or Gramps
> XML Package.  The Gramps XML file is a compressed XML file
> so you can use gunzip to uncompress it and then edit it in
> any text editor.  After editing it, create a new family
> tree and import the modified file.
>
> If you export to a Gramps XML Package, it will be a
> compressed tar file that contains all media objects and a
> compressed XML file. Uncompress and untar it, uncompress
> the XML file, edit it, and rebuild the compressed tar file
> using the modified XML file. Import this into a new family
> tree to recover your family tree with media objects and
> the modified event types.
>
> Allen Crider
>
> On 03/10/2018 02:05 PM, Doug wrote:
>> Hi,
>>
>> I'd be glad of some help.
>>
>> Some years ago I created a custom event with the name
>> "port of call" and entered a number of events that way,
>> then some time later, I couldn't find it, because at that
>> time custom events appeared only as a haphazard list. So
>> I created it again.
>>
>> The name I chose was supposed to be the same but turned
>> out minutely different,  "Port of Call".
>>
>> As both versions appear in the custom event type list  -
>> now thank heavens in alphabetical order - that didn't
>> seem to matter.
>>
>> However since then I've gone through several updates of
>> gramps and I now find that all the "Port of Call" events
>> have been removed from the people they were attached to
>> and are listed as Unused Objects. It's been a very
>> painful business putting them back in place. The "port of
>> call" events are OK.
>>
>> So my questions are:
>>
>> where is the list of custom events kept?
>>
>> is it possible to edit this, in or out of gramps, to get
>> rid of one or other of the clashing alternatives?
>>
>> Why does the custom list show both alternatives happily
>> while at some stage during exporting and importing small
>> letter "p" kills capital "P"?
>>
>> If I now export with the unedited list but no actual 
>> "port of call" events,  but all changed to "Port of
>> Call", do I lose the lot?
>>
>> Doug
>>
>>
>> ------------------------------------------------------------------------------
>>
>> 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



------------------------------------------------------------------------------
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: Problem with custom events

Nick Hall
On 11/03/18 12:31, Doug wrote:
> I'm thinking of something equivalent to
> ./.gramps/gramps42/custom_filters.xml where custom filters are kept.
> Where is such a file for custom events to be found?

They are stored in the metdata table in the database.  The key
"event_names" contains a list of strings.

Nick.


------------------------------------------------------------------------------
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: Problem with custom events

prculley
To expand on Nick's answer a bit, the 'customized' events (indeed any of the lists of types that has user added elements) are stored in the database, not in any .ini or .xml file.  If you want to get rid of these elements, you will have to export your tree to an Gramps XML file and then import it into a new Family tree (database).  These custom elements are not included in the Gramps XML (as additions to lists), although any actual use of the custom elements (say an actual event with the customized type) remains in place.

The New tree would be identical to the original, but the additional elements in the various lists would disappear.

Paul C.

On Sun, Mar 11, 2018 at 7:52 AM, Nick Hall <[hidden email]> wrote:
On 11/03/18 12:31, Doug wrote:
I'm thinking of something equivalent to ./.gramps/gramps42/custom_filters.xml where custom filters are kept.
Where is such a file for custom events to be found?

They are stored in the metdata table in the database.  The key "event_names" contains a list of strings.

Nick.



------------------------------------------------------------------------------
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: Problem with custom events

Ron Johnson
In reply to this post by Nick Hall
On 03/11/2018 10:15 AM, Paul Culley wrote:
To expand on Nick's answer a bit, the 'customized' events (indeed any of the lists of types that has user added elements) are stored in the database, not in any .ini or .xml file.  If you want to get rid of these elements, you will have to export your tree to an Gramps XML file and then import it into a new Family tree (database).  These custom elements are not included in the Gramps XML (as additions to lists), although any actual use of the custom elements (say an actual event with the customized type) remains in place.

The New tree would be identical to the original, but the additional elements in the various lists would disappear.

Are you saying that unused custom events will disappear?

--
Angular momentum makes the world go 'round.

------------------------------------------------------------------------------
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: Problem with custom events

Nick Hall
On 11/03/18 16:27, Ron Johnson wrote:
Are you saying that unused custom events will disappear?

Yes.  Importing into an empty database will reconstruct the metadata.

Nick.



------------------------------------------------------------------------------
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: Problem with custom events

Brad Rogers
In reply to this post by prculley
On Mon, 12 Mar 2018 12:32:20 +0000
Doug <[hidden email]> wrote:

Hello Doug,

>So having changed all the "port of call" events to "Port of
>Call", export followed by a fresh import should clean up the
>event type list.

Yes.  As I mentioned, I always close down then run Gramps again before
performing the import.  It might be belts 'n' braces to do so, but hey...

--
 Regards  _
         / )           "The blindingly obvious is
        / _)rad        never immediately apparent"
It's only bits of plastic, lines projected on the wall
Keep It Clean - The Vibrators

------------------------------------------------------------------------------
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

attachment0 (499 bytes) Download Attachment