v2.0.2 🎈
New Features
You can now rename documents based on their contents by extracting the text
property.
Example:
const category = {
name: "Foo",
conditions: [sc.and("Foo", "Bar")],
path: "Foo/Bar/$y",
rename: function (document) {
// Deconstruct object 🚧
const { text } = document;
const year = new Date().getFullYear();
if (text.includes("Foo")) {
return `Fooo_${year}.pdf`;
} else {
return `Baaaar_${year}\.pdf`;
}
},
};
What's Changed
- V2 Merge 🐣 by @michaelbeutler in #1
Full Changelog: v2.0.1...v2.0.2