remnote-smart-rem icon indicating copy to clipboard operation
remnote-smart-rem copied to clipboard

No quanta store

Open LvShuaiChao opened this issue 3 years ago • 8 comments

image No quanta store

LvShuaiChao avatar May 17 '21 02:05 LvShuaiChao

quanta is not a database, but each of those remnote-... databases should have an object store called quanta.

I actually have found a method to further automate the database selection which is not pushed yet. This finds the database name for the currently opened Knowledge Base:

function getSettings() {
  return {
    DATABASE_NAME: `remnote-${currentKnowledgeBaseId()}`,
    DATABASE_VERSION: 28,
    SMART_REM_PREFIX: ">>>"
  };
}

hannesfrank avatar May 17 '21 18:05 hannesfrank

Can you use smart REM now?

LvShuaiChao avatar May 20 '21 00:05 LvShuaiChao

quanta is not a database, but each of those remnote-... databases should have an object store called quanta.

I actually have found a method to further automate the database selection which is not pushed yet. This finds the database name for the currently opened Knowledge Base:

function getSettings() {
  return {
    DATABASE_NAME: `remnote-${currentKnowledgeBaseId()}`,
    DATABASE_VERSION: 28,
    SMART_REM_PREFIX: ">>>"
  };
}

image This is the case after my operation. Is this step normal?

LvShuaiChao avatar May 20 '21 00:05 LvShuaiChao

Looks good to me. The first and third error are not from smart rem. They must be from other user scripts you installed.

The second error d3 is not defined is a race condition that I had fixed here: https://gist.github.com/hannesfrank/d241e10d3fff32068bc9b60253d58371#file-smart-rem-user-js-L1274

But there were a few other issues due to recent markup changes in RemNote. I patched them as best as I could and the above gist works for me now again.

hannesfrank avatar May 21 '21 09:05 hannesfrank

I installed this script, but my operation here is still unsuccessful! Here is my operation process, please take a look at which step is wrong install smart Rem

LvShuaiChao avatar May 22 '21 12:05 LvShuaiChao

Just tested with violentmonkey. It works for me so I don't know how to help you. Did you reload remnote after installing the script? What is shown in the console after you installed the script?

There are only 2 more things to keep in mind:

  1. It only works with the old split pane, not the new windowed panes.
  2. Make sure you have the correct database configured. For me it is still lnotes in the web version. But the desktop app
DATABASE_NAME: `remnote-${currentKnowledgeBaseId()}`,

is more likely to work.

hannesfrank avatar May 22 '21 12:05 hannesfrank

As you suggested, after I change the name of the database and refresh remnote with Ctrl + R, the script will work. But I still have some small problems

  1. Every time I press Ctrl + enter, I always convert REM to todo rem. do you have this problem?
  2. "> >" = will automatically become "> > ≥"
  3. Sometimes it can be operated successfully, but sometimes it is difficult. I haven't found a completely successful strategy at present

https://user-images.githubusercontent.com/35528109/119227749-05888200-bb42-11eb-9881-e0857bbe98f3.mp4

LvShuaiChao avatar May 22 '21 13:05 LvShuaiChao

Every time I press Ctrl + enter, I always convert REM to todo rem. do you have this problem?

That is a shortcut of RemNote, so a feature, not a bug 😄 image

"> >" = will automatically become "> > ≥"

Yes, I made the calculator before these shortcodes got implemented 😉 I updated the matcher to include the space you tried (this line), but I'm not going spend too much time fixing stuff since most things are far to hacky anyway (just proof of concepts aka basically useless 😛) and the new plugin system is already in development.

hannesfrank avatar May 22 '21 13:05 hannesfrank