forked from skarim/vobject
-
Notifications
You must be signed in to change notification settings - Fork 14
Modest support for vcard 4.0 #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SSPJ
wants to merge
64
commits into
py-vobject:29-add-support-for-vcard-40
Choose a base branch
from
SSPJ:29-add-support-for-vcard-40
base: 29-add-support-for-vcard-40
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Modest support for vcard 4.0 #113
SSPJ
wants to merge
64
commits into
py-vobject:29-add-support-for-vcard-40
from
SSPJ:29-add-support-for-vcard-40
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy content from README. Add some further explanations and structure.
Merged content from Jeffrey's Skyhouse Consulting site. Merged Sameen's content from GitHub.
Rewrote a bunch of the model discussion too.
Move example file content into code as well, for easier control.
Replace unittest with pytest
Fix timezone names in test suite
Removed reference to setup.py, since it's no longer used in v1.0
Add first draft of programmer's guide doc
Improve log message for unknown timezone
This was based on a review of PR py-vobject#52 from @lucc, reviewed by @dbarnett, that I didn't end up using as I set up the v1.0 build. With this change, I've pulled in the things in @lucc's PR that weren't there already.
Add some missing info to the project file.
"repository" ends up being just an alias for "source", plus it had a typo. Add "documentation" link to readthedocs. Add some missing stuff to the sdist.
- inlined strings - Added py313 in black
Adding pre-commit with linters and formatters
- configured to baseline project errors - using line-length 130, a 10 threshold with black tool
- see pylintrc file diff
fixed errors with < 4 count
- removed print function - inlined docstring to reduce lines - disbaled pylint in test compatibility
- made f-string conversions - minor linting fixes - Added tests
Enabling pylint with necessary checks
The exceptions are calls to logging.* functions, where parameters should be passed in *args, so that substitution isn't performed unless the message needs to be emitted; and, a series of uses in constructing parsing regexps, where the named lookup is arguably clearer.
These looked a bit messy to start with, but the reality was not so bad. I think the resulting code is substantially more clear too.
Caught by unit tests.
PDF files should not have their content messed with by Git's EOL stuff so make sure they're treated as binary.
Add original Versit specifications for vCard 2.1 and vCalendar 1.0.
…emnants Remove python2 remnants
Ubuntu 24.10 (at least) has removed the "US/*" time zone names from the installed zoneinfo database: the files are now available through a supplementary package, "tzdata-legacy", but it is not installed by default. To avoid confusing, pointless, breakage, switch to using the "America/New_York" name, which is (thus far) universally available, but semantically identical.
…alendarpytest_omits_dst_offset-fails Change unit test to use "America/New_York" time zone name.
These tests migrated to use in-file data some time ago.
Attempt to fix line endings issues
Add support for KIND (limited to individual), CLIENTPIDMAP, GENDER, comma-delinated paramater values, and ALTID.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I would like a few of the vcard 4.0 features for a small side project I'm working on.
This is not comprehensive, but I've done my best to make sure it is fully backwards compatible. All feedback welcome.
What this PR includes
ALTIDsuch that properties likeNwith a cardinality of*1do not fail validation when the additional content lines use a matchingALTID.CLIENTPIDMAPGENDERTYPE="video,cell"will become{"TYPE": ['video', 'cell']}What this PR does not include
KINDother thanindividual.TYPE=video;TYPE=cell. This likely doesn't matter for most parameters, but might cause issues withPID.CLIENTPIDMAP. This property opens the door to a lot of useful features, like "validate this card's PID map", "given this card's email address, tell me if that card contains a matching property", or even "merge these two cards for me". I did not go down this rabbit-hole.