Making my first extension (Text Kanban)

This thread will document the making of my first extension.

Background

When working on my own projects I am powered by todo lists.

I organise them by headings, and it could be thought of a sort of vertical kanban board (like Trello) in a text file. Items are moved downwards from section to section as the project progresses.

TODO
- item one
- another item

TEST
- something that needs checking

DONE
- completed item

I then take the “done” items and duplicate them to my changelog, where i expand them manually with a description.

Extension time!

I had the idea to make an extension to make it easier to work with this type of file. Specifically, to automate moving of lines between sections. I already use Nova’s move line shortcut (Option/Alt + up/down) but it would be good if this extension could make it even quicker and easier.

I think I would need just a few simple functions:

  • find next/prev heading line number n
  • move current line to line n
  • duplicate current line from current file to changelog file

So my first question is: are there library functions to save me having to write these myself? Particularly move line, which is more of a generic thing.

Any thoughts or pointers appreciated. Thanks!

I found https://docs.nova.app/api-reference/

  • Scanner
  • moveUp([rowCount]) & moveDown([rowCount])

Seems to be a good start.

I made a slightly different extension, small steps on the way to this one.

My real first extension allows the user to open the current project’s todo.txt and/or done.txt in an app of your choice.

I eventually changed to using TaskPaper which has these features built in, so I made an extension to integrate that with Nova.