yarle-evernote-to-md
Version:
Yet Another Rope Ladder from Evernote
136 lines • 7.63 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasLinkToOriginalInTemplate = exports.hasUpdateTimeInTemplate = exports.hasMetadataInTemplate = exports.hasAnyTagsInTemplate = exports.hasApplicationDataInTemplate = exports.hasContentClassInTemplate = exports.hasPlaceNameInTemplate = exports.hasSourceApplicationInTemplate = exports.hasSourceURLInTemplate = exports.hasSourceInTemplate = exports.hasAuthorInTemplate = exports.hasSubjectDateInTemplate = exports.hasOriginalLinkInTemplate = exports.hasNotebookInTemplate = exports.hasAltitudeInTemplate = exports.hasLocationInTemplate = exports.hasReminderOrderInTemplate = exports.hasReminderDoneTimeInTemplate = exports.hasReminderTimeInTemplate = exports.hasCreationTimeInTemplate = void 0;
const CREATIONTIME = __importStar(require("./placeholders/createdat-placeholders"));
const LOCATION = __importStar(require("./placeholders/location-placeholders"));
const ALTITUDE = __importStar(require("./placeholders/altitude-placeholders"));
const NOTEBOOK = __importStar(require("./placeholders/notebook-placeholders"));
const ORIGINALLINK = __importStar(require("./placeholders/original-placeholders"));
const SUBJECTDATE = __importStar(require("./placeholders/subject-date-placeholders"));
const AUTHOR = __importStar(require("./placeholders/author-placeholders"));
const SOURCE = __importStar(require("./placeholders/source-placeholders"));
const SOURCEURL = __importStar(require("./placeholders/source-url-placeholders"));
const SOURCEAPPLICATION = __importStar(require("./placeholders/source-application-placeholders"));
const PLACENAME = __importStar(require("./placeholders/place-name-placeholders"));
const CONTENTCLASS = __importStar(require("./placeholders/content-class-placeholders"));
const YAMLAPPLICATIONDATA = __importStar(require("./placeholders/application-data-yaml-list-placeholders"));
const TAGS = __importStar(require("./placeholders/tags-placeholders"));
const YAMLARRAYTAGS = __importStar(require("./placeholders/tags-array-placeholders"));
const YAMLLISTTAGS = __importStar(require("./placeholders/tags-yaml-list-placeholders"));
const METADATA = __importStar(require("./placeholders/metadata-placeholders"));
const UPDATETIME = __importStar(require("./placeholders/updatedat-placeholders"));
const REMINDERTIME = __importStar(require("./placeholders/remindertime-placeholders"));
const REMINDERDONETIME = __importStar(require("./placeholders/reminderdonetime-placeholders"));
const REMINDERORDER = __importStar(require("./placeholders/reminderorder-placeholders"));
const hasCreationTimeInTemplate = (templateContent) => {
return hasItemInTemplate(CREATIONTIME, templateContent);
};
exports.hasCreationTimeInTemplate = hasCreationTimeInTemplate;
const hasReminderTimeInTemplate = (templateContent) => {
return hasItemInTemplate(REMINDERTIME, templateContent);
};
exports.hasReminderTimeInTemplate = hasReminderTimeInTemplate;
const hasReminderDoneTimeInTemplate = (templateContent) => {
return hasItemInTemplate(REMINDERDONETIME, templateContent);
};
exports.hasReminderDoneTimeInTemplate = hasReminderDoneTimeInTemplate;
const hasReminderOrderInTemplate = (templateContent) => {
return hasItemInTemplate(REMINDERORDER, templateContent);
};
exports.hasReminderOrderInTemplate = hasReminderOrderInTemplate;
const hasLocationInTemplate = (templateContent) => {
return hasItemInTemplate(LOCATION, templateContent);
};
exports.hasLocationInTemplate = hasLocationInTemplate;
const hasAltitudeInTemplate = (templateContent) => {
return hasItemInTemplate(ALTITUDE, templateContent);
};
exports.hasAltitudeInTemplate = hasAltitudeInTemplate;
const hasNotebookInTemplate = (templateContent) => {
return hasItemInTemplate(NOTEBOOK, templateContent);
};
exports.hasNotebookInTemplate = hasNotebookInTemplate;
const hasOriginalLinkInTemplate = (templateContent) => {
return hasItemInTemplate(ORIGINALLINK, templateContent);
};
exports.hasOriginalLinkInTemplate = hasOriginalLinkInTemplate;
const hasSubjectDateInTemplate = (templateContent) => {
return hasItemInTemplate(SUBJECTDATE, templateContent);
};
exports.hasSubjectDateInTemplate = hasSubjectDateInTemplate;
const hasAuthorInTemplate = (templateContent) => {
return hasItemInTemplate(AUTHOR, templateContent);
};
exports.hasAuthorInTemplate = hasAuthorInTemplate;
const hasSourceInTemplate = (templateContent) => {
return hasItemInTemplate(SOURCE, templateContent);
};
exports.hasSourceInTemplate = hasSourceInTemplate;
const hasSourceURLInTemplate = (templateContent) => {
return hasItemInTemplate(SOURCEURL, templateContent);
};
exports.hasSourceURLInTemplate = hasSourceURLInTemplate;
const hasSourceApplicationInTemplate = (templateContent) => {
return hasItemInTemplate(SOURCEAPPLICATION, templateContent);
};
exports.hasSourceApplicationInTemplate = hasSourceApplicationInTemplate;
const hasPlaceNameInTemplate = (templateContent) => {
return hasItemInTemplate(PLACENAME, templateContent);
};
exports.hasPlaceNameInTemplate = hasPlaceNameInTemplate;
const hasContentClassInTemplate = (templateContent) => {
return hasItemInTemplate(CONTENTCLASS, templateContent);
};
exports.hasContentClassInTemplate = hasContentClassInTemplate;
const hasApplicationDataInTemplate = (templateContent) => {
return hasItemInTemplate(YAMLAPPLICATIONDATA, templateContent);
};
exports.hasApplicationDataInTemplate = hasApplicationDataInTemplate;
const hasAnyTagsInTemplate = (templateContent) => {
return (hasItemInTemplate(TAGS, templateContent)
|| hasItemInTemplate(YAMLARRAYTAGS, templateContent)
|| hasItemInTemplate(YAMLLISTTAGS, templateContent));
};
exports.hasAnyTagsInTemplate = hasAnyTagsInTemplate;
const hasMetadataInTemplate = (templateContent) => {
return templateContent.includes(METADATA.START_BLOCK) &&
templateContent.includes(METADATA.END_BLOCK);
};
exports.hasMetadataInTemplate = hasMetadataInTemplate;
const hasUpdateTimeInTemplate = (templateContent) => {
return hasItemInTemplate(UPDATETIME, templateContent);
};
exports.hasUpdateTimeInTemplate = hasUpdateTimeInTemplate;
const hasLinkToOriginalInTemplate = (templateContent) => {
return hasItemInTemplate(ORIGINALLINK, templateContent);
};
exports.hasLinkToOriginalInTemplate = hasLinkToOriginalInTemplate;
const hasItemInTemplate = (item, templateContent) => {
return templateContent.includes(item.START_BLOCK) &&
templateContent.includes(item.CONTENT_PLACEHOLDER) &&
templateContent.includes(item.END_BLOCK);
};
//# sourceMappingURL=checker-functions.js.map