Skip to content

FR: taking the rule engine to the next level #1406

@thiswillbeyourgithub

Description

@thiswillbeyourgithub

Describe the feature you'd like

Regarding links/text bookmarks: I'm suggesting the following new rule engine features:

To the "Whenever" section:
New:

  • An asset was added/removed to the bookmark
  • A highlight was added/removed to the bookmark

Enhancements:

  • Favourite -> A bookmark's Favourite status has changed
    • add the options "added to/removed from favourite"
    • same for archive
  • A bookmark is added to this list -> A bookmark is added to a list
    • and include an "Any list" option at the top (akin to wildcards)
  • This tag was added to a bookmark -> A tag was added to a bookmark
    • and add options "Any tag", "Any human tag", "Any AI tag"
    • Same for removing a tag

To the "If" section:

  • "contains archive": whether this bookmark has an "Archive" content (not sure if bookmarks can actually be missing this)
  • condition on the actual text content (i.e. the reader view content, which is the thing you can add highlights to)
    • matches regex
    • character count + greater/smaller than + int
    • word count greater/smaller than + int
    • line count greater/smaller than + int
  • same but for the raw html content (i.e. I think "archive" is not always available, hence the "contains archive")
  • "contains video": whether the bookmark contains a video
    • video length
    • video title
    • contains subtitle or not
  • "contains screenshot": whether the bookmark contains a screenshot

To the actions:

  • prepend/append to the reader view + some html
  • create new list/sublist/smartlist

Additionally:

  • I think the "Whenever" should be renamed "triggers" to make them easy to find in the code, documentation, api and discussion

Describe the benefits this would bring to existing Karakeep users

To me the most important is the rules pertaining to the textual content of bookmarks, as it would allow adding tags that dynamically adjust to the reading time of the article.
Also it's empowering users.

Can the goal of this request already be achieved via other means?

Not really, the rule engine has great potential but cannot for now do complex things

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

Additional context

I would also be nice to add a "estimated reading time has changed" when #1079 is done

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions