Provide move notes command for Inkdrop.
This plugin move notes from A to B using pattern matching.
This plugin help you to move your daily notes like YYYY-MM-DD
to "Archives" note book.
Install with ipm:
ipm install move-notes
- Create
config.js
in your favorite directory
condig.js should export an Array.
commandName
: command namefrom
: from notebook nameto
: to notebook namepattern
: predicate function for detecting- If the predicate function return
true
, this plugin move the note fromfrom
toto
- If the predicate function return
config.js
example:
module.exports = [
{
"commandName": "Test",
"from": "Inbox",
"to": "Archives",
// pattern receive note instance
// https://docs.inkdrop.app/reference/db-note
// ({ title, body }) => boolean;
"pattern": ({ title }) => {
return /TEST_TITLE/.test(title);
}
},
{
"commandName": "Prune Inbox",
"from": "Inbox",
"to": "Archives",
"pattern": ({ title }) => {
// Move "YYYY-DD-MM" note from "Inbox" to "Archives"
// Not include YYYY-DD-MM ~ YYYY-DD-MM
// Not include today
const todayDate = new Date().toISOString().slice(0, 10);
return /^\d{4}-\d{2}-\d{2}/.test(title) && !/\s[~-]\s/.test(title) && !title.includes(todayDate);
}
}
]
- Set path to
config.js
from Plugin Setting
- Reload after configuration!
- Select "Plugins" → "Move Notes" → "{commandName}"
Limited
- Move only 100 notes at once
Tips: This plugin move-notes:${item.commandName}
as Inkdrop command. You can use it from key Customizing Keybindings.
See Releases page.
Install devDependencies and Run npm test
:
npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © azu