Quantcast
Channel: DEVONtechnologies Community - Latest posts
Viewing all articles
Browse latest Browse all 17301

Unique search terms in order to find memos across documents

$
0
0

If we’re talking about Markdown documents, a script should do the trick. Something like (JavaScript)

(() => {
  const previousChar = 'Δ'; //character to replace
  const replacement = '¥'; // replacement for previousChar
  const app = Application("DEVONthink 3");
  app.databases().forEach(db => { // loop over all databases
    const MDrecords = db.search(`type: "markdown"`); // find all MD documents in database
    MDrecords.filter(record => record.plainText().includes(previousChar)).forEach(record => {
    /*
     * For all MD records containing `previousChar`, replace that char with `replacement`
    */
      record.plainText = record.plainText().replaceAll(previousChar, replacement);
    })
  })
})()

I didn’t test that, though.


Viewing all articles
Browse latest Browse all 17301

Trending Articles