Narrative Web configuration

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

Narrative Web configuration

Patrick Gerlier

Hello all,

I generate Narrative Web site from my Gramps DB which is becoming overcrowded. This is not a problem but for the Individuals page.

This page contains links towards ALL persons present in Gramps, i.e several thousands of persons and still growing. Access to my computer (for the family) is through an ADSL line with upload speed rather limited by my provider (under 1Mb/s). This means the page needs quite a long time to load.

I find this page does not present great interest (of course, this is a purely personal opinion) and I want to coerce "visitors" to proceed through the Family Names page which is shorter (aprox. 1:4 ratio) then through the family name bearers page, which is then drastically shorter (a few hundred names at most).

To make this mandatory indirection, I'd like to suppress Individuals generation.

Since there is no option to do so in the dialog, where should I look in the code to make a patch?

Regards,
Patrick



--
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: Narrative Web configuration

Dave Scheipers
Hi Patrick

This requires a hack of the code. I think this modification would be
too unique for an option to include/exclude.

In the program files, edit \gramps\plugins\webreport\basepage.py

Somewhere around line 1520 (in 5.1.1.) there will be a line:

            ('individuals', self._("Individuals"), True),

Comment out the line by adding a hashtag/pound sign (#) to the start
of the line. After saving the file, and relaunching Gramps, this
should stop the generation of this page.

Note: this is a protected folder so you'll need administrator rights
to edit and save the file. Also, you may want to mark the line so you
can find your modification again. I add #DES_MOD to the end of lines I
modify so I can find it again. It cannot be something that can be seen
as part of the code. I then save a copy of the modified code so in the
next version I can make my tweaks to the new code.

HTH Dave

On Fri, Nov 22, 2019 at 8:58 AM Patrick Gerlier <[hidden email]> wrote:

>
> Hello all,
>
> I generate Narrative Web site from my Gramps DB which is becoming overcrowded. This is not a problem but for the Individuals page.
>
> This page contains links towards ALL persons present in Gramps, i.e several thousands of persons and still growing. Access to my computer (for the family) is through an ADSL line with upload speed rather limited by my provider (under 1Mb/s). This means the page needs quite a long time to load.
>
> I find this page does not present great interest (of course, this is a purely personal opinion) and I want to coerce "visitors" to proceed through the Family Names page which is shorter (aprox. 1:4 ratio) then through the family name bearers page, which is then drastically shorter (a few hundred names at most).
>
> To make this mandatory indirection, I'd like to suppress Individuals generation.
>
> Since there is no option to do so in the dialog, where should I look in the code to make a patch?
>
> Regards,
> Patrick
>
> --
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
> https://gramps-project.org


--
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: Narrative Web configuration

Patrick Gerlier
Hi Dave,

Just for fun, how can I add an option in the dialog to make this
versatile? Provided it does not break configuration which might be store
in some invisible private file.

Le 22/11/2019 à 15:25, Dave Scheipers a écrit :
> Hi Patrick
>
> This requires a hack of the code. I think this modification would be
> too unique for an option to include/exclude.
I do agree with this statement. This is why I didn't file a feature
request.

> In the program files, edit \gramps\plugins\webreport\basepage.py
>
> Somewhere around line 1520 (in 5.1.1.) there will be a line:
>
>              ('individuals', self._("Individuals"), True),
>
> Comment out the line by adding a hashtag/pound sign (#) to the start
> of the line. After saving the file, and relaunching Gramps, this
> should stop the generation of this page.
>
> Note: this is a protected folder so you'll need administrator rights
> to edit and save the file. Also, you may want to mark the line so you
> can find your modification again. I add #DES_MOD to the end of lines I
> modify so I can find it again. It cannot be something that can be seen
> as part of the code. I then save a copy of the modified code so in the
> next version I can make my tweaks to the new code.
No problem, I'm used to juggle with administrator rights and other
nifty-gritty tricks with an OS. I'll also have a nice note full of
comments in my Gramps session home directory to record all my patches so
that I can do it again in case something changes in the code.

>
> HTH Dave
>
> On Fri, Nov 22, 2019 at 8:58 AM Patrick Gerlier <[hidden email]> wrote:
>> Hello all,
>>
>> I generate Narrative Web site from my Gramps DB which is becoming overcrowded. This is not a problem but for the Individuals page.
>>
>> This page contains links towards ALL persons present in Gramps, i.e several thousands of persons and still growing. Access to my computer (for the family) is through an ADSL line with upload speed rather limited by my provider (under 1Mb/s). This means the page needs quite a long time to load.
>>
>> I find this page does not present great interest (of course, this is a purely personal opinion) and I want to coerce "visitors" to proceed through the Family Names page which is shorter (aprox. 1:4 ratio) then through the family name bearers page, which is then drastically shorter (a few hundred names at most).
>>
>> To make this mandatory indirection, I'd like to suppress Individuals generation.
>>
>> Since there is no option to do so in the dialog, where should I look in the code to make a patch?
>>
>> Regards,
>> Patrick
>>
>> --
>> Gramps-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-users
>> https://gramps-project.org



--
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: Narrative Web configuration

Dave Scheipers
Hi Patrick

Just for fun, to make it versatile, it would need an option added to
the report options, have that option saved to gramps.ini and then have
the code evaluate the condition to implement it.  Beyond my coding
experience. Most of my tweaks have been minor and often takes several
tries to see what the tweak is actually doing.  I knew how to do your
request because I had already found out how to hide the Thumbnail
list.

Not knowing your comfort level making code changes, I did not want you
frustrated when trying to save the file, having Windows telling you
that you can't.  I just make any changes and save the file to the
desktop then copying it back to the folder. Just now, I thought I
should have added the warning to save a copy of the original code. It
is easier to replace a file I have screwed up than to back out the bad
attempted changes.

I started with a file logging my code tweaks. Now I create a mirror
gramps folder structure and then just keep a copy of the modified file
there.

Dave

On Fri, Nov 22, 2019 at 10:00 AM Patrick Gerlier <[hidden email]> wrote:

>
> Hi Dave,
>
> Just for fun, how can I add an option in the dialog to make this
> versatile? Provided it does not break configuration which might be store
> in some invisible private file.
>
> Le 22/11/2019 à 15:25, Dave Scheipers a écrit :
> > Hi Patrick
> >
> > This requires a hack of the code. I think this modification would be
> > too unique for an option to include/exclude.
> I do agree with this statement. This is why I didn't file a feature
> request.
> > In the program files, edit \gramps\plugins\webreport\basepage.py
> >
> > Somewhere around line 1520 (in 5.1.1.) there will be a line:
> >
> >              ('individuals', self._("Individuals"), True),
> >
> > Comment out the line by adding a hashtag/pound sign (#) to the start
> > of the line. After saving the file, and relaunching Gramps, this
> > should stop the generation of this page.
> >
> > Note: this is a protected folder so you'll need administrator rights
> > to edit and save the file. Also, you may want to mark the line so you
> > can find your modification again. I add #DES_MOD to the end of lines I
> > modify so I can find it again. It cannot be something that can be seen
> > as part of the code. I then save a copy of the modified code so in the
> > next version I can make my tweaks to the new code.
> No problem, I'm used to juggle with administrator rights and other
> nifty-gritty tricks with an OS. I'll also have a nice note full of
> comments in my Gramps session home directory to record all my patches so
> that I can do it again in case something changes in the code.
> >
> > HTH Dave
> >
> > On Fri, Nov 22, 2019 at 8:58 AM Patrick Gerlier <[hidden email]> wrote:
> >> Hello all,
> >>
> >> I generate Narrative Web site from my Gramps DB which is becoming overcrowded. This is not a problem but for the Individuals page.
> >>
> >> This page contains links towards ALL persons present in Gramps, i.e several thousands of persons and still growing. Access to my computer (for the family) is through an ADSL line with upload speed rather limited by my provider (under 1Mb/s). This means the page needs quite a long time to load.
> >>
> >> I find this page does not present great interest (of course, this is a purely personal opinion) and I want to coerce "visitors" to proceed through the Family Names page which is shorter (aprox. 1:4 ratio) then through the family name bearers page, which is then drastically shorter (a few hundred names at most).
> >>
> >> To make this mandatory indirection, I'd like to suppress Individuals generation.
> >>
> >> Since there is no option to do so in the dialog, where should I look in the code to make a patch?
> >>
> >> Regards,
> >> Patrick
> >>
> >> --
> >> Gramps-users mailing list
> >> [hidden email]
> >> https://lists.sourceforge.net/lists/listinfo/gramps-users
> >> https://gramps-project.org
>


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org