Skip to content

v2.0.2 🎈

Compare
Choose a tag to compare
@michaelbeutler michaelbeutler released this 28 Jun 10:15
· 3 commits to main since this release
f4603b5

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

Full Changelog: v2.0.1...v2.0.2