ow - Nextcloud command-line client
ow (like, you're trying to say "owl" and almost succeed) is your handy local command-line pal for Nextcloud. Perform various operations to enhance local editing, collaboration, and more.
List available actions.
$ ow --help
usage: ow [-h] [-d] {i,internal-link,l,lock,u,unlock} path
positional arguments:
{i,internal-link,l,lock,u,unlock}
action to perform
path local path to operate on
options:
-h, --help show this help message and exit
-d, --debug enable debug messages
Output is minimal on success. If an error occurs, messages are printed to standard error and a nonzero exit code is returned.
Given a local file path sync'd by the Nextcloud desktop client, return the "internal link" on the Nextcloud server.
$ ow internal-link ~/Nextcloud/test.md
https://cloud.example.com/f/229
Lock a file. Requires the Temporary files lock app.
$ ow lock ~/Nextcloud/test.md
Locking indicates to other users your wish to avoid conflicts in shared files.
Unlock a file. Requires the Temporary files lock app.
$ ow unlock ~/Nextcloud/test.md
- install prerequisites
- Python 3
- Nextcloud desktop sync client
- download the
main.py
script, save it asow
- edit values under
YOUR CONFIG
- put the script in your path, for example:
~/bin/ow
- make sure it is executable
- for auto-completion in Bash, source
bash_completion
ow talks with the Nextcloud WebDAV API.
ow started with one command (get internal link for locally sync'd file). Hopefully by the time you are reading this it has learned more tricks. If I and others use this, like it, and want to do more with it, here are some ideas on what we might do:
- add more features
- post chat messages
- add a task
- add a calendar event
- search
- improve setup
- automate install
- improve config
- read and use config from Nextcloud desktop client
- read and use secrets from desktop/OS password manager or smartcard
- improve code maintainability
- use a real argument parser
- add tests
- improve cross-platform compatibility
- add Windows support
- add macOS support
- pick a better name
- use a real contributor agreement
- Are there other/better free software utilities like this one? List/promote them.
- Would it make more sense to implement this and the other feature ideas (above) within the official client? Do the maintainers want these features?
- support Windows, Linux, macos
- test on platforms other than Linux
- add documentation for platforms other than Linux
- improve Bash programmable completion
- Copyright ©2023 Adam Monsen haircut@gmail.com
- License: AGPL v3 or later (see COPYING)