Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup duplicate entries after renaming a source #269

Open
Sanqui opened this issue Feb 5, 2022 · 3 comments
Open

Cleanup duplicate entries after renaming a source #269

Sanqui opened this issue Feb 5, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Sanqui
Copy link
Contributor

Sanqui commented Feb 5, 2022

I just started using Promnesia, set up a directory with Markdown files as a source in the config, tested it, then proceeded to rename the source to give it a more descriptive name than auto. I'm now getting duplicate entries in the sidebar, what's the story to clean these up? Thanks for the awesome tool by the way.

@karlicoss karlicoss added the bug Something isn't working label Feb 5, 2022
@karlicoss
Copy link
Owner

Thanks, glad you tried it and like it :)

Good catch, I suspected it could be the case, but never got round to try.

The easiest is perhaps to use promnesia index --overwrite ..., this will empty the index database before filling it again, so would get rid of duplicates. I have Promnesia running in overwrite mode once a day so never really end up with dupes.

The reason for default behavior (when it doesn't touch the other sources) is so one could run promnesia on lighter souces frequently. E.g. I'm running it only against my plaintext notes every ten minutes, whereas running in --overwrite mode like I mentioned above with all sources would take a while, maybe half an hour.

@Sanqui
Copy link
Contributor Author

Sanqui commented Feb 5, 2022

Thanks for the tip, that makes sense! It's good to know the index can be safely emptied like that.

@karlicoss
Copy link
Owner

Yep, the index (by default something like ~/.local/share/promnesia/promnesia.sqlite) can even be manually removed if necessary -- worst case it'll be just rebuilt next time Promnesia runs, it wouldn't mess with the original data :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants