X Tutup
Skip to content

Let users download profiles as vCards#241

Merged
mrchrisadams merged 2 commits intoGreening-Digital:mainfrom
EvanHahn:vcard
Dec 19, 2023
Merged

Let users download profiles as vCards#241
mrchrisadams merged 2 commits intoGreening-Digital:mainfrom
EvanHahn:vcard

Conversation

@EvanHahn
Copy link
Collaborator

Users can now download a simple vCard for profiles they visit. This is implemented as a new route.

App screenshot

Here's how it looks imported into GNOME Contacts:

GNOME Contacts

And into iOS:

iOS screenshot

It uses VObject, the best Python vCard package I could find. Some work was required to make edge cases work, such as the legacy vCard "name" field.

Addresses #106.

Users can now download a simple [vCard] for profiles they visit. This is
implemented as a new route.

It uses [VObject], the best Python vCard package I could find. Some work
was required to make edge cases work, such as the legacy vCard "name"
field.

See [issue Greening-Digital#106].

[vCard]: https://en.wikipedia.org/wiki/VCard
[VObject]: https://eventable.github.io/vobject/
[issue Greening-Digital#106]: Greening-Digital#106
return {"text": rendered_invite_txt, "html": rendered_invite_html}

def vcard(self) -> vobject.vCard:
properties = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add additional properties in the future, but I think this is a good starter set. The vCard Wikipedia page has a good list of these properties, as does the spec.

@EvanHahn EvanHahn marked this pull request as ready for review December 19, 2023 05:57
Copy link
Member

@mrchrisadams mrchrisadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @EvanHahn , this looks great! I'm very happy to merge this in. - I've asked for a couple of docstrings for the tests as a convenience but otherwise I'm very happy for this to be merged in.

I'm not sure you gave the ability to merge in from an approved PR, if not please let me know, and I'll either grant access or merge it in at your end.

"Biscuit",
"Dr.",
"Dr. Gravy Biscuit",
"Sweet Gravy Biscuit",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good names.

@EvanHahn
Copy link
Collaborator Author

I think I've addressed all comments!

I don't have permission to merge this myself. Happy to have you do it, or to get the permission to do so myself—whichever is easier for you.

@mrchrisadams mrchrisadams merged commit a5270ea into Greening-Digital:main Dec 19, 2023
Copy link
Member

@mrchrisadams mrchrisadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very happy! Thanks @EvanHahn

@EvanHahn EvanHahn deleted the vcard branch December 19, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup