Skip to content

Commit 32620d6

Browse files
joshinilsCopilot
andauthored
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>
1 parent 1c3131f commit 32620d6

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

docs/source/tutorial.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ When you've run the tutorial as intended, I recommend going through the examples
2323

2424
* Set the environment variables ``CALDAV_URL``, ``CALDAV_USER`` and ``CALDAV_PASSWORD`` to point to your personal calendar server.
2525
* 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.
2828

2929
Quick Start: Getting Calendars Directly
3030
---------------------------------------
@@ -94,12 +94,12 @@ function, go from there to get a
9494
9595
Caveat: Things will break if password/url/username is wrong, but
9696
perhaps not where you expect it to. To test, you may try out
97-
``get_davclient(username='alice', password='hunter2',url='https://calendar.example.com/dav/')``.
97+
``get_davclient(username='alice', password='hunter2', url='https://calendar.example.com/dav/')``.
9898

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
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
101101
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:
103103

104104
.. code-block:: python
105105
@@ -125,7 +125,7 @@ to go through the principal object.
125125
126126
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!
127127

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:
129129

130130
.. code-block:: python
131131
@@ -165,7 +165,7 @@ You have icalendar code and want to put it into the calendar? Easy!
165165
END:VCALENDAR
166166
""")
167167
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.
169169

170170
.. code-block:: python
171171
@@ -193,11 +193,11 @@ The best way of getting information out from the calendar is to use the search.
193193
194194
``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.
195195

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``.
197197

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.
199199

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.
201201

202202
The ``data`` property delivers the icalendar data as a string. It can be modified:
203203

@@ -268,7 +268,7 @@ The ``event.component`` property gives easy access to the
268268
269269
How to do operations on components in the icalendar library is outside the scope of this tutorial.
270270

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:
272272

273273
.. code-block:: python
274274

0 commit comments

Comments
 (0)