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
fix overlong inline literal by adding space, remove triple backtick, replace hyphens with en-dashes (#622)
* Fix formatting issues in tutorial documentation
If an inline literal like "``foo``" is too long to fit on screen, and it doesn't contain spaces, it won't include line-breaks, and for example on mobile this will extend past the right edge of the screen, allowing horizontal scrolling which is not wanted on mobile.
Hence adding more spaces allows for more chances to break the literal, decreasing the chance this happens.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/source/tutorial.rst
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@ When you've run the tutorial as intended, I recommend going through the examples
23
23
24
24
* Set the environment variables ``CALDAV_URL``, ``CALDAV_USER`` and ``CALDAV_PASSWORD`` to point to your personal calendar server.
25
25
* Be aware that different calendar servers may behave differently. For instance, not all of them allows you to create a calendar. Some are even read-only.
26
-
* You will need to revert all changes done. The code examples below does not do any cleanup. If your calendar server supports creating and deleting calendars, then it should be easy enough: ```my_new_calendar.delete()``` inside the with-block. Events also has a ``.delete()``-method. Beware that there is no ``undo``. You're adviced to have a local backup of your calendars. I'll probably write a HOWTO on that one day.
27
-
* Usage of a context manager is considered best practice, but not really needed - you may skip the with-statement and write just ``client = get_davclient()``. This will make it easier to test code from the python shell.
26
+
* You will need to revert all changes done. The code examples below do not do any cleanup. If your calendar server supports creating and deleting calendars, then it should be easy enough: ``my_new_calendar.delete()`` inside the with-block. Events also have a ``.delete()``-method. Beware that there is no ``undo``. You're advised to have a local backup of your calendars. I'll probably write a HOWTO on that one day.
27
+
* Usage of a context manager is considered best practice, but not really needed – you may skip the with-statement and write just ``client = get_davclient()``. This will make it easier to test code from the python shell.
28
28
29
29
Quick Start: Getting Calendars Directly
30
30
---------------------------------------
@@ -94,12 +94,12 @@ function, go from there to get a
94
94
95
95
Caveat: Things will break if password/url/username is wrong, but
96
96
perhaps not where you expect it to. To test, you may try out
The ``calendar``-method above gives one calendar - if you have more
100
-
calendars, it will give you the first one it can find - which may not
99
+
The ``calendar``-method above gives one calendar – if you have more
100
+
calendars, it will give you the first one it can find – which may not
101
101
be the correct one. To filter there are parameters ``name`` and
102
-
``cal_id`` - I recommend testing them:
102
+
``cal_id`` – I recommend testing them:
103
103
104
104
.. code-block:: python
105
105
@@ -125,7 +125,7 @@ to go through the principal object.
125
125
126
126
Note that in the example above, no communication is done. If the URL is wrong, you will only know it when trying to save or get objects from the server!
127
127
128
-
For servers that supports it, it may be useful to create a dedicated test calendar - that way you can test freely without risking to mess up your calendar events. Let's populate it with an event while we're at it:
128
+
For servers that support it, it may be useful to create a dedicated test calendar – that way you can test freely without risking to mess up your calendar events. Let's populate it with an event while we're at it:
129
129
130
130
.. code-block:: python
131
131
@@ -165,7 +165,7 @@ You have icalendar code and want to put it into the calendar? Easy!
165
165
END:VCALENDAR
166
166
""")
167
167
168
-
The best way of getting information out from the calendar is to use the search. Currently most of the logic is done on the server side - and the different calendar servers tends to give different results given the same data and search query. In future versions of the CalDAV library the intention is to do more workarounds and logic on the client side, allowing for more consistent results across different servers.
168
+
The best way of getting information out from the calendar is to use the search. Currently most of the logic is done on the server side – and the different calendar servers tend to give different results given the same data and search query. In future versions of the CalDAV library the intention is to do more workarounds and logic on the client side, allowing for more consistent results across different servers.
169
169
170
170
.. code-block:: python
171
171
@@ -193,11 +193,11 @@ The best way of getting information out from the calendar is to use the search.
193
193
194
194
``expand`` matters for recurring events and tasks, instead of getting returned the original event (with ``DTSTART`` set in 2023 and an ``RRULE`` set) it will return the *recurrence* for year 2026. Or, rather, a list of recurrences if there are more of them in the search interval.
195
195
196
-
``event`` causes the search to only return events. There are three kind of objects that can be saved to a calendar (but not all servers support all three) - events, journals and tasks (``VEVENT``, ``VJOURNAL`` and ``VTODO``). This is called Calendar Object Resources in the RFC. Now that's quite a mouthful! To ease things, the word "event" is simply used in documentation and communication. So when reading "event", be aware that it actually means "a CalenderObjectResource objects such as an event, but it could also be a task or a journal" - and if you contribute code, remember to use ``CalendarObjectResource`` rather than ``Event``.
196
+
``event`` causes the search to only return events. There are three kinds of objects that can be saved to a calendar (but not all servers support all three) – events, journals and tasks (``VEVENT``, ``VJOURNAL`` and ``VTODO``). This is called Calendar Object Resources in the RFC. Now that's quite a mouthful! To ease things, the word "event" is simply used in documentation and communication. So when reading "event", be aware that it actually means "a CalendarObjectResource objects such as an event, but it could also be a task or a journal" – and if you contribute code, remember to use ``CalendarObjectResource`` rather than ``Event``.
197
197
198
-
Without ``event=True`` explicitly set, all kind of objects *should* be returned. Unfortunately many servers returns nothing - so as of 2.0, it's important to always specify if you want events, tasks or journals. In future versions of CalDAV there will be workarounds for this so ``event=True`` can be safely skipped, regardless what server is used.
198
+
Without ``event=True`` explicitly set, all kinds of objects *should* be returned. Unfortunately many servers return nothing – so as of 2.0, it's important to always specify if you want events, tasks or journals. In future versions of CalDAV there will be workarounds for this so ``event=True`` can be safely skipped, regardless what server is used.
199
199
200
-
The return type is a list of objects of the type :class:`caldav.calendarobjectresource.Event` - for tasks and jornals there are similar classes Todo and Journal.
200
+
The return type is a list of objects of the type :class:`caldav.calendarobjectresource.Event` – for tasks and journals there are similar classes Todo and Journal.
201
201
202
202
The ``data`` property delivers the icalendar data as a string. It can be modified:
203
203
@@ -268,7 +268,7 @@ The ``event.component`` property gives easy access to the
268
268
269
269
How to do operations on components in the icalendar library is outside the scope of this tutorial.
270
270
271
-
Usually tasks and journals can be applied directly to the same calendar as the events - but some implementations (notably Zimbra) has "task lists" and "calendars" as distinct entities. To create a task list, there is a parameter ``supported_calendar_component_set`` that can be set to ``['VTODO']``. Here is a quick example that features a task:
271
+
Usually tasks and journals can be applied directly to the same calendar as the events – but some implementations (notably Zimbra) have "task lists" and "calendars" as distinct entities. To create a task list, there is a parameter ``supported_calendar_component_set`` that can be set to ``['VTODO']``. Here is a quick example that features a task:
0 commit comments