Provide move notes command for Inkdrop.
MIT License
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
config.js
in your favorite directorycondig.js should export an Array.
commandName
: command namefrom
: from notebook nameto
: to notebook namepattern
: predicate function for detecting
true
, this plugin move the note from from
to to
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);
}
}
]
config.js
from Plugin SettingLimited
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.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT azu