* Gramps and Gedcom Export Plugin

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
rcpettit
Diamond
Posts: 90
Joined: 30 Apr 2015 00:01
Family Historian: V7

Gramps and Gedcom Export Plugin

Post by rcpettit »

Being a Lumper, is there a way to get the Gedcom Export Plugin to export a citation footnote to gramps citation Description/Place field. If a citation is based on a template setup for lumping, the gramps citation description field is left blank. The citation footnotes has the information needed for this field.
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Gramps and Gedcom Export Plugin

Post by tatewise »

Sorry, but that is not currently possible.
The only mechanism that can render Footnote text is embedded in the Source record, so Citation-specific fields cannot be involved.

Improvements in this area are currently being discussed in the New Wish List Request forum.
See User display of Footnote, Bibliography & Short Footnote text (22454).
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
rcpettit
Diamond
Posts: 90
Joined: 30 Apr 2015 00:01
Family Historian: V7

Re: Gramps and Gedcom Export Plugin

Post by rcpettit »

The plugin Citations to Source is able to get this information so it should be able to copy the footnote to gramps description field for citations using the export gedcom plugin also.
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Gramps and Gedcom Export Plugin

Post by tatewise »

I'm not sure which plugin you are referring to so can you provide more explicit details please.

The nearest I can find is List All Citations for a Selected Source from the Plugin Store but that does NOT list Footnote or Bibliography details.

Perhaps you are thinking of the View > Citations to Source Record... command which is NOT a plugin.
It is similar to the menu option discussed in citations to sources query (22271).

I reiterate, plugins cannot produce Footnotes that involve Citation-specific metafields.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Gramps and Gedcom Export Plugin

Post by Mark1834 »

tatewise wrote: 19 Nov 2023 11:29 I reiterate, plugins cannot produce Footnotes that involve Citation-specific metafields.
I thought I understood this, but I'm confused now :?. If I have a fact cited to a lumped source, a plugin could get the source, hence the linked template, hence the footnote definition. Once it has this, it could substitute the format codes with the actual values for that citation, giving an output similar to View > Citations to Source Record.

I think what you actually mean is that it is not feasible to write a plugin for general use that copes with all possible formatting scenarios (and I agree fully with that), but a user with plugin authoring skills who is familiar with their own data could produce such an output, but it would need specific coding.

Is that a fair distinction, or have I missed a critical step...?
Mark Draper
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Gramps and Gedcom Export Plugin

Post by tatewise »

Yes, I suppose if you were prepared to write a Footnote Format syntax analysis algorithm then a plugin could possibly produce the Footnote text. But this thread is in the context of my Export Gedcom File plugin for general use so for me it is not feasible.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2599
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Gramps and Gedcom Export Plugin

Post by Mark1834 »

Thanks, clear.

I think there is a way to generalise it for lumped sources as well as split. The only access plugins have to the formatting templates is via the fhSrcEnableAutoTitle(...) function, so at present you create temporary clones of the Source and Source Template records, and within the clones, copy the Footnote, Short Footnote and Bibliography definitions to the Title, update, and copy out as the formatted Title, Footnote, Short Footnote and Bibliography.

If in addition you convert all the clone template fields to source level fields by deleting the %_SRCT>FDEF.CITN% data references, and copy citation data to the new corresponding source level fields, I think it should then work for all meta-fields, both source level and citation level.

It will increase running time, as each cited fact will need to be processed individually (along with all the duplicated citations inherent to the lumper method in FH), but does that matter for a plugin that is only run periodically as long as any resource implications for large projects can be managed?

Worth a try to see how it works in practice?
Mark Draper
User avatar
tatewise
Megastar
Posts: 28712
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Gramps and Gedcom Export Plugin

Post by tatewise »

Very inventive! I'll give it some thought.

The complication is that currently the Export Gedcom File plugin only analyses Source records.
This change would require it to analyse every Citation and check for Citation-specific Metafields before invoking the script you suggested.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply