{"name":"@deckyard/seafile","description":"A client for the Seafile Web API: libraries, files, links, trash, tokens and search","versions":{"0.1.0":{"version":"0.1.0","kind":"git","url":"https://github.com/deckyard/deck-seafile.git","ref":"0.1.0","commit":"6777011565cab5e74c3f15dcab84f045e9b2ada9","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.26.0"},"capabilities":["net"],"keywords":["seafile","cloud-storage","files","sharing","upload"],"description":"A client for the Seafile Web API: libraries, files, links, trash, tokens and search","publishedAt":"1793998409","repoId":1448724091,"repoOwnerId":346943577,"repoOwner":"deckyard"}},"readme":"# @deckyard/seafile\n\n[![test](https://github.com/deckyard/deck-seafile/actions/workflows/test.yml/badge.svg)](https://github.com/deckyard/deck-seafile/actions/workflows/test.yml)\n[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://deckyard.github.io/deck-seafile/)\n[![release](https://img.shields.io/github/v/release/deckyard/deck-seafile)](https://github.com/deckyard/deck-seafile/releases/latest)\n\nA client for the Web API of a self-hosted [Seafile](https://www.seafile.com/)\nserver, for [Jennifer](https://jennifer-lang.dev/) programs: libraries\n(incl. encrypted), files and folders (list, download, upload, resumable\nupload, rename, copy and move across libraries, history, revert), user and\ngroup shares, libraries shared with the account, starred items, share and\nupload links, the trash, library API tokens and search. `call` reaches any other endpoint.\n\nPlain file sync can use the interpreter's `webdav` module against\n`/seafdav`; this deck covers what WebDAV cannot.\n\n**[Documentation](https://deckyard.github.io/deck-seafile/)**\n\n## Install\n\n```sh\njvc add @deckyard/seafile\n```\n\nThis vendors the deck to `vendor/\u003cscope\u003e/seafile/`. Without `jvc`, unpack the\n`src/` subtree of a release archive (`\u003cscope\u003e-seafile-\u003cversion\u003e.tar.gz`) there.\n\n## Usage\n\n```jennifer\nuse fs;\nuse io;\nuse os;\nimport \"@deckyard/seafile/\" as seafile;\n\ndef c as seafile.Client init seafile.client(\"https://cloud.example.com\");\n$c = seafile.withToken($c, seafile.login($c, \"me@example.com\", os.getEnv(\"SEAFILE_PASSWORD\"), \"\"));\ndef lib as seafile.Library init seafile.createLibrary($c, \"backups\", \"\");\n\nseafile.mkdir($c, $lib.id, \"/2026/11\", true);\ndef e as seafile.Entry init seafile.put($c, $lib.id, \"/2026/11/db.sql\", fs.readBytes(\"db.sql\"), true);\ndef o as seafile.ShareLinkOptions;\n$o.expireDays = 7;\nio.printf(\"%s\\n\", seafile.createShareLink($c, $lib.id, $e.path, $o).link);\n```\n\nDownload and upload a file, no WebDAV needed:\n\n```jennifer\ndef data as bytes init seafile.get($c, $lib.id, \"/2026/11/db.sql\", 0);\nfs.writeBytes(\"db-copy.sql\", $data);\nseafile.put($c, $lib.id, \"/2026/11/notes.txt\", fs.readBytes(\"notes.txt\"), false);\n```\n\n`get` caps the body at `DOWNLOAD_LIMIT` (64 MiB) for `maxBytes` 0. `put`\nwithout `replace` stores a taken name as `notes (1).txt` and returns the\n`Entry` with the name it got. `putResumable` uploads large files in chunks.\n\n## Requirements\n\nJennifer 0.26.0 or newer, the default `jennifer` binary (not\n`jennifer-tiny`), and the `net` capability. Tested against Seafile 13.0\nCommunity Edition; file locks and full-text search need the Professional\nedition. Transfers are held in memory (see the manual's Limits).\n\n## Development\n\n```sh\ntools/check-all.sh                   # the full gate, as CI runs it\njennifer test src/seafile_test.j     # the test overlay\ntools/check-docs.sh                  # docs against the code\ntools/pack.sh dist                   # build the release archive\n```\n\n## Licence\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n\n`tools/check-headers.sh` checks every source file's SPDX header against\n`deck.toml`.\n"}