-
Notifications
You must be signed in to change notification settings - Fork 98
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
Look into konsolekalendar for creating events for KDE PIM calendars. #43
Comments
So... there doesn't seem to be a simple way of getting the Personal Calendar id. It also appears to print Edit: That warning is from stderr, not stdout.
However if I add
|
The PlasmaCalendar API doesn't get an event id, so I'd need to parse
Here's where the "Personal Calendar" data is stored. So we might be able to manipulate the ical itself.
|
If we add
By using if (!m_variables->allowGui()) {
Akonadi::IncidenceChanger *changer = calendar->incidenceChanger();
changer->setShowDialogsOnError(false);
Akonadi::Collection collection = m_variables->collectionId() != -1 ? Akonadi::Collection(m_variables->collectionId())
: Akonadi::Collection(CalendarSupport::KCalPrefs::instance()->defaultCalendarId());
if (!collection.isValid()) {
cout << i18n("Calendar is invalid. Please specify one with --calendar").toLocal8Bit().data() << "\n";
}
changer->setDefaultCollection(collection);
changer->setDestinationPolicy(Akonadi::IncidenceChanger::DestinationPolicyNeverAsk);
} I can add
|
Looking at the QML code for the
This sucessfully lists the calendars as:
Using
Edit: I forgot that "Search" has child calendars. I assume that PIM Google Calendar accounts also have this nested behavior so we'll need to parse these sub rows.
Edit2: I can also filter out "Search" with |
Populated PIM calendars in NewEventForm. Using `plasma_Events_12` for calendarId is fairly rough but works. Added the CalendarManager.refresh() signal so we can refetch events after creating the event. There's not much point in attempting to parse konsolekalendar's output.
It sorta works in git master for "Personal Calendar". I accidentally added events to the Birthday Calendar and found out it's read only in KOrganizer so I couldn't easily delete it.
I had to run the following. I'm not sure if
|
I've written a python script to first fetch the events, then parse them to find an event with the same start date/time, summary, and description. It'll error if there's multiple events that match, as it would be a bad idea to modify or delete the wrong event. Deleting events works fine. Unfortunately, editing/changing an event doesn't appear to work right. It's changing an "all day" event to an event with both startTime and endTime set at midnight. |
Apparently a
|
https://docs.kde.org/trunk5/en/pim/korganizer/other-features.html#other-features-commandline-options
https://userbase.kde.org/KonsoleKalendar
The text was updated successfully, but these errors were encountered: