# What is needed for "Books" compatible reports?

**URL:** <https://gramps.discourse.group/t/what-is-needed-for-books-compatible-reports/4394>\
**Category:** Development\
**Created:** [November 10, 2023, 5:17pm UTC](https://gramps.discourse.group/t/what-is-needed-for-books-compatible-reports/4394 "2023-11-10T17:17:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [September 11, 2024, 9:40pm UTC](https://gramps.discourse.group/t/what-is-needed-for-books-compatible-reports/4394/5 "2024-09-11T21:40:19Z")

</div>

> ### Perplexity prompt:
> 
> as an expert in Python and Gramps genealogical software’s source code, describe what is necessary to make a “Report” addon plugin compatible with the “Book” collated report generator. Note any specific unit tests to verify compatibility.  
> To make a “Report” addon plugin compatible with the “[**Books**](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Reports_-_part_3#Books)” collated report generator in Gramps, you need to consider several key aspects:

1. Report Class Structure:

2. Option Class:

3. Report Modes:

4. Handling Book Context:

5. Document Handling:

6. Localization:

7. Error Handling:

8. Performance Considerations:

Unit Tests for Book Compatibility:

1. Test Book Mode Detection:

2. Test Option Handling:

3. Test Document Structure:

4. Test Error Handling:

5. Test Localization in Book Context:

6. Performance Test:

7. Test Multiple Instances:

By implementing these features and running these unit tests, you can ensure that your Report addon plugin is compatible with the Book collated report generator in Gramps. This will provide a seamless experience for users who want to include your report in their book compilations.

Citations:  
[1] Discourse: [Need help getting started with a new addon](https://gramps.discourse.group/t/need-help-getting-started-with-a-new-addon/2941)  
[2] Discourse: [What is needed for "Books" compatible reports?](https://gramps.discourse.group/t/what-is-needed-for-books-compatible-reports/4394)  
[3] [5.2 Addons - Gramps](https://www.gramps-project.org/wiki/index.php/5.2_Addons)  
[4] [GitHub - gramps-project/addons: Third-party plugins for Gramps genealogy program](https://github.com/gramps-project/addons)  
[5] Reddit: [gramps/comments/gpccyk/best\_reports\_to\_run](https://www.reddit.com/r/gramps/comments/gpccyk/best_reports_to_run/)

---

_[View the full topic](https://gramps.discourse.group/t/what-is-needed-for-books-compatible-reports/4394)._
