JackGruber / joplin-plugin-hotfolder

A plugin to Monitor a locale folder and import the files as a new note.
46 stars 4 forks source link

Issues with tags #37

Closed kuz-z-zma closed 2 months ago

kuz-z-zma commented 2 months ago

Found a bug: If tag to be added to note contains ! or _ (maybe other special characters too) & is separated by the "," from other tags - note files won't be deleted from the monitored folder after import. If such tag is left without "," after it - notes will be deleted, but this tag won't be added.

This results in repeated import of the same notes over and over again (with every change of settings and every newly added file to the directory).

experiments_hotfolder.log

JackGruber commented 2 months ago

I cannot reproduce this and not all settings are currently logged. Could you add a screenshot of the Hotfolder settings or install the attached Plugin manual and post the logfile after a test again.

io.github.jackgruber.hotfolder.zip

kuz-z-zma commented 2 months ago

Sure, here you go.

Win10 x64 Joplin 2.14.22 (prod, win32)

Sync Version: 3 Profile Version: 46 Keychain Supported: Yes Revision: e579eb9

Backup: 1.4.1 Delete folder & notes: 1.1.1 Delete unlinked resources: 1.0.0 Hotfolder: 1.2.0 Note Rename: 1.0.0 Search & Replace: 2.2.0 Tagging: 1.0.3

experiments_hotfolder.log

Below are screenshots for Settings and tags, as they got mentioned in log.

As log gives an error for a tag - I did some further experiments with different tags (!!! and !_todo, they are listed later in the log) Those are my current tags, for reference: Screenshot_Joplin_2024-06-22-13 50 19

Four versions of setting I've used and their effect on tags for the note created.

Screenshot_Joplin_2024-06-22-13 25 19 Screenshot_Joplin_2024-06-22-13 26 44 Screenshot_Joplin_2024-06-22-13 27 32 Screenshot_Joplin_2024-06-22-13 27 53

JackGruber commented 2 months ago

The query in Joplin for inbox or !_imported tag returns multiple tags ... Were notes and tags imported from Evernote or somewhere else?

kuz-z-zma commented 2 months ago

Notes were imported from Vivaldi browser (as .md files without any tags) - upon import they were manually assigned !_imported in Joplin. I think error is caused by my previous experiments with special characters - I've tried to rename this tag to "! imported" or "!imported" in attempts to get deletion working.

inbox I've added in Joplin to combat inability to use desired tag with an "!_" prefix.

But as you can see later, when i'm using other tags with ! in them - I get the same problem of non-deletion, only this time the error is [error] Error: Missing "query" parameter

if I leave just inbox - everything is working as expected, regardless of having comma at the end or not

JackGruber commented 2 months ago

[error] Error: Missing "query" parameter

This was a error in the quick and dirty added logging ...

Could you try the following build io.github.jackgruber.hotfolder.zip

kuz-z-zma commented 2 months ago

Tested: now !_imported is added as tag.

test_hotfolder.log

As you can see, I've tried to switch tags around - and if list of tags to add is ending with a comma - file is not deleted. But it works if there is no comma closing the last tag.

JackGruber commented 2 months ago

Two bugs have been fixed and will be published in the next release.