You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: admin_manual/occ_command.rst
+68Lines changed: 68 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -559,6 +559,9 @@ Manage addressbooks and calendars::
559
559
dav:send-event-reminders Sends event reminders
560
560
dav:sync-birthday-calendar Synchronizes the birthday calendar
561
561
dav:sync-system-addressbook Synchronizes users to the system addressbook
562
+
calendar
563
+
calendar:export Export a calendar of a user
564
+
calendar:import Import a calendar to a user
562
565
563
566
564
567
Manage addressbooks
@@ -634,6 +637,71 @@ This example will move calendar named personal from user dennis to user sabine:
634
637
635
638
sudo -E -u www-data php occ dav:move-calendar personal dennis sabine
636
639
640
+
641
+
Export a calendar of a user
642
+
"""""""""""""""""""""""""""
643
+
644
+
``calendar:export [--format FORMAT] [--location LOCATION] [--] <uid> <uri>`` exports the calendar entries from a calendar with the given ``uri`` of user ``uid``.
645
+
646
+
**Arguments:**
647
+
648
+
* ``uid`` (mandatory): User ID whose calendar will be exported.
649
+
* ``cid`` (mandatory): Calendar URI to export.
650
+
* ``--format FORMAT`` (optional, defaults to ``ical``): Output format. One of ``ical``, ``xcal``, or ``jcal``.
651
+
* ``--location <file path>`` (optional, defaults to stdout): Path to the file to export to. If omitted, output is written to standard output.
652
+
653
+
The output format can be specified with the ``--format`` option. Valid formats are ``ical`` standard format (RFC 5545), ``xcal`` XML iCalendar (RFC 6321), and ``jcal`` JSON iCalendar (RFC 7265).
654
+
655
+
This example will export the calendar named personal of user dennis to a file named personal.ics in standard format: ::
656
+
657
+
sudo -E -u www-data php occ calendar:export dennis personal --location /tmp/personal.ics
658
+
659
+
This example will export the calendar in XML iCalendar format: ::
660
+
661
+
sudo -E -u www-data php occ calendar:export dennis personal --format xcal --location /tmp/personal.xcal
662
+
663
+
This example will export the calendar in JSON iCalendar format to standard output: ::
664
+
665
+
sudo -E -u www-data php occ calendar:export dennis personal --format jcal
666
+
667
+
668
+
Import a calendar to a user
669
+
"""""""""""""""""""""""""""
670
+
671
+
``calendar:import [--format FORMAT] [--errors ERRORS] [--validation VALIDATION] [--supersede] [--show-created] [--show-updated] [--show-skipped] [--show-errors] [--] <uid> <uri> [<location>]`` imports a calendar entries to the calendar with the given ``uri`` of user ``uid``.
672
+
673
+
**Arguments:**
674
+
675
+
* ``uid`` (mandatory): User ID to import the calendar for.
676
+
* ``uri`` (mandatory): Calendar URI to import into.
677
+
* ``location`` (optional, defaults to stdin): Path to the file to import. If omitted, reads from standard input.
678
+
* ``--format FORMAT`` (optional, defaults to ``ical``): Input format. One of ``ical``, ``xcal``, or ``jcal``.
679
+
* ``--supersede`` (optional): Force override of existing objects with the same UID.
680
+
* ``--show-created`` (optional): Show UID of created objects after import.
681
+
* ``--show-updated`` (optional): Show UID of updated objects after import.
682
+
* ``--show-skipped`` (optional): Show UID of skipped objects (e.g., duplicates or invalid entries).
683
+
* ``--show-errors`` (optional): Show UID of objects with errors during import.
684
+
* ``--errors ERRORS`` (optional): How to handle errors. ``0`` = continue on error, ``1`` = fail on error.
685
+
* ``--validation VALIDATION`` (optional): How to handle object validation. ``0`` = no validation, ``1`` = validate and skip on issue, ``2`` = validate and fail on issue.
686
+
687
+
The input format can be specified with the ``--format`` option, valid formats are ``ical`` standard format (RFC 5545), ``xcal`` XML iCalendar (RFC 6321) and ``jcal`` JSON iCalendar (RFC 7265), the default is ``ical``.
688
+
689
+
This example will import from a file named personal.ics in standard format to the calendar named personal of user dennis: ::
690
+
691
+
sudo -E -u www-data php occ calendar:import dennis personal /tmp/personal.ics
692
+
693
+
This example will import from a file named personal.xcal in XML iCalendar format to the calendar named personal of user dennis: ::
694
+
695
+
sudo -E -u www-data php occ calendar:import --format xcal dennis personal /tmp/personal.xcal
696
+
697
+
This example will import from a file named personal.jcal in JSON iCalendar format to the calendar named personal of user dennis: ::
698
+
699
+
sudo -E -u www-data php occ calendar:import --format jcal dennis personal /tmp/personal.jcal
700
+
701
+
This example will import from standard input to the calendar named personal of user dennis: ::
702
+
703
+
cat /tmp/personal.ics | sudo -E -u www-data php occ calendar:import dennis personal
0 commit comments