# Experimental Person Profile View (CardView) Plugin

**URL:** <https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562>\
**Category:** Development\
**Tags:** third-party-addon, cardview\
**Created:** [June 19, 2021, 4:11pm UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562 "2021-06-19T16:11:27Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [June 19, 2021, 11:58pm UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/21 "2021-06-19T23:58:54Z")

</div>

> [@emyoulation](#):
>
> - Could you sort the Citations by date?

so as an option; they are displayed as they are in person citations tab and it’s perfect for me

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 12:57am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/22 "2021-06-20T00:57:35Z")

</div>

Ah glad it is working for you.

1. Yes probably.
2. Yes, and I see PLegoux reply and could make that optional.
3. Yes if it is undated I could special case that at some point. It would make sense to do for burials/cremations.
4. Right now I use the internal Gramps calculated sortval for the timeline sorting because it is simple to do. For undated events I try to figure out a nearby sortval and back off from that to try to preserve the location of the undated event in the overall list at least with respect to the events for the immediate person.
5. I’ll have to figure out how to do that.
6. You think additional help is needed to futher explain the options? Reset to default at some point agree would be useful.

Just pushed a commit that added attributes as an option to action menu.

---

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [June 20, 2021, 1:03am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/23 "2021-06-20T01:03:56Z")

</div>

Humm. Age computation in events don’t like calculated between/and dates as birthdate:

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/2/2e4dcdd1be407ebb588668094bb01916c364afa0.png)

If I switched to the person with the red date:

```auto
198242: ERROR: person_profile.py: line 758: 'NoneType' object has no attribute 'date'
Traceback (most recent call last):
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\person_profile.py", line 753, in change_person
    return self._change_person(obj)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\person_profile.py", line 802, in _change_person
    config=self._config,
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\frame_groups.py", line 77, in get_parent_profiles
    relation=person,
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\frame_couple.py", line 135, in __init__
    profile = self._get_profile(partner2)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\frame_couple.py", line 153, in _get_profile
    family_backlink=self.family.handle
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\frame_person.py", line 157, in __init__
    self.living = self._load_base_facts(key_events)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\frame_person.py", line 220, in _load_base_facts
    show_age=self.option(self.context, "show-age"),
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\profileview-master\frame_base.py", line 298, in add_event
    span = Span(reference.date, event.date)
AttributeError: 'NoneType' object has no attribute 'date'

```

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 1:04am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/24 "2021-06-20T01:04:25Z")

</div>

Ah hadn’t thought of that, that’s the internal Gtk CSS parser barking. I’ll look at escaping that out.

I’m unsure on first comment, did you mean people are not rendering who should be?

---

<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:** [June 20, 2021, 1:07am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/25 "2021-06-20T01:07:44Z")

</div>

Additional Help? It’s always welcome. But you don’t have to write it. Just point the Help button at a URL like:  
[https://gramps-project.org/wiki/index.php/Addon:Person\_Profile](https://gramps-project.org/wiki/index.php/Addon:Person_Profile)

We can add the destination webpage at any time. And it’s also where we anchor the thumbnail image in the Add-ons list.

Although I’m not sure how you’d add a help button. They are built into the .gpr.py structure for Gramplets … but not for view modes. The only View modes that have a Help are the 2 Life Line chart view mode add-ons. And those have a completely different button which is placed within the view rather than in the Configure dialog.

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 1:15am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/26 "2021-06-20T01:15:30Z")

</div>

Thanks, added some validation before calling Span to calculate an age.

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 1:33am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/27 "2021-06-20T01:33:51Z")

</div>

I think the & is handled better now…

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 1:56am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/28 "2021-06-20T01:56:18Z")

</div>

Added the citation sorting as an option and defaulted to off.

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 3:22am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/29 "2021-06-20T03:22:52Z")

</div>

Eh I’ll look at it at some point I guess.

Added add new tag, organize tags and copy to clipboard so those available now.

---

<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:** [June 20, 2021, 4:00am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/30 "2021-06-20T04:00:59Z")

</div>

You’re quick! Thanks for those features!

I’ve noticed a couple oddities in the color selection.

The current color isn’t passed through to the custom color picker. It always goes to #BF4040

And a color change doesn’t seem to be applied until a checkbox selection is changed. (I was changing the BG for Active Person color) The other changes are applied immediately.

Just checking, but border color selection & border width isn’t implemented yet, right? (Verifying that it isn’t a Windoze thing again.)

