1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Generate documentation

This commit is contained in:
Github Actions 2024-06-11 21:31:51 +00:00
parent ffb26d042f
commit 939f43f4ac

View file

@ -987,6 +987,23 @@ only be used with a single process.</p>
example.</p> example.</p>
<p>Default:</p> <p>Default:</p>
</section> </section>
<section class="level5" id="predefined_collections">
<h5>predefined_collections <a class="headerlink" href="#predefined_collections">&para;</a></h5>
<p>Create predefined user collections</p>
<p>Example:</p>
<pre><code> {
"def-addressbook": {
"D:displayname": "Personal Address Book",
"tag": "VADDRESSBOOK"
},
"def-calendar": {
"C:supported-calendar-component-set": "VEVENT,VJOURNAL,VTODO",
"D:displayname": "Personal Calendar",
"tag": "VCALENDAR"
}
}</code></pre>
<p>Default:</p>
</section>
</section> </section>
<section class="level4" id="web"> <section class="level4" id="web">
<h4>web <a class="headerlink" href="#web">&para;</a></h4> <h4>web <a class="headerlink" href="#web">&para;</a></h4>
@ -1046,7 +1063,7 @@ books and calendars.</p>
<p>In this section additional HTTP headers that are sent to clients can <p>In this section additional HTTP headers that are sent to clients can
be specified.</p> be specified.</p>
<p>An example to relax the same-origin policy:</p> <p>An example to relax the same-origin policy:</p>
<div class="sourceCode" id="cb35"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb35-1"><a aria-hidden="true" href="#cb35-1" tabindex="-1"></a><span class="dt">Access-Control-Allow-Origin </span><span class="ot">=</span><span class="st"> *</span></span></code></pre></div> <div class="sourceCode" id="cb36"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb36-1"><a aria-hidden="true" href="#cb36-1" tabindex="-1"></a><span class="dt">Access-Control-Allow-Origin </span><span class="ot">=</span><span class="st"> *</span></span></code></pre></div>
</section> </section>
<section class="level4" id="hook-1"> <section class="level4" id="hook-1">
<h4>hook <a class="headerlink" href="#hook-1">&para;</a></h4> <h4>hook <a class="headerlink" href="#hook-1">&para;</a></h4>
@ -1154,47 +1171,47 @@ documentation of <strong>InfCloud</strong> has more details on this.</p>
calendars and address books. Use Radicale's web interface or a client calendars and address books. Use Radicale's web interface or a client
with support for it (e.g. <strong>DAVx⁵</strong>).</p> with support for it (e.g. <strong>DAVx⁵</strong>).</p>
<p>To create a new calendar run something like:</p> <p>To create a new calendar run something like:</p>
<div class="sourceCode" id="cb36"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb36-1"><a aria-hidden="true" href="#cb36-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/calendar'</span> <span class="at">--data</span> <span class="dt">\</span></span> <div class="sourceCode" id="cb37"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb37-1"><a aria-hidden="true" href="#cb37-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/calendar'</span> <span class="at">--data</span> <span class="dt">\</span></span>
<span id="cb36-2"><a aria-hidden="true" href="#cb36-2" tabindex="-1"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span>
<span id="cb36-3"><a aria-hidden="true" href="#cb36-3" tabindex="-1"></a><span class="st">&lt;create xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:I="http://apple.com/ns/ical/"&gt;</span></span>
<span id="cb36-4"><a aria-hidden="true" href="#cb36-4" tabindex="-1"></a><span class="st"> &lt;set&gt;</span></span>
<span id="cb36-5"><a aria-hidden="true" href="#cb36-5" tabindex="-1"></a><span class="st"> &lt;prop&gt;</span></span>
<span id="cb36-6"><a aria-hidden="true" href="#cb36-6" tabindex="-1"></a><span class="st"> &lt;resourcetype&gt;</span></span>
<span id="cb36-7"><a aria-hidden="true" href="#cb36-7" tabindex="-1"></a><span class="st"> &lt;collection /&gt;</span></span>
<span id="cb36-8"><a aria-hidden="true" href="#cb36-8" tabindex="-1"></a><span class="st"> &lt;C:calendar /&gt;</span></span>
<span id="cb36-9"><a aria-hidden="true" href="#cb36-9" tabindex="-1"></a><span class="st"> &lt;/resourcetype&gt;</span></span>
<span id="cb36-10"><a aria-hidden="true" href="#cb36-10" tabindex="-1"></a><span class="st"> &lt;C:supported-calendar-component-set&gt;</span></span>
<span id="cb36-11"><a aria-hidden="true" href="#cb36-11" tabindex="-1"></a><span class="st"> &lt;C:comp name="VEVENT" /&gt;</span></span>
<span id="cb36-12"><a aria-hidden="true" href="#cb36-12" tabindex="-1"></a><span class="st"> &lt;C:comp name="VJOURNAL" /&gt;</span></span>
<span id="cb36-13"><a aria-hidden="true" href="#cb36-13" tabindex="-1"></a><span class="st"> &lt;C:comp name="VTODO" /&gt;</span></span>
<span id="cb36-14"><a aria-hidden="true" href="#cb36-14" tabindex="-1"></a><span class="st"> &lt;/C:supported-calendar-component-set&gt;</span></span>
<span id="cb36-15"><a aria-hidden="true" href="#cb36-15" tabindex="-1"></a><span class="st"> &lt;displayname&gt;Calendar&lt;/displayname&gt;</span></span>
<span id="cb36-16"><a aria-hidden="true" href="#cb36-16" tabindex="-1"></a><span class="st"> &lt;C:calendar-description&gt;Example calendar&lt;/C:calendar-description&gt;</span></span>
<span id="cb36-17"><a aria-hidden="true" href="#cb36-17" tabindex="-1"></a><span class="st"> &lt;I:calendar-color&gt;#ff0000ff&lt;/I:calendar-color&gt;</span></span>
<span id="cb36-18"><a aria-hidden="true" href="#cb36-18" tabindex="-1"></a><span class="st"> &lt;/prop&gt;</span></span>
<span id="cb36-19"><a aria-hidden="true" href="#cb36-19" tabindex="-1"></a><span class="st"> &lt;/set&gt;</span></span>
<span id="cb36-20"><a aria-hidden="true" href="#cb36-20" tabindex="-1"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div>
<p>To create a new address book run something like:</p>
<div class="sourceCode" id="cb37"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb37-1"><a aria-hidden="true" href="#cb37-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/addressbook'</span> <span class="at">--data</span> <span class="dt">\</span></span>
<span id="cb37-2"><a aria-hidden="true" href="#cb37-2" tabindex="-1"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span> <span id="cb37-2"><a aria-hidden="true" href="#cb37-2" tabindex="-1"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span>
<span id="cb37-3"><a aria-hidden="true" href="#cb37-3" tabindex="-1"></a><span class="st">&lt;create xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav"&gt;</span></span> <span id="cb37-3"><a aria-hidden="true" href="#cb37-3" tabindex="-1"></a><span class="st">&lt;create xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:I="http://apple.com/ns/ical/"&gt;</span></span>
<span id="cb37-4"><a aria-hidden="true" href="#cb37-4" tabindex="-1"></a><span class="st"> &lt;set&gt;</span></span> <span id="cb37-4"><a aria-hidden="true" href="#cb37-4" tabindex="-1"></a><span class="st"> &lt;set&gt;</span></span>
<span id="cb37-5"><a aria-hidden="true" href="#cb37-5" tabindex="-1"></a><span class="st"> &lt;prop&gt;</span></span> <span id="cb37-5"><a aria-hidden="true" href="#cb37-5" tabindex="-1"></a><span class="st"> &lt;prop&gt;</span></span>
<span id="cb37-6"><a aria-hidden="true" href="#cb37-6" tabindex="-1"></a><span class="st"> &lt;resourcetype&gt;</span></span> <span id="cb37-6"><a aria-hidden="true" href="#cb37-6" tabindex="-1"></a><span class="st"> &lt;resourcetype&gt;</span></span>
<span id="cb37-7"><a aria-hidden="true" href="#cb37-7" tabindex="-1"></a><span class="st"> &lt;collection /&gt;</span></span> <span id="cb37-7"><a aria-hidden="true" href="#cb37-7" tabindex="-1"></a><span class="st"> &lt;collection /&gt;</span></span>
<span id="cb37-8"><a aria-hidden="true" href="#cb37-8" tabindex="-1"></a><span class="st"> &lt;CR:addressbook /&gt;</span></span> <span id="cb37-8"><a aria-hidden="true" href="#cb37-8" tabindex="-1"></a><span class="st"> &lt;C:calendar /&gt;</span></span>
<span id="cb37-9"><a aria-hidden="true" href="#cb37-9" tabindex="-1"></a><span class="st"> &lt;/resourcetype&gt;</span></span> <span id="cb37-9"><a aria-hidden="true" href="#cb37-9" tabindex="-1"></a><span class="st"> &lt;/resourcetype&gt;</span></span>
<span id="cb37-10"><a aria-hidden="true" href="#cb37-10" tabindex="-1"></a><span class="st"> &lt;displayname&gt;Address book&lt;/displayname&gt;</span></span> <span id="cb37-10"><a aria-hidden="true" href="#cb37-10" tabindex="-1"></a><span class="st"> &lt;C:supported-calendar-component-set&gt;</span></span>
<span id="cb37-11"><a aria-hidden="true" href="#cb37-11" tabindex="-1"></a><span class="st"> &lt;CR:addressbook-description&gt;Example address book&lt;/CR:addressbook-description&gt;</span></span> <span id="cb37-11"><a aria-hidden="true" href="#cb37-11" tabindex="-1"></a><span class="st"> &lt;C:comp name="VEVENT" /&gt;</span></span>
<span id="cb37-12"><a aria-hidden="true" href="#cb37-12" tabindex="-1"></a><span class="st"> &lt;/prop&gt;</span></span> <span id="cb37-12"><a aria-hidden="true" href="#cb37-12" tabindex="-1"></a><span class="st"> &lt;C:comp name="VJOURNAL" /&gt;</span></span>
<span id="cb37-13"><a aria-hidden="true" href="#cb37-13" tabindex="-1"></a><span class="st"> &lt;/set&gt;</span></span> <span id="cb37-13"><a aria-hidden="true" href="#cb37-13" tabindex="-1"></a><span class="st"> &lt;C:comp name="VTODO" /&gt;</span></span>
<span id="cb37-14"><a aria-hidden="true" href="#cb37-14" tabindex="-1"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div> <span id="cb37-14"><a aria-hidden="true" href="#cb37-14" tabindex="-1"></a><span class="st"> &lt;/C:supported-calendar-component-set&gt;</span></span>
<span id="cb37-15"><a aria-hidden="true" href="#cb37-15" tabindex="-1"></a><span class="st"> &lt;displayname&gt;Calendar&lt;/displayname&gt;</span></span>
<span id="cb37-16"><a aria-hidden="true" href="#cb37-16" tabindex="-1"></a><span class="st"> &lt;C:calendar-description&gt;Example calendar&lt;/C:calendar-description&gt;</span></span>
<span id="cb37-17"><a aria-hidden="true" href="#cb37-17" tabindex="-1"></a><span class="st"> &lt;I:calendar-color&gt;#ff0000ff&lt;/I:calendar-color&gt;</span></span>
<span id="cb37-18"><a aria-hidden="true" href="#cb37-18" tabindex="-1"></a><span class="st"> &lt;/prop&gt;</span></span>
<span id="cb37-19"><a aria-hidden="true" href="#cb37-19" tabindex="-1"></a><span class="st"> &lt;/set&gt;</span></span>
<span id="cb37-20"><a aria-hidden="true" href="#cb37-20" tabindex="-1"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div>
<p>To create a new address book run something like:</p>
<div class="sourceCode" id="cb38"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb38-1"><a aria-hidden="true" href="#cb38-1" tabindex="-1"></a><span class="ex">$</span> curl <span class="at">-u</span> user <span class="at">-X</span> MKCOL <span class="st">'http://localhost:5232/user/addressbook'</span> <span class="at">--data</span> <span class="dt">\</span></span>
<span id="cb38-2"><a aria-hidden="true" href="#cb38-2" tabindex="-1"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span>
<span id="cb38-3"><a aria-hidden="true" href="#cb38-3" tabindex="-1"></a><span class="st">&lt;create xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav"&gt;</span></span>
<span id="cb38-4"><a aria-hidden="true" href="#cb38-4" tabindex="-1"></a><span class="st"> &lt;set&gt;</span></span>
<span id="cb38-5"><a aria-hidden="true" href="#cb38-5" tabindex="-1"></a><span class="st"> &lt;prop&gt;</span></span>
<span id="cb38-6"><a aria-hidden="true" href="#cb38-6" tabindex="-1"></a><span class="st"> &lt;resourcetype&gt;</span></span>
<span id="cb38-7"><a aria-hidden="true" href="#cb38-7" tabindex="-1"></a><span class="st"> &lt;collection /&gt;</span></span>
<span id="cb38-8"><a aria-hidden="true" href="#cb38-8" tabindex="-1"></a><span class="st"> &lt;CR:addressbook /&gt;</span></span>
<span id="cb38-9"><a aria-hidden="true" href="#cb38-9" tabindex="-1"></a><span class="st"> &lt;/resourcetype&gt;</span></span>
<span id="cb38-10"><a aria-hidden="true" href="#cb38-10" tabindex="-1"></a><span class="st"> &lt;displayname&gt;Address book&lt;/displayname&gt;</span></span>
<span id="cb38-11"><a aria-hidden="true" href="#cb38-11" tabindex="-1"></a><span class="st"> &lt;CR:addressbook-description&gt;Example address book&lt;/CR:addressbook-description&gt;</span></span>
<span id="cb38-12"><a aria-hidden="true" href="#cb38-12" tabindex="-1"></a><span class="st"> &lt;/prop&gt;</span></span>
<span id="cb38-13"><a aria-hidden="true" href="#cb38-13" tabindex="-1"></a><span class="st"> &lt;/set&gt;</span></span>
<span id="cb38-14"><a aria-hidden="true" href="#cb38-14" tabindex="-1"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div>
<p>The collection <code>/USERNAME</code> will be created automatically, <p>The collection <code>/USERNAME</code> will be created automatically,
when the user authenticates to Radicale for the first time. Clients with when the user authenticates to Radicale for the first time. Clients with
automatic discovery of collections will only show calendars and address automatic discovery of collections will only show calendars and address
books that are direct children of the path <code>/USERNAME/</code>.</p> books that are direct children of the path <code>/USERNAME/</code>.</p>
<p>Delete the collections by running something like:</p> <p>Delete the collections by running something like:</p>
<div class="sourceCode" id="cb38"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb38-1"><a aria-hidden="true" href="#cb38-1" tabindex="-1"></a><span class="ex">curl</span> <span class="at">-u</span> user <span class="at">-X</span> DELETE <span class="st">'http://localhost:5232/user/calendar'</span></span></code></pre></div> <div class="sourceCode" id="cb39"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb39-1"><a aria-hidden="true" href="#cb39-1" tabindex="-1"></a><span class="ex">curl</span> <span class="at">-u</span> user <span class="at">-X</span> DELETE <span class="st">'http://localhost:5232/user/calendar'</span></span></code></pre></div>
</section> </section>
<section class="level3" id="authentication-and-rights"> <section class="level3" id="authentication-and-rights">
<h3>Authentication and Rights <a class="headerlink" href="#authentication-and-rights">&para;</a></h3> <h3>Authentication and Rights <a class="headerlink" href="#authentication-and-rights">&para;</a></h3>
@ -1208,24 +1225,24 @@ to calendars and address books outside the home directory of users
collections and will not show them to the user. This is only useful if collections and will not show them to the user. This is only useful if
you access calendars and address books directly via URL.</p> you access calendars and address books directly via URL.</p>
<p>An example rights file:</p> <p>An example rights file:</p>
<div class="sourceCode" id="cb39"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb39-1"><a aria-hidden="true" href="#cb39-1" tabindex="-1"></a><span class="co"># Allow reading root collection for authenticated users</span></span> <div class="sourceCode" id="cb40"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb40-1"><a aria-hidden="true" href="#cb40-1" tabindex="-1"></a><span class="co"># Allow reading root collection for authenticated users</span></span>
<span id="cb39-2"><a aria-hidden="true" href="#cb39-2" tabindex="-1"></a><span class="kw">[root]</span></span> <span id="cb40-2"><a aria-hidden="true" href="#cb40-2" tabindex="-1"></a><span class="kw">[root]</span></span>
<span id="cb39-3"><a aria-hidden="true" href="#cb39-3" tabindex="-1"></a><span class="dt">user: .+</span></span> <span id="cb40-3"><a aria-hidden="true" href="#cb40-3" tabindex="-1"></a><span class="dt">user: .+</span></span>
<span id="cb39-4"><a aria-hidden="true" href="#cb39-4" tabindex="-1"></a><span class="dt">collection:</span></span> <span id="cb40-4"><a aria-hidden="true" href="#cb40-4" tabindex="-1"></a><span class="dt">collection:</span></span>
<span id="cb39-5"><a aria-hidden="true" href="#cb39-5" tabindex="-1"></a><span class="dt">permissions: r</span></span> <span id="cb40-5"><a aria-hidden="true" href="#cb40-5" tabindex="-1"></a><span class="dt">permissions: r</span></span>
<span id="cb39-6"><a aria-hidden="true" href="#cb39-6" tabindex="-1"></a></span> <span id="cb40-6"><a aria-hidden="true" href="#cb40-6" tabindex="-1"></a></span>
<span id="cb39-7"><a aria-hidden="true" href="#cb39-7" tabindex="-1"></a><span class="co"># Allow reading and writing principal collection (same as username)</span></span> <span id="cb40-7"><a aria-hidden="true" href="#cb40-7" tabindex="-1"></a><span class="co"># Allow reading and writing principal collection (same as username)</span></span>
<span id="cb39-8"><a aria-hidden="true" href="#cb39-8" tabindex="-1"></a><span class="kw">[principal]</span></span> <span id="cb40-8"><a aria-hidden="true" href="#cb40-8" tabindex="-1"></a><span class="kw">[principal]</span></span>
<span id="cb39-9"><a aria-hidden="true" href="#cb39-9" tabindex="-1"></a><span class="dt">user: .+</span></span> <span id="cb40-9"><a aria-hidden="true" href="#cb40-9" tabindex="-1"></a><span class="dt">user: .+</span></span>
<span id="cb39-10"><a aria-hidden="true" href="#cb39-10" tabindex="-1"></a><span class="dt">collection: {user}</span></span> <span id="cb40-10"><a aria-hidden="true" href="#cb40-10" tabindex="-1"></a><span class="dt">collection: {user}</span></span>
<span id="cb39-11"><a aria-hidden="true" href="#cb39-11" tabindex="-1"></a><span class="dt">permissions: RW</span></span> <span id="cb40-11"><a aria-hidden="true" href="#cb40-11" tabindex="-1"></a><span class="dt">permissions: RW</span></span>
<span id="cb39-12"><a aria-hidden="true" href="#cb39-12" tabindex="-1"></a></span> <span id="cb40-12"><a aria-hidden="true" href="#cb40-12" tabindex="-1"></a></span>
<span id="cb39-13"><a aria-hidden="true" href="#cb39-13" tabindex="-1"></a><span class="co"># Allow reading and writing calendars and address books that are direct</span></span> <span id="cb40-13"><a aria-hidden="true" href="#cb40-13" tabindex="-1"></a><span class="co"># Allow reading and writing calendars and address books that are direct</span></span>
<span id="cb39-14"><a aria-hidden="true" href="#cb39-14" tabindex="-1"></a><span class="co"># children of the principal collection</span></span> <span id="cb40-14"><a aria-hidden="true" href="#cb40-14" tabindex="-1"></a><span class="co"># children of the principal collection</span></span>
<span id="cb39-15"><a aria-hidden="true" href="#cb39-15" tabindex="-1"></a><span class="kw">[calendars]</span></span> <span id="cb40-15"><a aria-hidden="true" href="#cb40-15" tabindex="-1"></a><span class="kw">[calendars]</span></span>
<span id="cb39-16"><a aria-hidden="true" href="#cb39-16" tabindex="-1"></a><span class="dt">user: .+</span></span> <span id="cb40-16"><a aria-hidden="true" href="#cb40-16" tabindex="-1"></a><span class="dt">user: .+</span></span>
<span id="cb39-17"><a aria-hidden="true" href="#cb39-17" tabindex="-1"></a><span class="dt">collection: {user}/</span><span class="kw">[^/]</span><span class="dt">+</span></span> <span id="cb40-17"><a aria-hidden="true" href="#cb40-17" tabindex="-1"></a><span class="dt">collection: {user}/</span><span class="kw">[^/]</span><span class="dt">+</span></span>
<span id="cb39-18"><a aria-hidden="true" href="#cb39-18" tabindex="-1"></a><span class="dt">permissions: rw</span></span></code></pre></div> <span id="cb40-18"><a aria-hidden="true" href="#cb40-18" tabindex="-1"></a><span class="dt">permissions: rw</span></span></code></pre></div>
<p>The titles of the sections are ignored (but must be unique). The keys <p>The titles of the sections are ignored (but must be unique). The keys
<code>user</code> and <code>collection</code> contain regular <code>user</code> and <code>collection</code> contain regular
expressions, that are matched against the username and the path of the expressions, that are matched against the username and the path of the
@ -1304,10 +1321,10 @@ system. The storage is locked with exclusive access while the
<h5>Linux shell scripts <a class="headerlink" href="#linux-shell-scripts">&para;</a></h5> <h5>Linux shell scripts <a class="headerlink" href="#linux-shell-scripts">&para;</a></h5>
<p>Use the <a href="https://manpages.debian.org/unstable/util-linux/flock.1.en.html">flock</a> <p>Use the <a href="https://manpages.debian.org/unstable/util-linux/flock.1.en.html">flock</a>
utility.</p> utility.</p>
<div class="sourceCode" id="cb40"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb40-1"><a aria-hidden="true" href="#cb40-1" tabindex="-1"></a><span class="co"># Exclusive</span></span> <div class="sourceCode" id="cb41"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb41-1"><a aria-hidden="true" href="#cb41-1" tabindex="-1"></a><span class="co"># Exclusive</span></span>
<span id="cb40-2"><a aria-hidden="true" href="#cb40-2" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--exclusive</span> /path/to/storage/.Radicale.lock COMMAND</span> <span id="cb41-2"><a aria-hidden="true" href="#cb41-2" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--exclusive</span> /path/to/storage/.Radicale.lock COMMAND</span>
<span id="cb40-3"><a aria-hidden="true" href="#cb40-3" tabindex="-1"></a><span class="co"># Shared</span></span> <span id="cb41-3"><a aria-hidden="true" href="#cb41-3" tabindex="-1"></a><span class="co"># Shared</span></span>
<span id="cb40-4"><a aria-hidden="true" href="#cb40-4" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--shared</span> /path/to/storage/.Radicale.lock COMMAND</span></code></pre></div> <span id="cb41-4"><a aria-hidden="true" href="#cb41-4" tabindex="-1"></a><span class="ex">$</span> flock <span class="at">--shared</span> /path/to/storage/.Radicale.lock COMMAND</span></code></pre></div>
</section> </section>
<section class="level5" id="linux-and-macos"> <section class="level5" id="linux-and-macos">
<h5>Linux and MacOS <a class="headerlink" href="#linux-and-macos">&para;</a></h5> <h5>Linux and MacOS <a class="headerlink" href="#linux-and-macos">&para;</a></h5>
@ -1332,11 +1349,11 @@ folder in the file system storage (e.g.
clients that the collection is a calendar, you have to create the file clients that the collection is a calendar, you have to create the file
<code>.Radicale.props</code> with the following content in the <code>.Radicale.props</code> with the following content in the
folder:</p> folder:</p>
<div class="sourceCode" id="cb41"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb41-1"><a aria-hidden="true" href="#cb41-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VCALENDAR"</span><span class="fu">}</span></span></code></pre></div> <div class="sourceCode" id="cb42"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb42-1"><a aria-hidden="true" href="#cb42-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VCALENDAR"</span><span class="fu">}</span></span></code></pre></div>
<p>The calendar is now available at the URL path <p>The calendar is now available at the URL path
<code>/user/calendar</code>. For address books the file must <code>/user/calendar</code>. For address books the file must
contain:</p> contain:</p>
<div class="sourceCode" id="cb42"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb42-1"><a aria-hidden="true" href="#cb42-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VADDRESSBOOK"</span><span class="fu">}</span></span></code></pre></div> <div class="sourceCode" id="cb43"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb43-1"><a aria-hidden="true" href="#cb43-1" tabindex="-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VADDRESSBOOK"</span><span class="fu">}</span></span></code></pre></div>
<p>Calendar and address book collections must not have any child <p>Calendar and address book collections must not have any child
collections. Clients with automatic discovery of collections will only collections. Clients with automatic discovery of collections will only
show calendars and address books that are direct children of the path show calendars and address books that are direct children of the path
@ -1467,49 +1484,49 @@ password.</p>
modules is <a href="https://docs.python.org/3/distutils/setupscript.html">Distutils</a>. modules is <a href="https://docs.python.org/3/distutils/setupscript.html">Distutils</a>.
For a minimal setup create the file <code>setup.py</code> with the For a minimal setup create the file <code>setup.py</code> with the
following content in an empty folder:</p> following content in an empty folder:</p>
<div class="sourceCode" id="cb43"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb43-1"><a aria-hidden="true" href="#cb43-1" tabindex="-1"></a><span class="co">#!/usr/bin/env python3</span></span> <div class="sourceCode" id="cb44"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb44-1"><a aria-hidden="true" href="#cb44-1" tabindex="-1"></a><span class="co">#!/usr/bin/env python3</span></span>
<span id="cb43-2"><a aria-hidden="true" href="#cb43-2" tabindex="-1"></a></span> <span id="cb44-2"><a aria-hidden="true" href="#cb44-2" tabindex="-1"></a></span>
<span id="cb43-3"><a aria-hidden="true" href="#cb43-3" tabindex="-1"></a><span class="im">from</span> distutils.core <span class="im">import</span> setup</span> <span id="cb44-3"><a aria-hidden="true" href="#cb44-3" tabindex="-1"></a><span class="im">from</span> distutils.core <span class="im">import</span> setup</span>
<span id="cb43-4"><a aria-hidden="true" href="#cb43-4" tabindex="-1"></a></span> <span id="cb44-4"><a aria-hidden="true" href="#cb44-4" tabindex="-1"></a></span>
<span id="cb43-5"><a aria-hidden="true" href="#cb43-5" tabindex="-1"></a>setup(name<span class="op">=</span><span class="st">"radicale_static_password_auth"</span>,</span> <span id="cb44-5"><a aria-hidden="true" href="#cb44-5" tabindex="-1"></a>setup(name<span class="op">=</span><span class="st">"radicale_static_password_auth"</span>,</span>
<span id="cb43-6"><a aria-hidden="true" href="#cb43-6" tabindex="-1"></a> packages<span class="op">=</span>[<span class="st">"radicale_static_password_auth"</span>])</span></code></pre></div> <span id="cb44-6"><a aria-hidden="true" href="#cb44-6" tabindex="-1"></a> packages<span class="op">=</span>[<span class="st">"radicale_static_password_auth"</span>])</span></code></pre></div>
<p>In the same folder create the sub-folder <p>In the same folder create the sub-folder
<code>radicale_static_password_auth</code>. The folder must have the <code>radicale_static_password_auth</code>. The folder must have the
same name as specified in <code>packages</code> above.</p> same name as specified in <code>packages</code> above.</p>
<p>Create the file <code>__init__.py</code> in the <p>Create the file <code>__init__.py</code> in the
<code>radicale_static_password_auth</code> folder with the following <code>radicale_static_password_auth</code> folder with the following
content:</p> content:</p>
<div class="sourceCode" id="cb44"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb44-1"><a aria-hidden="true" href="#cb44-1" tabindex="-1"></a><span class="im">from</span> radicale.auth <span class="im">import</span> BaseAuth</span> <div class="sourceCode" id="cb45"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb45-1"><a aria-hidden="true" href="#cb45-1" tabindex="-1"></a><span class="im">from</span> radicale.auth <span class="im">import</span> BaseAuth</span>
<span id="cb44-2"><a aria-hidden="true" href="#cb44-2" tabindex="-1"></a><span class="im">from</span> radicale.log <span class="im">import</span> logger</span> <span id="cb45-2"><a aria-hidden="true" href="#cb45-2" tabindex="-1"></a><span class="im">from</span> radicale.log <span class="im">import</span> logger</span>
<span id="cb44-3"><a aria-hidden="true" href="#cb44-3" tabindex="-1"></a></span> <span id="cb45-3"><a aria-hidden="true" href="#cb45-3" tabindex="-1"></a></span>
<span id="cb44-4"><a aria-hidden="true" href="#cb44-4" tabindex="-1"></a>PLUGIN_CONFIG_SCHEMA <span class="op">=</span> {<span class="st">"auth"</span>: {</span> <span id="cb45-4"><a aria-hidden="true" href="#cb45-4" tabindex="-1"></a>PLUGIN_CONFIG_SCHEMA <span class="op">=</span> {<span class="st">"auth"</span>: {</span>
<span id="cb44-5"><a aria-hidden="true" href="#cb44-5" tabindex="-1"></a> <span class="st">"password"</span>: {<span class="st">"value"</span>: <span class="st">""</span>, <span class="st">"type"</span>: <span class="bu">str</span>}}}</span> <span id="cb45-5"><a aria-hidden="true" href="#cb45-5" tabindex="-1"></a> <span class="st">"password"</span>: {<span class="st">"value"</span>: <span class="st">""</span>, <span class="st">"type"</span>: <span class="bu">str</span>}}}</span>
<span id="cb44-6"><a aria-hidden="true" href="#cb44-6" tabindex="-1"></a></span> <span id="cb45-6"><a aria-hidden="true" href="#cb45-6" tabindex="-1"></a></span>
<span id="cb44-7"><a aria-hidden="true" href="#cb44-7" tabindex="-1"></a></span> <span id="cb45-7"><a aria-hidden="true" href="#cb45-7" tabindex="-1"></a></span>
<span id="cb44-8"><a aria-hidden="true" href="#cb44-8" tabindex="-1"></a><span class="kw">class</span> Auth(BaseAuth):</span> <span id="cb45-8"><a aria-hidden="true" href="#cb45-8" tabindex="-1"></a><span class="kw">class</span> Auth(BaseAuth):</span>
<span id="cb44-9"><a aria-hidden="true" href="#cb44-9" tabindex="-1"></a> <span class="kw">def</span> <span class="fu">__init__</span>(<span class="va">self</span>, configuration):</span> <span id="cb45-9"><a aria-hidden="true" href="#cb45-9" tabindex="-1"></a> <span class="kw">def</span> <span class="fu">__init__</span>(<span class="va">self</span>, configuration):</span>
<span id="cb44-10"><a aria-hidden="true" href="#cb44-10" tabindex="-1"></a> <span class="bu">super</span>().<span class="fu">__init__</span>(configuration.copy(PLUGIN_CONFIG_SCHEMA))</span> <span id="cb45-10"><a aria-hidden="true" href="#cb45-10" tabindex="-1"></a> <span class="bu">super</span>().<span class="fu">__init__</span>(configuration.copy(PLUGIN_CONFIG_SCHEMA))</span>
<span id="cb44-11"><a aria-hidden="true" href="#cb44-11" tabindex="-1"></a></span> <span id="cb45-11"><a aria-hidden="true" href="#cb45-11" tabindex="-1"></a></span>
<span id="cb44-12"><a aria-hidden="true" href="#cb44-12" tabindex="-1"></a> <span class="kw">def</span> login(<span class="va">self</span>, login, password):</span> <span id="cb45-12"><a aria-hidden="true" href="#cb45-12" tabindex="-1"></a> <span class="kw">def</span> login(<span class="va">self</span>, login, password):</span>
<span id="cb44-13"><a aria-hidden="true" href="#cb44-13" tabindex="-1"></a> <span class="co"># Get password from configuration option</span></span> <span id="cb45-13"><a aria-hidden="true" href="#cb45-13" tabindex="-1"></a> <span class="co"># Get password from configuration option</span></span>
<span id="cb44-14"><a aria-hidden="true" href="#cb44-14" tabindex="-1"></a> static_password <span class="op">=</span> <span class="va">self</span>.configuration.get(<span class="st">"auth"</span>, <span class="st">"password"</span>)</span> <span id="cb45-14"><a aria-hidden="true" href="#cb45-14" tabindex="-1"></a> static_password <span class="op">=</span> <span class="va">self</span>.configuration.get(<span class="st">"auth"</span>, <span class="st">"password"</span>)</span>
<span id="cb44-15"><a aria-hidden="true" href="#cb44-15" tabindex="-1"></a> <span class="co"># Check authentication</span></span> <span id="cb45-15"><a aria-hidden="true" href="#cb45-15" tabindex="-1"></a> <span class="co"># Check authentication</span></span>
<span id="cb44-16"><a aria-hidden="true" href="#cb44-16" tabindex="-1"></a> logger.info(<span class="st">"Login attempt by </span><span class="sc">%r</span><span class="st"> with password </span><span class="sc">%r</span><span class="st">"</span>,</span> <span id="cb45-16"><a aria-hidden="true" href="#cb45-16" tabindex="-1"></a> logger.info(<span class="st">"Login attempt by </span><span class="sc">%r</span><span class="st"> with password </span><span class="sc">%r</span><span class="st">"</span>,</span>
<span id="cb44-17"><a aria-hidden="true" href="#cb44-17" tabindex="-1"></a> login, password)</span> <span id="cb45-17"><a aria-hidden="true" href="#cb45-17" tabindex="-1"></a> login, password)</span>
<span id="cb44-18"><a aria-hidden="true" href="#cb44-18" tabindex="-1"></a> <span class="cf">if</span> password <span class="op">==</span> static_password:</span> <span id="cb45-18"><a aria-hidden="true" href="#cb45-18" tabindex="-1"></a> <span class="cf">if</span> password <span class="op">==</span> static_password:</span>
<span id="cb44-19"><a aria-hidden="true" href="#cb44-19" tabindex="-1"></a> <span class="cf">return</span> login</span> <span id="cb45-19"><a aria-hidden="true" href="#cb45-19" tabindex="-1"></a> <span class="cf">return</span> login</span>
<span id="cb44-20"><a aria-hidden="true" href="#cb44-20" tabindex="-1"></a> <span class="cf">return</span> <span class="st">""</span></span></code></pre></div> <span id="cb45-20"><a aria-hidden="true" href="#cb45-20" tabindex="-1"></a> <span class="cf">return</span> <span class="st">""</span></span></code></pre></div>
<p>Install the python module by running the following command in the <p>Install the python module by running the following command in the
same folder as <code>setup.py</code>:</p> same folder as <code>setup.py</code>:</p>
<div class="sourceCode" id="cb45"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb45-1"><a aria-hidden="true" href="#cb45-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install .</span></code></pre></div> <div class="sourceCode" id="cb46"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb46-1"><a aria-hidden="true" href="#cb46-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install .</span></code></pre></div>
<p>To make use this great creation in Radicale, set the configuration <p>To make use this great creation in Radicale, set the configuration
option <code>type</code> in the <code>auth</code> section to option <code>type</code> in the <code>auth</code> section to
<code>radicale_static_password_auth</code>:</p> <code>radicale_static_password_auth</code>:</p>
<div class="sourceCode" id="cb46"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb46-1"><a aria-hidden="true" href="#cb46-1" tabindex="-1"></a><span class="kw">[auth]</span></span> <div class="sourceCode" id="cb47"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb47-1"><a aria-hidden="true" href="#cb47-1" tabindex="-1"></a><span class="kw">[auth]</span></span>
<span id="cb46-2"><a aria-hidden="true" href="#cb46-2" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> radicale_static_password_auth</span></span> <span id="cb47-2"><a aria-hidden="true" href="#cb47-2" tabindex="-1"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> radicale_static_password_auth</span></span>
<span id="cb46-3"><a aria-hidden="true" href="#cb46-3" tabindex="-1"></a><span class="dt">password </span><span class="ot">=</span><span class="st"> secret</span></span></code></pre></div> <span id="cb47-3"><a aria-hidden="true" href="#cb47-3" tabindex="-1"></a><span class="dt">password </span><span class="ot">=</span><span class="st"> secret</span></span></code></pre></div>
<p>You can uninstall the module with:</p> <p>You can uninstall the module with:</p>
<div class="sourceCode" id="cb47"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb47-1"><a aria-hidden="true" href="#cb47-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip uninstall radicale_static_password_auth</span></code></pre></div> <div class="sourceCode" id="cb48"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb48-1"><a aria-hidden="true" href="#cb48-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip uninstall radicale_static_password_auth</span></code></pre></div>
</section> </section>
<section class="level4" id="authentication-plugins"> <section class="level4" id="authentication-plugins">
<h4>Authentication plugins <a class="headerlink" href="#authentication-plugins">&para;</a></h4> <h4>Authentication plugins <a class="headerlink" href="#authentication-plugins">&para;</a></h4>
@ -1568,14 +1585,14 @@ you want to add new features, fix bugs or update the documentation.</p>
<h4>PyPI <a class="headerlink" href="#pypi">&para;</a></h4> <h4>PyPI <a class="headerlink" href="#pypi">&para;</a></h4>
<p>Radicale is <a href="https://pypi.python.org/pypi/Radicale/">available on PyPI</a>. To <p>Radicale is <a href="https://pypi.python.org/pypi/Radicale/">available on PyPI</a>. To
install, just type as superuser:</p> install, just type as superuser:</p>
<div class="sourceCode" id="cb48"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb48-1"><a aria-hidden="true" href="#cb48-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> radicale</span></code></pre></div> <div class="sourceCode" id="cb49"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb49-1"><a aria-hidden="true" href="#cb49-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> radicale</span></code></pre></div>
</section> </section>
<section class="level4" id="git-repository"> <section class="level4" id="git-repository">
<h4>Git Repository <a class="headerlink" href="#git-repository">&para;</a></h4> <h4>Git Repository <a class="headerlink" href="#git-repository">&para;</a></h4>
<p>If you want the development version of Radicale, take a look at the <p>If you want the development version of Radicale, take a look at the
<a href="https://github.com/Kozea/Radicale/">git repository on <a href="https://github.com/Kozea/Radicale/">git repository on
GitHub</a>, or install it directly with:</p> GitHub</a>, or install it directly with:</p>
<div class="sourceCode" id="cb49"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb49-1"><a aria-hidden="true" href="#cb49-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> https://github.com/Kozea/Radicale/archive/master.tar.gz</span></code></pre></div> <div class="sourceCode" id="cb50"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb50-1"><a aria-hidden="true" href="#cb50-1" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> pip install <span class="at">--upgrade</span> https://github.com/Kozea/Radicale/archive/master.tar.gz</span></code></pre></div>
<p>You can also download the content of the repository as an <a href="https://github.com/Kozea/Radicale/tarball/master">archive</a>.</p> <p>You can also download the content of the repository as an <a href="https://github.com/Kozea/Radicale/tarball/master">archive</a>.</p>
</section> </section>
<section class="level4" id="source-packages"> <section class="level4" id="source-packages">