Skip to content
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

CreateEventFromVOBJ: if there is no dtend, use the duration if available #282

Closed
wants to merge 1 commit into from

Conversation

tschwinge
Copy link
Contributor

... which allows me to gcalcli import the *.ics files provided by a travel agency. According to a quick skim of one random ;-) iCalendar RFC, that appears to be legit.

Beware: only very lightly tested, so far.

@jcrowgey
Copy link
Collaborator

Would you be willing to rebase off current master and then do a bit more testing? I think it would be good to add your calendar file to the tests/data/ directory and set up some sort of unit testing for your code?

@jcrowgey jcrowgey self-assigned this Jul 11, 2018
@jcrowgey jcrowgey self-requested a review July 11, 2018 02:53
@jcrowgey jcrowgey removed their assignment Jul 11, 2018
@jcrowgey jcrowgey removed their request for review July 11, 2018 02:53
Copy link
Collaborator

@jcrowgey jcrowgey left a comment

Choose a reason for hiding this comment

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

Thank you for this PR and for your patience with me waiting on this review.

The only thing further I'd like to see, beyond the minor points in the review, is a test. IIRC there is already a test VCARD file in the tests/data dir, so putting an example ICS file in there to test against should be relatively straightforward since you have a model to go by.

print('Local End....%s' %
self._localize_datetime(ve.dtend.value)
)
#if not hasattr(ve, 'dtend') and not hasattr(ve, 'duration'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we want to merge changes that comment out blocks. We should just delete unused code.

else:
event['end'] = event['start']
#DebugPrint('event['start']: %s\n' % event['start'])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove these comments too.

print('Calculated End........%s' % end.isoformat())
print('Calculated Local End..%s' % self._localize_datetime(end))
# Decide based on dtstart; that's what we base our
# calculation on. TODO: correct?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you follow up on this TODO?

@tschwinge
Copy link
Contributor Author

@jcrowgey: Thanks for looking into this, and no worries about the delay. I also haven't really been proactive with pinging this.

Thanks for your review; that all makes sense, and I'll re-work/extend as suggested. I won't get it done this year, but I'll try to before the "third birthday" of this PR. ;-)

@dbarnett
Copy link
Collaborator

I'll try to before the "third birthday" of this PR.

Now 7 years old! Do you still have interest in this change or would you prefer to abandon and let someone else pick it up later?

@dbarnett
Copy link
Collaborator

K, I rebased a version of these changes onto the latest main in #771, doing some polishing and then getting that merged.

@dbarnett dbarnett closed this Sep 23, 2024
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.

3 participants