From cf359cc3bc88d9b2a9dd3fe498537c43f7373928 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 10 Nov 2023 10:53:00 +0800 Subject: [PATCH] feat: use id as filename (#154) * feat: use id as filename * add id to the settings description --- src/main.ts | 2 +- src/settings/template.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index eff9c9a..e7f01c6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -672,7 +672,7 @@ class OmnivoreSettingTab extends PluginSettingTab { new Setting(containerEl) .setName("Filename") .setDesc( - "Enter the filename where the data will be stored. {{{title}}}, {{{dateSaved}}} and {{{datePublished}}} could be used in the filename" + "Enter the filename where the data will be stored. {{id}}, {{{title}}}, {{{dateSaved}}} and {{{datePublished}}} could be used in the filename" ) .addText((text) => text diff --git a/src/settings/template.ts b/src/settings/template.ts index c49b87b..0e73038 100644 --- a/src/settings/template.ts +++ b/src/settings/template.ts @@ -153,6 +153,7 @@ export const renderFilename = ( date, dateSaved: date, datePublished, + id: article.id, }); // truncate the filename to 100 characters