Elektrubadur

Personal web page of Björn Lindström

Entries on Nextcloud:

All tags

Vimwiki + Nextcloud Notes

In Programming about Vim, Vimwiki, Nextcloud and notes — 

I've been using Vimwiki for a while, which lets me keep interlinked plain text notes on my computer with minimal hassle.

For a while I've also kept these synced to my phone via the Nextcloud Notes application. I have a self-hosted Nextcloud instance, and simply point Vimwiki on my computer to the same directory in the directory that I have synchronized with Nextcloud.

The Nextcloud Notes app uses Markdown, so I have to configure Vimwiki to use that syntax, which is fine with me. One quirk of the Nextcloud Notes app is that rather than letting you name files independently, it will change filenames to whatever the first line of your note is. Until today that meant I had to keep making sure in Vimwiki to add those headers, but I've now finally automated that.

Simple Nextcloud To-Do List Automation with Python and WebDAV

In Programming about Nextcloud and planning — 

I keep a task list in a todo.txt format in Nextcloud. They are simply kept as two text files, todo.txt and done.txt in the root of my Nextcloud user directory.

Some clients already have the option to move tasks from todo.txt to done.txt when you mark a task as done. However, I would prefer they stick around in the todo.txt for a while, in case I change my mind.

At first I thought I'd just write a script to run as a cronjob on the server hosting Nextcloud, but that won't work with syncrhonization, as it won't let Nextcloud know the files have changed. I then thought there must be an API to read/write files to Nextcloud, and then quickly realized that this API is WebDAV. So, I should be able to make a Python script to do this, using requests. A more full-featured WebDAV library would be overkill for this.