AppleScript: Add a "feed" property to articles

- Also make scripts like

feed id "foo" of account id "bar"

find feeds in folders.
This commit is contained in:
Nate Weaver
2020-06-07 20:13:51 -05:00
parent 6ebd5ad5ed
commit 42f63808f3
3 changed files with 15 additions and 4 deletions

View File

@@ -141,4 +141,13 @@ class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
return articleAuthors.map { ScriptableAuthor($0, container:self) } as NSArray
}
@objc(feed)
var feed: ScriptableWebFeed? {
guard let parentFeed = self.article.webFeed,
let account = parentFeed.account
else { return nil }
return ScriptableWebFeed(parentFeed, container: ScriptableAccount(account))
}
}