@jmuchovej/paperpile-notion
Version:
CLI to sync your Paperpile with Notion
24 lines (23 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const base_1 = (0, tslib_1.__importDefault)(require("../../base"));
const notion_cms_1 = require("../../notion-cms");
class ArticlesClean extends base_1.default {
async run() {
await this.parse(ArticlesClean);
const articlesCMS = (0, notion_cms_1.createCMS)(this.config, this.appConfig, this.notion, "articles");
this.log(`Removing Articles with no Authors.`);
const noAuthorsFilter = articlesCMS.filter.authors.is_empty(true);
await (0, notion_cms_1.archiveEmptyFilters)(this, articlesCMS, noAuthorsFilter);
this.log();
this.log();
// TODO implement deduplication
}
}
exports.default = ArticlesClean;
ArticlesClean.summary = `Cleans up your Articles Database.`;
ArticlesClean.description = `1. Removes dangling articles without authors.`;
ArticlesClean.args = base_1.default.args;
ArticlesClean.flags = base_1.default.flags;
ArticlesClean.examples = base_1.default.examples;