Generate reports including photos?

I think the Narrative Web report does better than the Dynamic Web report with images in at least one respect, but at a significant cost. With either report, you can access the correct media from the individual pages.

But with the Dynamic Web report, it is extremely difficult to go from the media page to the person(s) with which it is associated. That is because the references section on the media pages in the Dynamic Web report only lists the Source, and if the Source has many citations (for example, I use a single source for Missouri death certificates downloaded from the Secretary of State website but a separate citation for each one) you can’t easily navigate from the media page to the person or event associated with it.

The Narrative Web report has a more complete reference section that includes all citations and the events and people associated with them.

The cost is that it takes far longer to generate a Narrative Web report with media objects. My database has over 15,000 media objects that are not marked private, including over 5,000 census pages and about 6,000 death certificates. It takes 14 to 15 hours to generate a Narrative Web report with almost all of the time spent generating media pages, while it takes an hour or less to generate a Dynamic Web report with the same data.

I too have noticed this. Depending on the size of the branch family I am creating, I set it to start when I go to bed turning off the computer’s OS sleep features letting it run all night.

It used to be that way when I would delete all the thumbnails and then using the thumbnail generator to repopulate the folders. I forget which release it was but now the generator can handle 25K media files in an hour.

I do not understand why the Narrative web takes so long to generate the media pages. After all, the thumbnails have already been generated. Do we need to have a third size of thumbnail?

As the author of the Detailed Descendant Report with all images, this sounds like something I’d like to fix. The source is at addons-source/DetDescendantReport-images at master · gramps-project/addons-source · GitHub and is based on the original Detailed Descendant Report. I don’t believe I can assign the ticket to myself, but I’ll start monitoring it and see if I can modify the report to fix it. It’s been some time since I’ve worked on this report, but hopefully it’ll come back quickly.

3 Likes

If an image is attached to an event, when the report is generated, where would make the most sense to put the image? The report is centered around individuals, so an event is output for each individual referenced in the event. Based on this I’d probably output the images for the event with each individual referenced in the event. Another idea would be to have a section of events at the end of the report, like the citations and put the images there. Thoughts from other users?

2 Likes

You might want to consider some sort of throttle control for images.

If the event has 1 or two images, then inline is viable. If it is 3-10 images a separate gallery section makes sense but if it is 100 images, a hotlinked thumbnail contact sheet makes more sense.

If the count is totally out of control (100+ images), one representative image and a hyperlink to an external gallery might be the best choice. Or just the only option to avoid exhausting your printer’s ink cartridges or having a terabyte PDF file.

Thank you @jpschewe! To me, the hierarchy of the report could be this one:

  • person
    • details
    • events
      • event1
        • details
        • photos
      • event2
        • details
        • photos

In the meantime, if there are several or lots of photos, I do want them to be in the PDF, so that I can transmit the report to relatives.

Hope this helps :slight_smile:

1 Like

When I looked at the report, I thought the following edit would address this:

In file detdescendantreporti.py . Edit this file around line 445 and add the 2 lines.

From:

   place = place_displayer.display_event(self.db, event)

   self.doc.start_paragraph('DDRI-MoreDetails')

To:

   place = place_displayer.display_event(self.db, event)
   if self.addimages:
       self.write_images(event.get_media_list())
   self.doc.start_paragraph('DDRI-MoreDetails')

I sent this to @alcofribas and it seemed to work for him. It looked reasonable for my reports too.

1 Like

I don’t know why it takes so long, but my suspicion is that it is related to all of the searches required to build the References section of the pages as the References section includes a list of citations, people and events. It may also be in part because I do not generate family or event pages (my hosting company places limits on both disc space and inodes; if event and family pages are generated, it significantly exceeds the inode limit).

I haven’t attempted to understand the database structure, but I suspect that for media objects attached to citations, it is only easy to retrieve the source and/or citation(s) (Dynamic Web reports only list sources in the References section, although it lists a source for each citation, so it isn’t unusual to have a list that has the same source repeated multiple times; I don’t know whether that is because of the queries available or because there are no citation pages to link to).

If the citation is attached to an event, that means that at a minimum two more queries are required, one to retrieve the event(s) associated with the citation(s) and one to retrieve the people associated with the event(s). (I think the final query may be skipped if event pages are generated. As an experiment, I will have to see if the time goes down if I generate event pages, but that wouldn’t help with the public website I maintain.) Since more than two-thirds of the media objects in my database are attached to citations and the census pages are attached to anywhere from one to ten citations, there may be a lot of queries to generate the references. It would be interesting to see if indexes could be auto-generated that would make those queries more efficient (most of my database experience was with Oracle and that has been over 15 years, so I don’t know if that even makes sense in SQLite).

Allen

@alcofribas for some more detail, if 2 people share an event you would see the following.

  • person 1
    • details
    • events
      • event1
        • details
        • photoA
  • person 2
    • details
      • events
        • event 1
          • details
          • photoA (same as above)

Seems like an easy change. You could put in a PR at GitHub for it.

PR submitted to fix issue. I am not a github expert, but I think I did this PR correctly. Waiting for review and merge.

1 Like

The PR will handle missing images for events. However it doesn’t handle missing media for citations without date or page. I did some experimenting and it seems that citations without date or page don’t appear at all. I’m not sure what is causing those citations to not show up.

Good question! I perfectly understand it.

Honestly I’m quite new to genealogy, I do not know what to (seriously) answer.

Excepting wedding and witness, what events could be shared between people?

The bibliography is generated (by core gramps) before the report code is executed. That biblio does not include the citation if there is nothing defined in the citation in the date or page/volume fields.

The report then uses the information in the biblio to generate the report. As example, look at the Person view Citation tab. If there is an event that has a citation without date or page/volume, the citation is not included in the Person view Citation tab (see the “<No Citation>” in the furthest back window).

So this cannot be fixed in the report (other than noting this requirement). It is in core gramps, which is beyond me.

1 Like

I started digging into the source some more and the constructor for Bibliography allows one to specify the “mode”. If one passes in MODE_ALL, then I believe these empty citations will appear. Line 203 of detdescendantreporti.py specifies MODE_DATE|MODE_PAGE. Changing this to MODE_ALL shows all citations.

1 Like

PR is in as Include all citations in the bibliography by jpschewe · Pull Request #545 · gramps-project/addons-source · GitHub

2 Likes

I have a similar observation: when I produced a detailed ancestor (text) report including photos, the only photo I got was of the selected person. I would like it to include all available photos of the ancestors when I tick the option to include photos in the report.

Alan

Other shared events could include Residence, Census, Immigration, …

1 Like

I’m posting this link as it may be of value to others, until the next merge. Check the date of this post compared to the (future) release date.

https://gramps.discourse.group/t/permissive-vs-restrictive-philosophy/2674/4?u=iabarry

Having looked at the .PY referenced immediately above, I see no sign of image/media size for the report. Apparently this is determined elsewhere.

My personal preferences for images would be that the image is shown followed immediately by the image NOTE. These often list the folks in the photo, discuss location, dates, etc.

The Reports → WebPage → Narrated Site does this nicely. I’m disappointed this doesn’t work the same in Report → Text → Detailed with images.

I wonder if the Text report image size is limited by the table? If it were 2 columns rather than 3, would the image be larger? Possibly there are pseudo-thumbnails with a size spec somewhere else.