Skip to content

Custom command support #64

@mntn-xyz

Description

@mntn-xyz

This would be a great tool for reviewing and collecting research/resources, finding news to repost to socials, and so on, especially once RSS support is added. To do this, users need a way to save and organize specific feed items for later access, preferably from outside the application. Rather than build an interface for those use cases (impossible to imagine every scenario), it would make sense to add a custom command/shortcut handler that passes information about the currently selected or viewed article to another program. This would open up infinite possibilities via scripting.

My suggestion is to have users define optional hotkeys, with a command associated with each hotkey. Substitution would be used on the command to provide information about the feed and item.

Rough examples of values that might be provided for substitution:

  • ${feed-type} - type of feed (Lemmy, HN, etc)
  • ${feed-name} - RSS feed name, Lemmy category, "Hacker News", etc
  • ${feed-url}
  • ${item-title}
  • ${item-url}
  • ${item-date}

For a simple example, if you set up a command as nb bookmark with arguments ${item-url} --tags incoming then the hotkey would append the item url to nb bookmarks with the "incoming" tag. Or a user may pass it to a script that allows them to enter tags before saving the url, and so on. It would be nice if the script could have an interactive console, but having the user rely on screen or tmux for this would probably be adequate.

Happy to work on this if you think there is a chance for inclusion!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions