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.
707 lines
118 KiB
707 lines
118 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;
|
|
}
|
|
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 find unlinked files" });
|
|
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("Ignore or include files in the given directories")
|
|
.setDesc("Enable to ignore files in the given directories. Disable to only include files in the given filetypes")
|
|
.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("Files to ignore.")
|
|
.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("Links to ignore.")
|
|
.setDesc("Ignore files, which contain the given file as link. Add each file path in a new line (with file extension!). Set it to `*` to ignore 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("Ignore or include files with the given filetypes")
|
|
.setDesc("Enable to ignore 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("Tags to ignore.")
|
|
.setDesc("Ignore 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. ")
|
|
.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 unresolvedLinks
|
|
containerEl.createEl("h4", { text: "Settings for find unresolved 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("Directories to ignore.")
|
|
.setDesc("Ignore 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("Files to ignore.")
|
|
.setDesc("Ignore 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("Links to ignore.")
|
|
.setDesc("Ignore files, which contain the given file as link. Add each file path in a new line (with file extension!). Set it to `*` to ignore 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("Filetypes to ignore.")
|
|
.setDesc("Ignore 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("Tags to ignore.")
|
|
.setDesc("Ignore 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 find 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("Files to ignore.")
|
|
.setDesc("Ignore 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("Directories to ignore.")
|
|
.setDesc("Ignore 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 unlinked files` and `Find unresolved links`
|
|
* @param app
|
|
* @param filePath
|
|
* @param tagsToIgnore
|
|
* @param linksToIgnore
|
|
* @param directoriesToIgnore
|
|
* @param filesToIgnore
|
|
* @param ignoreDirectories
|
|
*/
|
|
function Utils(app, filePath, tagsToIgnore, linksToIgnore, directoriesToIgnore, filesToIgnore, ignoreDirectories) {
|
|
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.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;
|
|
var contains = this.directoriesToIgnore.find(function (value) { return _this.filePath.startsWith(value) && value.length != 0; }) !== 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) {
|
|
return __awaiter(this, void 0, void 0, function () {
|
|
var fileIsAlreadyOpened;
|
|
return __generator(this, function (_a) {
|
|
switch (_a.label) {
|
|
case 0: return [4 /*yield*/, app.vault.adapter.write(outputFileName, text)];
|
|
case 1:
|
|
_a.sent();
|
|
fileIsAlreadyOpened = false;
|
|
app.workspace.iterateAllLeaves(function (leaf) {
|
|
if (leaf.getDisplayText() != "" && outputFileName.startsWith(leaf.getDisplayText())) {
|
|
fileIsAlreadyOpened = true;
|
|
}
|
|
});
|
|
if (!fileIsAlreadyOpened)
|
|
app.workspace.openLinkText(outputFileName, "/", true);
|
|
return [2 /*return*/];
|
|
}
|
|
});
|
|
});
|
|
};
|
|
return Utils;
|
|
}());
|
|
|
|
var DEFAULT_SETTINGS = {
|
|
outputFileName: "unlinked files output",
|
|
disableWorkingLinks: false,
|
|
directoriesToIgnore: [],
|
|
filesToIgnore: [],
|
|
fileTypesToIgnore: [],
|
|
linksToIgnore: [],
|
|
tagsToIgnore: [],
|
|
fileTypesToDelete: [],
|
|
ignoreFileTypes: true,
|
|
ignoreDirectories: true,
|
|
unresolvedLinksOutputFileName: "unresolved links output",
|
|
unresolvedLinksDirectoriesToIgnore: [],
|
|
unresolvedLinksFilesToIgnore: [],
|
|
unresolvedLinksFileTypesToIgnore: [],
|
|
unresolvedLinksLinksToIgnore: [],
|
|
unresolvedLinksTagsToIgnore: [],
|
|
withoutTagsDirectoriesToIgnore: [],
|
|
withoutTagsFilesToIgnore: [],
|
|
withoutTagsOutputFileName: "files without tags"
|
|
};
|
|
var FindUnlinkedFilesPlugin = /** @class */ (function (_super) {
|
|
__extends(FindUnlinkedFilesPlugin, _super);
|
|
function FindUnlinkedFilesPlugin() {
|
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
}
|
|
FindUnlinkedFilesPlugin.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 unlinked files',
|
|
callback: function () { return _this.findUnlinkedFiles(); },
|
|
});
|
|
this.addCommand({
|
|
id: 'find-unresolved-link',
|
|
name: 'Find unresolved links',
|
|
callback: function () { return _this.findUnresolvedLinks(); },
|
|
});
|
|
this.addCommand({
|
|
id: "delete-unlinked-files",
|
|
name: "Delete unlinked files with certain extension. See README",
|
|
callback: function () { return _this.deleteUnlinkedFiles(); }
|
|
});
|
|
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));
|
|
return [2 /*return*/];
|
|
}
|
|
});
|
|
});
|
|
};
|
|
FindUnlinkedFilesPlugin.prototype.findUnlinkedFiles = function () {
|
|
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); });
|
|
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, "/") + "]]\n";
|
|
});
|
|
Utils.writeAndOpenFile(this.app, outFileName, text);
|
|
};
|
|
FindUnlinkedFilesPlugin.prototype.deleteUnlinkedFiles = 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 unlinked 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 = [];
|
|
links.forEach(function (link) {
|
|
var file = _this.app.metadataCache.getFirstLinkpathDest(link.link, "/");
|
|
if (!file)
|
|
return;
|
|
if (_this.settings.fileTypesToDelete.contains(file.extension)) {
|
|
filesToDelete.push(file);
|
|
}
|
|
});
|
|
if (filesToDelete.length > 0)
|
|
new DeleteFilesModal(this.app, filesToDelete).open();
|
|
return [2 /*return*/];
|
|
}
|
|
});
|
|
});
|
|
};
|
|
FindUnlinkedFilesPlugin.prototype.findUnresolvedLinks = function () {
|
|
var outFileName = this.settings.unresolvedLinksOutputFileName + ".md";
|
|
var links = [];
|
|
var unresolvedLinks = this.app.metadataCache.unresolvedLinks;
|
|
for (var filePath in unresolvedLinks) {
|
|
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 unresolvedLink = { files: [formattedFilePath], link: link };
|
|
if (links.contains(unresolvedLink))
|
|
return "continue";
|
|
var duplication = links.find(function (e) { return e.link == link; });
|
|
if (duplication) {
|
|
duplication.files.push(formattedFilePath);
|
|
}
|
|
else {
|
|
links.push(unresolvedLink);
|
|
}
|
|
};
|
|
var this_1 = this;
|
|
for (var link in unresolvedLinks[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"));
|
|
};
|
|
FindUnlinkedFilesPlugin.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, _b;
|
|
if (new Utils(_this.app, file.path, [], [], _this.settings.withoutTagsDirectoriesToIgnore, _this.settings.withoutTagsFilesToIgnore, true).isValid()) {
|
|
return ((_b = (_a = _this.app.metadataCache.getFileCache(file).tags) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 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);
|
|
};
|
|
/**
|
|
* Checks if the given file in an unlinked file
|
|
*
|
|
* @param file file to check
|
|
* @param links all links in the vault
|
|
*/
|
|
FindUnlinkedFilesPlugin.prototype.isValid = function (file, links) {
|
|
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);
|
|
if (!utils.isValid())
|
|
return false;
|
|
return true;
|
|
};
|
|
FindUnlinkedFilesPlugin.prototype.onunload = function () {
|
|
console.log('unloading ' + this.manifest.name + " plugin");
|
|
};
|
|
FindUnlinkedFilesPlugin.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*/];
|
|
}
|
|
});
|
|
});
|
|
};
|
|
FindUnlinkedFilesPlugin.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 FindUnlinkedFilesPlugin;
|
|
}(obsidian.Plugin));
|
|
|
|
module.exports = FindUnlinkedFilesPlugin;
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9kZWxldGVGaWxlc01vZGFsLnRzIiwic3JjL3NldHRpbmdzVGFiLnRzIiwic3JjL3V0aWxzLnRzIiwic3JjL21haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyohICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbkNvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLlxyXG5cclxuUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55XHJcbnB1cnBvc2Ugd2l0aCBvciB3aXRob3V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gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdDtcclxuICAgIH1cclxuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19yZXN0KHMsIGUpIHtcclxuICAgIHZhciB0ID0ge307XHJcbiAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkgJiYgZS5pbmRleE9mKHApIDwgMClcclxuICAgICAgICB0W3BdID0gc1twXTtcclxuICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT09IFwiZnVuY3Rpb25cIilcclxuICAgICAgICBmb3IgKHZhciBpID0gMCwgcCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMocyk7IGkgPCBwLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChlLmluZGV4T2YocFtpXSkgPCAwICYmIE9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChzLCBwW2ldKSlcclxuICAgICAgICAgICAgICAgIHRbcFtpXV0gPSBzW3BbaV1dO1xyXG4gICAgICAgIH1cclxuICAgIHJldHVybiB0O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19kZWNvcmF0ZShkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykge1xyXG4gICAgdmFyIGMgPSBhcmd1bWVudHMubGVuZ3RoLCByID0gYyA8IDMgPyB0YXJnZXQgOiBkZXNjID09PSBudWxsID8gZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IodGFyZ2V0LCBrZXkpIDogZGVzYywgZDtcclxuICAgIGlmICh0eXBlb2YgUmVmbGVjdCA9PT0gXCJvYmplY3RcIiAmJiB0eXBlb2YgUm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XVsdDpcclxuICAgICAgICAgICAgICAgICAgICBpZiAoISh0ID0gXy50cnlzLCB0ID0gdC5sZW5ndGggPiAwICYmIHRbdC5sZW5ndGggLSAxXSkgJiYgKG9wWzBdID09PSA2IHx8IG9wWzBdID09PSAyKSkgeyBfID0gMDsgY29udGludWU7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDMgJiYgKCF0IHx8IChvcFsxXSA+IHRbMF0gJiYgb3BbMV0gPCB0WzNdKSkpIHsgXy5sYWJlbCA9IG9wWzFdOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gNiAmJiBfLmxhYmVsIDwgdFsxXSkgeyBfLmxhYmVsID0gdFsxXTsgdCA9IG9wOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0ICYmIF8ubGFiZWwgPCB0WzJdKSB7IF8ubGFiZWwgPSB0WzJdOyBfLm9wcy5wdXNoKG9wKTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodFsyXSkgXy5vcHMucG9wKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBvcCA9IGJvZHkuY2FsbCh0aGlzQXJnLCBfKTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7IG9wID0gWzYsIGVdOyB5ID0gMDsgfSBmaW5hbGx5IHsgZiA9IHQgPSAwOyB9XHJcbiAgICAgICAgaWYgKG9wWzBdICYgNSkgdGhyb3cgb3BbMV07IHJldHVybiB7IHZhbHVlOiBvcFswXSA/IG9wWzFdIDogdm9pZCAwLCBkb25lOiB0cnVlIH07XHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCB2YXIgX19jcmVhdGVCaW5kaW5nID0gT2JqZWN0LmNyZWF0ZSA/IChmdW5jdGlvbihvLCBtLCBrLCBrMikge1xyXG4gICAgaW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nNldHRpbmdzLnRhZ3NUb0lnbm9yZS5qb2luKFwiLFwiKSlcbiAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0YWdzID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudGFnc1RvSWdub3JlID0gdGFncztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRmlsZXR5cGVzIHRvIGRlbGV0ZSBwZXIgY29tbWFuZC4gU2VlIFJFQURNRS5cIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiQWRkIGVhY2ggZmlsZXR5cGUgc2VwYXJhdGVkIGJ5IGNvbW1hLiBcIilcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYShjYiA9PiBjYlxuICAgICAgICAgICAgICAgIC5zZXRQbGFjZWhvbGRlcihcImpwZyxwbmdcIilcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZmlsZVR5cGVzVG9EZWxldGUuam9pbihcIixcIikpXG4gICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZXh0ZW5zaW9ucyA9IHZhbHVlLnRyaW0oKS5zcGxpdChcIixcIik7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZpbGVUeXBlc1RvRGVsZXRlID0gZXh0ZW5zaW9ucztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgfSkpO1xu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yZS5qb2luKFwiLFwiKSlcbiAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBleHRlbnNpb25zID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzRmlsZVR5cGVzVG9JZ25vcmUgPSBleHRlbnNpb25zO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJUYWdzIHRvIGlnbm9yZS5cIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiSWdub3JlIGxpbmtzIGluIGZpbGVzLCB3aGljaCBjb250YWluIHRoZSBnaXZlbiB0YWcuIEFkZCBlYWNoIHRhZyBzZXBhcmF0ZWQgYnkgY29tbWEgKHdpdGhvdXQgYCNgKVwiKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKGNiID0+IGNiXG4gICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwidG9kbyx1bmZpbmlzaGVkXCIpXG4gICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc1RhZ3NUb0lnbm9yZS5qb2luKFwiLFwiKSlcbiAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0YWdzID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzVGFnc1RvSWdub3JlID0gdGFncztcbiAgICAgICAgICAgIC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