Re: Name change for a country

Dave Scheipers <[email protected]>
Newsgroups gmane.comp.genealogy.gramps.user
Message-ID <CAPJZ5GMi-ZLvnVS7QZPStba0ohmPDU_Aq-yZZCPk5hGyxitJyA@mail.gmail.com>
Success

Modifying gramps\plugins\lib\libsubstkeyword.py worked!!

On Wed, Dec 7, 2022 at 5:00 PM Genealogy <[email protected]>
wrote:

> Here is a diff for a kludge fix for the Graphical Reports. Not elegant,
> but works on all the tests I did. Basically adding the event date in the
> place object before printing.  Edit the file libsubstkeyword.py - on my
> Mac, this is located at:
>
>
> /Applications/Gramps.app/Contents/Resources/lib/python3.6/site-packages/gramps/plugins/lib/libsubstkeyword.py
>
> I don’t know the full path for Win or Linux.
>
> *** libsubstkeyword.orig
> --- libsubstkeyword.py
> ***************
> *** 346,352 ****
>           return None
>
>       def _default_format(self, place):
> !         return _pd.display(self.database, place)
>
>       def parse_format(self, database, place):
>           """ Parse the place """
> --- 346,352 ----
>           return None
>
>       def _default_format(self, place):
> !         return _pd.display(self.database, place, place.event_date)
>
>       def parse_format(self, database, place):
>           """ Parse the place """
> ***************
> *** 432,437 ****
> --- 432,439 ----
>               """ start formatting a place in this event """
>               place_format = PlaceFormat(self.database, self.string_in)
>               place = place_format.get_place(self.database, event)
> +             if event and place:
> +                 place.event_date = event.get_date_object()
>               return place_format.parse_format(self.database, place)
>
>           def format_attrib():
> ***************
> *** 889,894 ****
> --- 891,898 ----
>           return the result """
>           place_f = PlaceFormat(self.database, self._in)
>           place = place_f.get_place(self.database, event)
> +         if event and place:
> +             place.event_date = event.get_date_object()
>           if self.empty_item(place):
>               return
>           return place_f.parse_format(self.database, place)
> g
>
> > On Dec 7, 2022, at 10:43 AM, [email protected] wrote:
> >
> > Clone a built-in report .py file & its piece frim tge composite .gpr.py
> registration to an add-on folder. Give it a unique ID and tweak all the
> paths for inclusions and files.
> >
> > Then you can tweak and share a report that can evolve independently of
> the new feature release cycle.
> >
> >
> > Gary Griffin just posted a ”sample report” thread to the Discourse forum
> that specifically shows the difference between outputting Place names that
> show era-corrected info vs. 'Preferred' name.
> > On Wednesday, December 7, 2022, 11:55:38 AM CST, Genealogy <
> [email protected]> wrote:
> >
> >
> > Unfortunately, the Graphical Reports are not Addons, so I dont think
> they would get fixed until at least next release.
> >
> > I explored and found that all of the reports which have a Display tab
> which allows the user to specify the Display Format have this issue. There
> are 3 reports: Ancestor Tree, Descendant Tree, and Family Descendant Tree.
> >
> > I added a Note to the bug report. It is beyond me to fix, but I did
> identify the file (gramps/plugins/lib/libsubstkeyword.py) that needs fixed
> to pass the date of the event to the Place processing.
> >
> > > On Dec 4, 2022, at 4:28 AM, [email protected]
> <mailto:[email protected]> wrote:
> > >
> > >
> > > From: Dave Scheipers <[email protected] <mailto:
> [email protected]>>
> > > To: dan inbox <[email protected] <mailto:[email protected]>>
> > > Cc: "[email protected] <mailto:
> [email protected]>"
> > >     <[email protected] <mailto:
> [email protected]>>
> > > Subject: Re: [Gramps-users] Name change for a country
> > > Message-ID:
> > >     <
> CAPJZ5GOBh9okLtgwU-q22KykKTeNS+bz6oAmJx3UbKnOirSceA@mail.gmail.com
> <mailto:[email protected]>>
> > > Content-Type: text/plain; charset="utf-8"
> > >
> > > Thank you for the information, especially the codes you used in the
> report.
> > >
> > > I can confirm that the place information is being displayed using
> today's
> > > date instead of the date of the event.
> > >
> > > To fix, it would require submitting a bug report. The coding is well
> beyond
> > > me. The good news, this is an addon report so as soon as someone can
> solve
> > > this it can be sent out as an update.
> > >
> > > Gramps' menu >> Help >> Report a Bug.  You do need to create a login
> > > profile to file a report.
> > >
> > > In the short term, you may want to explore the Family Tree report.
> > > Graphical Reports\Family Tree
> > >
> > > There are a lot of configuration options of what to include (or not)
> but
> > > less options on the final output. You may have to test various page
> size
> > > settings.
> > >
> >
> >
> >
> >
> > --
> > Gramps-users mailing list
> > [email protected] <mailto:
> [email protected]>
> > https://lists.sourceforge.net/lists/listinfo/gramps-users <
> https://lists.sourceforge.net/lists/listinfo/gramps-users>
> > https://gramps-project.org <https://gramps-project.org/>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> --
> Gramps-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org
-------------- next part --------------
An HTML attachment was scrubbed...

-- 
Gramps-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.