clach04 / webook_server

💩📖 Worst E-book server - light weight OPDS and web server that converts ebook formats on the fly, using Python (2 or 3) and optional Calibre convert
GNU General Public License v3.0
4 stars 0 forks source link

ftp and/or WebDAV support - KoReader cloud support #8

Open clach04 opened 1 year ago

clach04 commented 1 year ago

Implement as an ftp and/or WebDAV server with same dir browsing support

Technically interesting enhancement but unlikely to pursue. OPDS server has been implemented which offers search support in addition to browse and convert support - a superior option for clients that support OPDS.

clach04 commented 1 year ago

Related https://github.com/clach04/webook_server/issues/1

clach04 commented 1 year ago

nginix with SabreDAV works with KoReader (lots of versions work but 2022.1 and 2022.8 known for sure).

Serves headers:

< HTTP/1.1 200 OK
< Server: nginx
< Date: Sun, 18 Sep 2022 00:06:13 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:;
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block

with content:

<html>
<head>
  <title>Index for WDNotes/ - SabreDAV 1.8.12-stable</title>
  <style type="text/css">
  body { Font-family: arial}
  h1 { font-size: 150% }
  </style>
    <link rel="shortcut icon" href="/webdav/?sabreAction=asset&assetName=favicon.ico" type="image/vnd.microsoft.icon" /></head>
<body>
  <h1>Index for WDNotes/</h1>
  <table>
    <tr><th width="24"></th><th>Name</th><th>Type</th><th>Size</th><th>Last modified</th></tr>
    <tr><td colspan="5"><hr /></td></tr><tr>
    <td><a href="/webdav/"><img src="/webdav/?sabreAction=asset&assetName=icons%2Fparent.png" width="24" alt="Parent" /></a></td>
    <td><a href="/webdav/">..</a></td>
    <td>[parent]</td>
    <td></td>
    <td></td>
    </tr><tr>
    <td><a href="/webdav/WDNotes/20211204T171247Z.md"><img src="/webdav/?sabreAction=asset&assetName=icons%2Ffile.png" alt="" width="24" /></a></td>
    <td><a href="/webdav/WDNotes/20211204T171247Z.md">20211204T171247Z.md</a></td>
    <td>Unknown</td>
    <td>17</td>
    <td>2021-12-04T17:12:48+00:00</td>
    </tr><tr>
    <td><a href="/webdav/WDNotes/20211204T171317Z.yml"><img src="/webdav/?sabreAction=asset&assetName=icons%2Ffile.png" alt="" width="24" /></a></td>
    <td><a href="/webdav/WDNotes/20211204T171317Z.yml">20211204T171317Z.yml</a></td>
    <td>Unknown</td>
    <td>36</td>
    <td>2021-12-04T17:13:18+00:00</td>
    </tr><tr>
    <td><a href="/webdav/WDNotes/20211204T171343Z.md"><img src="/webdav/?sabreAction=asset&assetName=icons%2Ffile.png" alt="" width="24" /></a></td>
    <td><a href="/webdav/WDNotes/20211204T171343Z.md">20211204T171343Z.md</a></td>
    <td>Unknown</td>
    <td>19</td>
    <td>2021-12-04T17:13:44+00:00</td>
    </tr><tr>
    <td><a href="/webdav/WDNotes/20211204T171450Z.md"><img src="/webdav/?sabreAction=asset&assetName=icons%2Ffile.png" alt="" width="24" /></a></td>
    <td><a href="/webdav/WDNotes/20211204T171450Z.md">20211204T171450Z.md</a></td>
    <td>Unknown</td>
    <td>5</td>
    <td>2021-12-04T17:14:51+00:00</td>
    </tr><tr>
    <td><a href="/webdav/WDNotes/MetaData"><img src="/webdav/?sabreAction=asset&assetName=icons%2Fcollection.png" alt="" width="24" /></a></td>
    <td><a href="/webdav/WDNotes/MetaData">MetaData</a></td>
    <td>Collection</td>
    <td></td>
    <td>2021-12-04T17:12:13+00:00</td>
    </tr><tr><td colspan="5"><hr /></td></tr><tr><td colspan="2"><form method="post" action="">
        <h3>Create new folder</h3>
        <input type="hidden" name="sabreAction" value="mkcol" />
        Name: <input type="text" name="name" /><br />
        <input type="submit" value="create" />
        </form>
        <form method="post" action="" enctype="multipart/form-data">
        <h3>Upload file</h3>
        <input type="hidden" name="sabreAction" value="put" />
        Name (optional): <input type="text" name="name" /><br />
        File: <input type="file" name="file" /><br />
        <input type="submit" value="upload" />
        </form>
        </td></tr></table>
    <address>Generated by SabreDAV 1.8.12-stable (c)2007-2015 <a href="http://sabre.io/">http://sabre.io/</a></address>
    </body>
    </html>

NOTE indentation unchanged, missing EOL on EOF.

clach04 commented 1 year ago

Koreader uses:

clach04 commented 1 year ago

Technically interesting enhancement but unlikely to pursue. OPDS server has now been implemented which offers search support in addition to browse/convert support.

clach04 commented 1 year ago

https://github.com/mar10/wsgidav