---

<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:** [June 20, 2021, 4:14am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/31 "2021-06-20T04:14:15Z")

</div>

Oh. I didn’t mean to put you to that much work with the Add Tags… & Organize Tags… menu items. It must’ve been a real pain to add them to the view mode subpanel contextual menus.

Adding them to the main application Edit menu instead would’ve freed 2 more spots for Tags on the context menus before scrolling. (I keep my Tags to 8 or less. But some users have dozens.)

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 4:53am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/32 "2021-06-20T04:53:11Z")

</div>

Was not much work once I found the code Nick wrote for it. Added a todo so if \>10 tags say it will break the + and - into submenus. Might help a little for users with a lot of them.

Yes the color stuff needs a bit more work, I only did enough to get a feel for how it could fit in.

Added support to add and launch urls for those objects that support it.

If you and others think of more things that would be useful to have let me know. I have an open list of about a dozen at the moment.

---

<div class="post-metadata">

**Author:** ![Mihle](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/mihle/32/612_2.png) [@Mihle](https://gramps.discourse.group/u/Mihle)\
**Post date:** [June 20, 2021, 8:35am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/33 "2021-06-20T08:35:18Z")

</div>

Just a question as you have some experience, how hard is it to add something to right click menu (aka add family member to a person when right clicking on a person in pedigree view for example) for someone that havent used Python before?

If its not hard, aka just copy some code from another place and adding a link and some text I might try to some stuff with that myself at some point, if not I may not.

Anyway, great work with this!

---

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [June 20, 2021, 9:39am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/34 "2021-06-20T09:39:25Z")

</div>

Thanks, It’s working well now

---

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [June 20, 2021, 9:51am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/35 "2021-06-20T09:51:21Z")

</div>

I’ve seen you have added attributes in contextual menu, that’s cool !  
For events in timeline, do you plan to add reference information too (role, notes and attributes)?

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 11:13am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/36 "2021-06-20T11:13:47Z")

</div>

That is hard to say as it very much depends on the individual. Some people pick up programming quickly and some people can’t, everyone is different. In the end it is like everything in life though, just practice with little projects that interest you and work your way up to larger things and keep learning something new every day.

Developing something new completely from scratch takes a lot of effort, having a mature codebase like Gramps with well developed classes and libraries makes it easier to do a lot of things once you get your bearings and learn how everything fits together. A lot of great programmers have contributed to Gramps over the years.

Python is a good language to learn because there is such a huge ecosystem around it and so many libraries and modules are available. So you don’t need for example to learn how compression and decompression algorithms work internally, or try to write one from scratch, which is a pretty high bar I think. Other people already did that and made it available for others. So you just need to learn the API for interacting with the library and objects they wrote.

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 11:24am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/37 "2021-06-20T11:24:06Z")

</div>

Attributes, notes, tags, and copy to clipboard should work for people, family, event and citation. Urls work for person and should work for other things if support is added to them in Gramps.

I will do more with events, the partipants and roles, at some point.

---

<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:** [June 20, 2021, 11:25am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/38 "2021-06-20T11:25:05Z")

</div>

How about a couple Citations options?

The ability to display the Date value in addition to the Volume/Page would help for periodical sources. (Like newspapers or Census data)

An option to include Citations referenced by the Families and/or [hierarchy of Objects](https://gramps-project.org/wiki/index.php/Gramps_Data_Model) (Events, Notes, etc.) under the Person in the list… in addition to the Citations referenced at the Person level.

---

<div class="post-metadata">

**Author:** ![cdhorn](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@cdhorn](https://gramps.discourse.group/u/cdhorn)\
**Post date:** [June 20, 2021, 11:26am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/39 "2021-06-20T11:26:17Z")

</div>

Sure I will add them to the todo list.

---

<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:** [June 20, 2021, 11:51am UTC](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562/40 "2021-06-20T11:51:25Z")

</div>

> [@cdhorn](#):
>
> Was not much work once I found the code Nick wrote for it. Added a todo so if \>10 tags say it will break the + and - into submenus. Might help a little for users with a lot of them.

A minor niggling item. Could you add an ellipsis to each of the two Tag submenu items? They need that “options dialog will appear” indicator.

[Previous page](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562.md?page=1)

[Next page](https://gramps.discourse.group/t/experimental-person-profile-view-cardview-plugin/1562.md?page=3)
