You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

750 lines
132 KiB

'use strict';
var obsidian = require('obsidian');
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
var DeleteFilesModal = /** @class */ (function (_super) {
__extends(DeleteFilesModal, _super);
function DeleteFilesModal(app, filesToDelete) {
var _this = _super.call(this, app) || this;
_this.filesToDelete = filesToDelete;
return _this;
}
DeleteFilesModal.prototype.onOpen = function () {
var _this = this;
var _a = this, contentEl = _a.contentEl, titleEl = _a.titleEl;
titleEl.setText('Move ' + this.filesToDelete.length + ' files to system trash?');
contentEl
.createEl("button", { text: "Cancel" })
.addEventListener("click", function () { return _this.close(); });
contentEl
.setAttr("margin", "auto");
contentEl
.createEl("button", {
cls: "mod-cta",
text: "Confirm"
})
.addEventListener("click", function () { return __awaiter(_this, void 0, void 0, function () {
var _i, _a, file;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_i = 0, _a = this.filesToDelete;
_b.label = 1;
case 1:
if (!(_i < _a.length)) return [3 /*break*/, 4];
file = _a[_i];
return [4 /*yield*/, this.app.vault.trash(file, true)];
case 2:
_b.sent();
_b.label = 3;
case 3:
_i++;
return [3 /*break*/, 1];
case 4:
this.close();
return [2 /*return*/];
}
});
}); });
};
DeleteFilesModal.prototype.onClose = function () {
var contentEl = this.contentEl;
contentEl.empty();
};
return DeleteFilesModal;
}(obsidian.Modal));
var SettingsTab = /** @class */ (function (_super) {
__extends(SettingsTab, _super);
function SettingsTab(app, plugin, defaultSettings) {
var _this = _super.call(this, app, plugin) || this;
_this.defaultSettings = defaultSettings;
_this.plugin = plugin;
return _this;
}
// Add trailing slash to catch files named like the directory. See https://github.com/Vinzent03/find-unlinked-files/issues/24
SettingsTab.prototype.formatPath = function (path, addDirectorySlash) {
if (path.length == 0)
return path;
path = obsidian.normalizePath(path);
if (addDirectorySlash)
return path + "/";
else
return path;
};
SettingsTab.prototype.display = function () {
var _this = this;
var containerEl = this.containerEl;
containerEl.empty();
containerEl.createEl("h2", { text: this.plugin.manifest.name });
containerEl.createEl("h4", { text: "Settings for finding orphaned files" });
new obsidian.Setting(containerEl)
.setName("Open output file")
.addToggle(function (cb) {
return cb.setValue(_this.plugin.settings.openOutputFile)
.onChange(function (value) {
_this.plugin.settings.openOutputFile = value;
_this.plugin.saveSettings();
});
});
new obsidian.Setting(containerEl)
.setName('Output file name')
.setDesc('Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.')
.addText(function (cb) { return cb.onChange(function (value) {
if (value.length == 0) {
_this.plugin.settings.outputFileName = _this.defaultSettings.outputFileName;
}
else {
_this.plugin.settings.outputFileName = value;
}
_this.plugin.saveSettings();
}).setValue(_this.plugin.settings.outputFileName); });
new obsidian.Setting(containerEl)
.setName('Disable working links')
.setDesc('Indent lines to disable the link and to clean up the graph view')
.addToggle(function (cb) { return cb.onChange(function (value) {
_this.plugin.settings.disableWorkingLinks = value;
_this.plugin.saveSettings();
}).setValue(_this.plugin.settings.disableWorkingLinks); });
new obsidian.Setting(containerEl)
.setName("Exclude files in the given directories")
.setDesc("Enable to exclude files in the given directories. Disable to only include files in the given directories")
.addToggle(function (cb) {
return cb.setValue(_this.plugin.settings.ignoreDirectories)
.onChange(function (value) {
_this.plugin.settings.ignoreDirectories = value;
_this.plugin.saveSettings();
});
});
new obsidian.Setting(containerEl)
.setName("Directories")
.setDesc("Add each directory path in a new line")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/Subdirectory")
.setValue(_this.plugin.settings.directoriesToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, true); });
_this.plugin.settings.directoriesToIgnore = paths;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude files")
.setDesc("Add each file path in a new line (with file extension!)")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/file.md")
.setValue(_this.plugin.settings.filesToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); });
_this.plugin.settings.filesToIgnore = paths;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude links")
.setDesc("Exclude files, which contain the given file as link. Add each file path in a new line (with file extension!). Set it to `*` to exclude files with links.")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/file.md")
.setValue(_this.plugin.settings.linksToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); });
_this.plugin.settings.linksToIgnore = paths;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude files with the given filetypes")
.setDesc("Enable to exclude files with the given filetypes. Disable to only include files with the given filetypes")
.addToggle(function (cb) {
return cb.setValue(_this.plugin.settings.ignoreFileTypes)
.onChange(function (value) {
_this.plugin.settings.ignoreFileTypes = value;
_this.plugin.saveSettings();
});
});
new obsidian.Setting(containerEl)
.setName("File types")
.setDesc("Effect depends on toggle above")
.addTextArea(function (cb) { return cb
.setPlaceholder("docx,txt")
.setValue(_this.plugin.settings.fileTypesToIgnore.join(","))
.onChange(function (value) {
var extensions = value.trim().split(",");
_this.plugin.settings.fileTypesToIgnore = extensions;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude tags")
.setDesc("Exclude files, which contain the given tag. Add each tag separated by comma (without `#`)")
.addTextArea(function (cb) { return cb
.setPlaceholder("todo,unfinished")
.setValue(_this.plugin.settings.tagsToIgnore.join(","))
.onChange(function (value) {
var tags = value.trim().split(",");
_this.plugin.settings.tagsToIgnore = tags;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Filetypes to delete per command. See README.")
.setDesc("Add each filetype separated by comma. Set to `*` to delete all files.")
.addTextArea(function (cb) { return cb
.setPlaceholder("jpg,png")
.setValue(_this.plugin.settings.fileTypesToDelete.join(","))
.onChange(function (value) {
var extensions = value.trim().split(",");
_this.plugin.settings.fileTypesToDelete = extensions;
_this.plugin.saveSettings();
}); });
/// Settings for find brokenLinks
containerEl.createEl("h4", { text: "Settings for finding broken links" });
new obsidian.Setting(containerEl)
.setName('Output file name')
.setDesc('Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.')
.addText(function (cb) { return cb.onChange(function (value) {
if (value.length == 0) {
_this.plugin.settings.unresolvedLinksOutputFileName = _this.defaultSettings.unresolvedLinksOutputFileName;
}
else {
_this.plugin.settings.unresolvedLinksOutputFileName = value;
}
_this.plugin.saveSettings();
}).setValue(_this.plugin.settings.unresolvedLinksOutputFileName); });
new obsidian.Setting(containerEl)
.setName("Exclude directories")
.setDesc("Exclude links in files in the specified directory. Add each directory path in a new line")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/Subdirectory")
.setValue(_this.plugin.settings.unresolvedLinksDirectoriesToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, true); });
_this.plugin.settings.unresolvedLinksDirectoriesToIgnore = paths;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude files")
.setDesc("Exclude links in the specified file. Add each file path in a new line (with file extension!)")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/file.md")
.setValue(_this.plugin.settings.unresolvedLinksFilesToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); });
_this.plugin.settings.unresolvedLinksFilesToIgnore = paths;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude links")
.setDesc("Exclude files, which contain the given file as link. Add each file path in a new line (with file extension!). Set it to `*` to exclude files with links.")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/file.md")
.setValue(_this.plugin.settings.unresolvedLinksLinksToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); });
_this.plugin.settings.unresolvedLinksLinksToIgnore = paths;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude filetypes")
.setDesc("Exclude links with the specified filetype. Add each filetype separated by comma")
.addTextArea(function (cb) { return cb
.setPlaceholder("docx,txt")
.setValue(_this.plugin.settings.unresolvedLinksFileTypesToIgnore.join(","))
.onChange(function (value) {
var extensions = value.trim().split(",");
_this.plugin.settings.unresolvedLinksFileTypesToIgnore = extensions;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude tags")
.setDesc("Exclude links in files, which contain the given tag. Add each tag separated by comma (without `#`)")
.addTextArea(function (cb) { return cb
.setPlaceholder("todo,unfinished")
.setValue(_this.plugin.settings.unresolvedLinksTagsToIgnore.join(","))
.onChange(function (value) {
var tags = value.trim().split(",");
_this.plugin.settings.unresolvedLinksTagsToIgnore = tags;
_this.plugin.saveSettings();
}); });
containerEl.createEl("h4", { text: "Settings for finding files without tags" });
new obsidian.Setting(containerEl)
.setName('Output file name')
.setDesc('Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.')
.addText(function (cb) { return cb.onChange(function (value) {
if (value.length == 0) {
_this.plugin.settings.withoutTagsOutputFileName = _this.defaultSettings.withoutTagsOutputFileName;
}
else {
_this.plugin.settings.withoutTagsOutputFileName = value;
}
_this.plugin.saveSettings();
}).setValue(_this.plugin.settings.withoutTagsOutputFileName); });
new obsidian.Setting(containerEl)
.setName("Exclude files")
.setDesc("Exclude the specific files. Add each file path in a new line (with file extension!)")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/file.md")
.setValue(_this.plugin.settings.withoutTagsFilesToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); });
_this.plugin.settings.withoutTagsFilesToIgnore = paths;
_this.plugin.saveSettings();
}); });
new obsidian.Setting(containerEl)
.setName("Exclude directories")
.setDesc("Exclude files in the specified directories. Add each directory path in a new line")
.addTextArea(function (cb) { return cb
.setPlaceholder("Directory/Subdirectory")
.setValue(_this.plugin.settings.withoutTagsDirectoriesToIgnore.join("\n"))
.onChange(function (value) {
var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, true); });
_this.plugin.settings.withoutTagsDirectoriesToIgnore = paths;
_this.plugin.saveSettings();
}); });
};
return SettingsTab;
}(obsidian.PluginSettingTab));
var Utils = /** @class */ (function () {
/**
* Checks for the given settings. Is used for `Find orphaned files` and `Find broken links`
* @param app
* @param filePath
* @param tagsToIgnore
* @param linksToIgnore
* @param directoriesToIgnore
* @param filesToIgnore
* @param ignoreDirectories
*/
function Utils(app, filePath, tagsToIgnore, linksToIgnore, directoriesToIgnore, filesToIgnore, ignoreDirectories, dir) {
if (ignoreDirectories === void 0) { ignoreDirectories = true; }
this.app = app;
this.filePath = filePath;
this.tagsToIgnore = tagsToIgnore;
this.linksToIgnore = linksToIgnore;
this.directoriesToIgnore = directoriesToIgnore;
this.filesToIgnore = filesToIgnore;
this.ignoreDirectories = ignoreDirectories;
this.dir = dir;
this.fileCache = app.metadataCache.getCache(filePath);
}
Utils.prototype.hasTagsToIgnore = function () {
var _this = this;
var tags = obsidian.getAllTags(this.fileCache);
return (tags === null || tags === void 0 ? void 0 : tags.find(function (tag) { return _this.tagsToIgnore.contains(tag.substring(1)); })) !== undefined;
};
Utils.prototype.hasLinksToIgnore = function () {
var _this = this;
var _a, _b;
if ((((_a = this.fileCache) === null || _a === void 0 ? void 0 : _a.embeds) != null || ((_b = this.fileCache) === null || _b === void 0 ? void 0 : _b.links) != null) && this.linksToIgnore[0] == "*") {
return true;
}
return obsidian.iterateCacheRefs(this.fileCache, function (cb) {
var _a;
var link = (_a = _this.app.metadataCache.getFirstLinkpathDest(cb.link, _this.filePath)) === null || _a === void 0 ? void 0 : _a.path;
return _this.linksToIgnore.contains(link);
});
};
Utils.prototype.checkDirectory = function () {
var _this = this;
if (this.dir) {
if (!this.filePath.startsWith(this.dir)) {
return true;
}
}
var contains = this.directoriesToIgnore.find(function (value) { return value.length != 0 && _this.filePath.startsWith(value); }) !== undefined;
if (this.ignoreDirectories) {
return contains;
}
else {
return !contains;
}
};
Utils.prototype.isFileToIgnore = function () {
return this.filesToIgnore.contains(this.filePath);
};
Utils.prototype.isValid = function () {
return !this.hasTagsToIgnore() && !this.hasLinksToIgnore() && !this.checkDirectory() && !this.isFileToIgnore();
};
/**
* Writes the text to the file and opens the file in a new pane if it is not opened yet
* @param app
* @param outputFileName name of the output file
* @param text data to be written to the file
*/
Utils.writeAndOpenFile = function (app, outputFileName, text, openFile) {
return __awaiter(this, void 0, void 0, function () {
var fileIsAlreadyOpened, newPane, file;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, app.vault.adapter.write(outputFileName, text)];
case 1:
_a.sent();
if (!openFile)
return [2 /*return*/];
fileIsAlreadyOpened = false;
app.workspace.iterateAllLeaves(function (leaf) {
if (leaf.getDisplayText() != "" && outputFileName.startsWith(leaf.getDisplayText())) {
fileIsAlreadyOpened = true;
}
});
if (!!fileIsAlreadyOpened) return [3 /*break*/, 5];
newPane = app.workspace.getLeavesOfType("empty").length == 0;
if (!newPane) return [3 /*break*/, 2];
app.workspace.openLinkText(outputFileName, "/", true);
return [3 /*break*/, 5];
case 2:
file = app.vault.getAbstractFileByPath(outputFileName);
if (!(file instanceof obsidian.TFile)) return [3 /*break*/, 4];
return [4 /*yield*/, app.workspace.getLeavesOfType("empty")[0].openFile(file)];
case 3:
_a.sent();
return [3 /*break*/, 5];
case 4:
app.workspace.openLinkText(outputFileName, "/", true);
_a.label = 5;
case 5: return [2 /*return*/];
}
});
});
};
return Utils;
}());
var DEFAULT_SETTINGS = {
outputFileName: "orphaned files output",
disableWorkingLinks: false,
directoriesToIgnore: [],
filesToIgnore: [],
fileTypesToIgnore: [],
linksToIgnore: [],
tagsToIgnore: [],
fileTypesToDelete: [],
ignoreFileTypes: true,
ignoreDirectories: true,
unresolvedLinksOutputFileName: "broken links output",
unresolvedLinksDirectoriesToIgnore: [],
unresolvedLinksFilesToIgnore: [],
unresolvedLinksFileTypesToIgnore: [],
unresolvedLinksLinksToIgnore: [],
unresolvedLinksTagsToIgnore: [],
withoutTagsDirectoriesToIgnore: [],
withoutTagsFilesToIgnore: [],
withoutTagsOutputFileName: "files without tags",
openOutputFile: true,
};
var FindOrphanedFilesPlugin = /** @class */ (function (_super) {
__extends(FindOrphanedFilesPlugin, _super);
function FindOrphanedFilesPlugin() {
return _super !== null && _super.apply(this, arguments) || this;
}
FindOrphanedFilesPlugin.prototype.onload = function () {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log('loading ' + this.manifest.name + " plugin");
return [4 /*yield*/, this.loadSettings()];
case 1:
_a.sent();
this.addCommand({
id: 'find-unlinked-files',
name: 'Find orphaned files',
callback: function () { return _this.findOrphanedFiles(); },
});
this.addCommand({
id: 'find-unresolved-link',
name: 'Find broken links',
callback: function () { return _this.findBrokenLinks(); },
});
this.addCommand({
id: "delete-unlinked-files",
name: "Delete orphaned files with certain extension. See README",
callback: function () { return _this.deleteOrphanedFiles(); }
});
this.addCommand({
id: "find-files-without-tags",
name: "Find files without tags",
callback: function () { return _this.findFilesWithoutTags(); }
});
this.addSettingTab(new SettingsTab(this.app, this, DEFAULT_SETTINGS));
this.app.workspace.on("file-menu", function (menu, file, source, leaf) {
if (file instanceof obsidian.TFolder) {
menu.addItem(function (cb) {
cb.setIcon("search");
cb.setTitle("Find orphaned files");
// Add trailing slash to catch files named like the directory. See https://github.com/Vinzent03/find-unlinked-files/issues/24
cb.onClick(function (e) { _this.findOrphanedFiles(file.path + "/"); });
});
}
});
return [2 /*return*/];
}
});
});
};
FindOrphanedFilesPlugin.prototype.findOrphanedFiles = function (dir) {
var _this = this;
var outFileName = this.settings.outputFileName + ".md";
var outFile;
var files = this.app.vault.getFiles();
var markdownFiles = this.app.vault.getMarkdownFiles();
var links = [];
markdownFiles.forEach(function (markFile) {
if (markFile.path == outFileName) {
outFile = markFile;
return;
}
obsidian.iterateCacheRefs(_this.app.metadataCache.getFileCache(markFile), function (cb) {
var txt = _this.app.metadataCache.getFirstLinkpathDest(obsidian.getLinkpath(cb.link), markFile.path);
if (txt != null)
links.push(txt.path);
});
});
var notLinkedFiles = files.filter(function (file) { return _this.isValid(file, links, dir); });
notLinkedFiles.remove(outFile);
var text = "";
var prefix;
if (this.settings.disableWorkingLinks)
prefix = " ";
else
prefix = "";
notLinkedFiles.forEach(function (file) {
text += prefix + "- [[" + _this.app.metadataCache.fileToLinktext(file, "/", false) + "]]\n";
});
Utils.writeAndOpenFile(this.app, outFileName, text, this.settings.openOutputFile);
};
FindOrphanedFilesPlugin.prototype.deleteOrphanedFiles = function () {
var _a, _b;
return __awaiter(this, void 0, void 0, function () {
var links, filesToDelete;
var _this = this;
return __generator(this, function (_c) {
switch (_c.label) {
case 0: return [4 /*yield*/, this.app.vault.adapter.exists(this.settings.outputFileName + ".md")];
case 1:
if (!(_c.sent())) {
new obsidian.Notice("Can't find file - Please run the `Find orphaned files' command before");
return [2 /*return*/];
}
links = (_b = (_a = this.app.metadataCache.getCache(this.settings.outputFileName + ".md")) === null || _a === void 0 ? void 0 : _a.links) !== null && _b !== void 0 ? _b : [];
filesToDelete = [];
console.log(this.settings.fileTypesToDelete);
links.forEach(function (link) {
var file = _this.app.metadataCache.getFirstLinkpathDest(link.link, "/");
if (!file)
return;
if (_this.settings.fileTypesToDelete[0] == "*" || _this.settings.fileTypesToDelete.contains(file.extension)) {
filesToDelete.push(file);
}
});
if (filesToDelete.length > 0)
new DeleteFilesModal(this.app, filesToDelete).open();
return [2 /*return*/];
}
});
});
};
FindOrphanedFilesPlugin.prototype.findBrokenLinks = function () {
var outFileName = this.settings.unresolvedLinksOutputFileName + ".md";
var links = [];
var brokenLinks = this.app.metadataCache.unresolvedLinks;
for (var filePath in brokenLinks) {
if (filePath == this.settings.unresolvedLinksOutputFileName + ".md")
continue;
var fileType = filePath.substring(filePath.lastIndexOf(".") + 1);
var utils = new Utils(this.app, filePath, this.settings.unresolvedLinksTagsToIgnore, this.settings.unresolvedLinksLinksToIgnore, this.settings.unresolvedLinksDirectoriesToIgnore, this.settings.unresolvedLinksFilesToIgnore);
if (!utils.isValid())
continue;
var _loop_1 = function (link) {
var linkFileType = link.substring(link.lastIndexOf(".") + 1);
console.log(linkFileType);
if (this_1.settings.unresolvedLinksFileTypesToIgnore.contains(linkFileType))
return "continue";
var formattedFilePath = filePath;
if (fileType == "md") {
formattedFilePath = filePath.substring(0, filePath.lastIndexOf(".md"));
}
var brokenLink = { files: [formattedFilePath], link: link };
if (links.contains(brokenLink))
return "continue";
var duplication = links.find(function (e) { return e.link == link; });
if (duplication) {
duplication.files.push(formattedFilePath);
}
else {
links.push(brokenLink);
}
};
var this_1 = this;
for (var link in brokenLinks[filePath]) {
_loop_1(link);
}
}
Utils.writeAndOpenFile(this.app, outFileName, __spreadArrays([
"Don't forget that creating the file from here may create the file in the wrong directory!"
], links.map(function (e) { return "- [[" + e.link + "]] in [[" + e.files.join("]], [[") + "]]"; })).join("\n"), this.settings.openOutputFile);
};
FindOrphanedFilesPlugin.prototype.findFilesWithoutTags = function () {
var _this = this;
var outFileName = this.settings.withoutTagsOutputFileName + ".md";
var outFile;
var files = this.app.vault.getMarkdownFiles();
var withoutFiles = files.filter(function (file) {
var _a;
if (new Utils(_this.app, file.path, [], [], _this.settings.withoutTagsDirectoriesToIgnore, _this.settings.withoutTagsFilesToIgnore, true).isValid()) {
return ((_a = obsidian.getAllTags(_this.app.metadataCache.getFileCache(file)).length) !== null && _a !== void 0 ? _a : 0) <= 0;
}
else {
return false;
}
});
withoutFiles.remove(outFile);
var prefix;
if (this.settings.disableWorkingLinks)
prefix = " ";
else
prefix = "";
var text = withoutFiles.map(function (file) { return prefix + "- [[" + file.path + "]]"; }).join("\n");
Utils.writeAndOpenFile(this.app, outFileName, text, this.settings.openOutputFile);
};
/**
* Checks if the given file in an orphaned file
*
* @param file file to check
* @param links all links in the vault
*/
FindOrphanedFilesPlugin.prototype.isValid = function (file, links, dir) {
if (links.contains(file.path))
return false;
//filetypes to ignore by default
if (file.extension == "css")
return false;
if (this.settings.fileTypesToIgnore[0] !== "") {
var containsFileType = this.settings.fileTypesToIgnore.contains(file.extension);
if (this.settings.ignoreFileTypes) {
if (containsFileType)
return;
}
else {
if (!containsFileType)
return;
}
}
var utils = new Utils(this.app, file.path, this.settings.tagsToIgnore, this.settings.linksToIgnore, this.settings.directoriesToIgnore, this.settings.filesToIgnore, this.settings.ignoreDirectories, dir);
if (!utils.isValid())
return false;
return true;
};
FindOrphanedFilesPlugin.prototype.onunload = function () {
console.log('unloading ' + this.manifest.name + " plugin");
};
FindOrphanedFilesPlugin.prototype.loadSettings = function () {
return __awaiter(this, void 0, void 0, function () {
var _a, _b, _c, _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
_a = this;
_c = (_b = Object).assign;
_d = [DEFAULT_SETTINGS];
return [4 /*yield*/, this.loadData()];
case 1:
_a.settings = _c.apply(_b, _d.concat([_e.sent()]));
return [2 /*return*/];
}
});
});
};
FindOrphanedFilesPlugin.prototype.saveSettings = function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.saveData(this.settings)];
case 1:
_a.sent();
return [2 /*return*/];
}
});
});
};
return FindOrphanedFilesPlugin;
}(obsidian.Plugin));
module.exports = FindOrphanedFilesPlugin;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9kZWxldGVGaWxlc01vZGFsLnRzIiwic3JjL3NldHRpbmdzVGFiLnRzIiwic3JjL3V0aWxzLnRzIiwic3JjL21haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueVxyXG5wdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuXHJcblxyXG5USEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiIEFORCBUSEU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b24oKSB7IHJldHVybiB0aGlzOyB9KSwgZztcclxuICAgIGZ1bmN0aW9uIHZlcmIobikgeyByZXR1cm4gZnVuY3Rpb24gKHYpIHsgcmV0dXJuIHN0ZXAoW24sIHZdKTsgfTsgfVxyXG4gICAgZnVuY3Rpb24gc3RlcChvcCkge1xyXG4gICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKFwiR2VuZXJhdG9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMC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N0b3JpZXMpXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5pZ25vcmVEaXJlY3RvcmllcyA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRGlyZWN0b3JpZXNcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiQWRkIGVhY2ggZGlyZWN0b3J5IHBhdGggaW4gYSBuZXcgbGluZVwiKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKGNiID0+IGNiXG4gICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L1N1YmRpcmVjdG9yeVwiKVxuICAgICAgICAgICAgICAgIC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5kaXJlY3Rvcmllc1RvSWdub3JlLmpvaW4oXCJcXG5cIikpXG4gICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSB2YWx1ZS50cmltKCkuc3BsaXQoXCJcXG5cIikubWFwKHZhbHVlID0+IHRoaXMuZm9ybWF0UGF0aCh2YWx1ZSwgdHJ1ZSkpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5kaXJlY3Rvcmllc1RvSWdub3JlID0gcGF0aHM7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICA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CBgI2ApXCIpXG4gICAgICAgICAgICAuYWRkVGV4dEFyZWEoY2IgPT4gY2JcbiAgICAgICAgICAgICAgICAuc2V0UGxhY2Vob2xkZXIoXCJ0b2RvLHVuZmluaXNoZWRcIilcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MudGFnc1RvSWdub3JlLmpvaW4oXCIsXCIpKVxuICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRhZ3MgPSB2YWx1ZS50cmltKCkuc3BsaXQoXCIsXCIpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy50YWdzVG9JZ25vcmUgPSB0YWdzO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJGaWxldHlwZXMgdG8gZGVsZXRlIHBlciBjb21tYW5kLiBTZWUgUkVBRE1FLlwiKVxuICAgICAgICAgICAgLnNldERlc2MoXCJBZGQgZWFjaCBmaWxldHlwZSBzZXBhcmF0ZWQgYnkgY29tbWEuIFNldCB0byBgKmAgdG8gZGVsZXRlIGFsbCBmaWxlcy5cIilcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYShjYiA9PiBjYlxuICAgICAgICAgICAgICAgIC5zZXRQbGFjZWhvbGRlcihcImpwZyxwbmdcIilcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZmlsZVR5cGVzVG9EZWxldGUuam9pbihcIixcIikpXG4gICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZXh0ZW5zaW9ucyA9I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