From 23d1265fc71054ca01e877c1aa5f7387d9909a76 Mon Sep 17 00:00:00 2001 From: Don Sudduth Date: Fri, 17 Nov 2023 15:20:59 -0600 Subject: [PATCH 1/6] Added option to remove note titles --- src/combineNote.ts | 8 +++++++- src/locales/de_DE.json | 2 ++ src/locales/en_US.json | 2 ++ src/settings.ts | 9 +++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/combineNote.ts b/src/combineNote.ts index 7fe581d..ae874a4 100644 --- a/src/combineNote.ts +++ b/src/combineNote.ts @@ -60,6 +60,10 @@ namespace combineNote { const preserveMetadataSuffix = await joplin.settings.value( "preserveMetadataSuffix" ); + const preserveSourceNoteTitles = await joplin.settings.value( + "preserveSourceNoteTitles" + ); + const addCombineDate = await joplin.settings.value("addCombineDate"); const dateFormat = await joplin.settings.globalValue("dateFormat"); const timeFormat = await joplin.settings.globalValue("timeFormat"); @@ -86,7 +90,9 @@ namespace combineNote { "altitude", ], }); - newNoteBody.push("# " + note.title + "\n"); + if (preserveSourceNoteTitles === true) { + newNoteBody.push("# " + note.title + "\n"); + } titles.push(note.title); // Preserve metadata diff --git a/src/locales/de_DE.json b/src/locales/de_DE.json index a160736..37186bd 100644 --- a/src/locales/de_DE.json +++ b/src/locales/de_DE.json @@ -15,6 +15,8 @@ "settings.preserveMetadataPrefixDescription": "Präfix für den Abschnitt Metadaten.", "settings.preserveMetadataSuffix": "Metadata-Suffix", "settings.preserveMetadataSuffixDescription": "Suffix für den Abschnitt Metadaten.", + "settings.preserveSourceNoteTitles": "Behalten sie die titel der Quellnotizen bei", + "settings.preserveSourceNoteTitlesDescription": "Behält die titel ausgewählter Notizen im kombinierten Notiztext bei", "settings.combinedNoteTitle": "Titel der Kombinierten Notiz", "settings.combinedNoteTitleValueDefault": "Kombinierte Notiz", "settings.combinedNoteTitleValueCombined": "Kombination aus allen Notiztitel", diff --git a/src/locales/en_US.json b/src/locales/en_US.json index caf3d67..cb6371a 100644 --- a/src/locales/en_US.json +++ b/src/locales/en_US.json @@ -15,6 +15,8 @@ "settings.preserveMetadataPrefixDescription": "Prefix for the Metadata section.", "settings.preserveMetadataSuffix": "Metadata Suffix", "settings.preserveMetadataSuffixDescription": "Suffix for the Metadata section.", + "settings.preserveSourceNoteTitles": "Preserve source note titles", + "settings.preserveSourceNoteTitlesDescription": "Preserves titles of selected notes within the combined note body", "settings.combinedNoteTitle": "Title of the combined note", "settings.combinedNoteTitleValueDefault": "Combined note", "settings.combinedNoteTitleValueCombined": "Combination of all note titles", diff --git a/src/settings.ts b/src/settings.ts index 542c310..cdd721c 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -89,6 +89,15 @@ export namespace settings { description: i18n.__("settings.preserveMetadataSuffixDescription"), }, + preserveSourceNoteTitles: { + value: true, + type: SettingItemType.Bool, + section: "combineNoteSection", + public: true, + label: i18n.__("settings.preserveSourceNoteTitles"), + description: i18n.__("settings.preserveSourceNoteTitlesDescription"), + }, + combinedNoteTitle: { value: "default", type: SettingItemType.String, From ef714b12c51f46c11e8a6ca5782fc78ff78a2e49 Mon Sep 17 00:00:00 2001 From: Don Sudduth Date: Fri, 17 Nov 2023 15:24:53 -0600 Subject: [PATCH 2/6] Added README info on option to remove note titles --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea5b216..1dea8ee 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,9 @@ Go to `Tools > Options > Combine notes` - `Preserve Location`: The Location (Latitude, Longitude, Altitude) will be added to the new note. Default `false` - `Metadata Prefix`: The entered text is output before the metadata (URL, Date, Location). - `Metadata Suffix`: The entered text is output after the metadata (URL, Date, Location). +- `Preserve Source Note Titles`: Titles of source notes will be embedded in new note. Default `true`. - `Title of the combined note`: New title of the combined note. Default `Combined note`. -- `Custom note title`: New note title with possible variables `{{FIRSTTITLE}}`, `{{LASTTITLE}}`, `{{ALLTITLE}}` and `{{DATE}}`. +- `Custom note title`: New note title with possible variables `{{FIRSTTITLE}}`, `{{LASTTITLE}}`, `{{ALLTITLE}}` and `{{DATE}}`. ## Keyboard Shortcuts From 5c04a6c361f81a7677dd6ebfca842de66d8407c5 Mon Sep 17 00:00:00 2001 From: JackGruber <24863925+JackGruber@users.noreply.github.com> Date: Sun, 19 Nov 2023 11:17:59 +0100 Subject: [PATCH 3/6] Move to top --- README.md | 2 +- src/settings.ts | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1dea8ee..6a99fc4 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,13 @@ Go to `Tools > Options > Combine notes` - `Create combined note as to-do`: New note is created as To-Do. Default `false` - `Delete combined notes`: Delete combined notes, after note creation. Default `false` +- `Preserve Source Note Titles`: Titles of source notes will be embedded in new note. Default `true`. - `Preserve Source URL`: The source URL will be added to the new note. Default `false` - `Preserve Created Date`: The Created Date will be added to the new note. Default `false` - `Preserve Updated Date`: The Updated Date will be added to the new note. Default `false` - `Preserve Location`: The Location (Latitude, Longitude, Altitude) will be added to the new note. Default `false` - `Metadata Prefix`: The entered text is output before the metadata (URL, Date, Location). - `Metadata Suffix`: The entered text is output after the metadata (URL, Date, Location). -- `Preserve Source Note Titles`: Titles of source notes will be embedded in new note. Default `true`. - `Title of the combined note`: New title of the combined note. Default `Combined note`. - `Custom note title`: New note title with possible variables `{{FIRSTTITLE}}`, `{{LASTTITLE}}`, `{{ALLTITLE}}` and `{{DATE}}`. diff --git a/src/settings.ts b/src/settings.ts index cdd721c..f48b6c3 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -26,6 +26,15 @@ export namespace settings { label: i18n.__("settings.deleteCombinedNotes"), }, + preserveSourceNoteTitles: { + value: true, + type: SettingItemType.Bool, + section: "combineNoteSection", + public: true, + label: i18n.__("settings.preserveSourceNoteTitles"), + description: i18n.__("settings.preserveSourceNoteTitlesDescription"), + }, + preserveMetadataSourceUrl: { value: false, type: SettingItemType.Bool, @@ -89,15 +98,6 @@ export namespace settings { description: i18n.__("settings.preserveMetadataSuffixDescription"), }, - preserveSourceNoteTitles: { - value: true, - type: SettingItemType.Bool, - section: "combineNoteSection", - public: true, - label: i18n.__("settings.preserveSourceNoteTitles"), - description: i18n.__("settings.preserveSourceNoteTitlesDescription"), - }, - combinedNoteTitle: { value: "default", type: SettingItemType.String, @@ -113,6 +113,7 @@ export namespace settings { custom: i18n.__("settings.combinedNoteTitleValueCustom"), }, }, + combinedNoteTitleCustom: { value: "", type: SettingItemType.String, From b89a01a679dbda2fb81240c6d5fec1d570112103 Mon Sep 17 00:00:00 2001 From: JackGruber <24863925+JackGruber@users.noreply.github.com> Date: Sun, 19 Nov 2023 11:18:46 +0100 Subject: [PATCH 4/6] Change translation --- src/locales/de_DE.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/de_DE.json b/src/locales/de_DE.json index 37186bd..6639738 100644 --- a/src/locales/de_DE.json +++ b/src/locales/de_DE.json @@ -15,8 +15,8 @@ "settings.preserveMetadataPrefixDescription": "Präfix für den Abschnitt Metadaten.", "settings.preserveMetadataSuffix": "Metadata-Suffix", "settings.preserveMetadataSuffixDescription": "Suffix für den Abschnitt Metadaten.", - "settings.preserveSourceNoteTitles": "Behalten sie die titel der Quellnotizen bei", - "settings.preserveSourceNoteTitlesDescription": "Behält die titel ausgewählter Notizen im kombinierten Notiztext bei", + "settings.preserveSourceNoteTitles": "Titel der Quellnotizen beibehalten", + "settings.preserveSourceNoteTitlesDescription": "Behält die Titel der Orginal Notizen bei, indem diese im Notiztext eingefügt werden.", "settings.combinedNoteTitle": "Titel der Kombinierten Notiz", "settings.combinedNoteTitleValueDefault": "Kombinierte Notiz", "settings.combinedNoteTitleValueCombined": "Kombination aus allen Notiztitel", From a6c1e3508575a9c6037313e770067d11fde13f8d Mon Sep 17 00:00:00 2001 From: JackGruber <24863925+JackGruber@users.noreply.github.com> Date: Sun, 19 Nov 2023 11:19:22 +0100 Subject: [PATCH 5/6] Add changelog info --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 949a3d4..1f4154f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## not released +- Add: Option to preserve source note title in the combined note text + ## v1.2.0 (2023-11-14) - Add: Translation to German From 22f34ed89cfd150350c730f0e39fec8546b58000 Mon Sep 17 00:00:00 2001 From: JackGruber <24863925+JackGruber@users.noreply.github.com> Date: Sun, 19 Nov 2023 11:23:12 +0100 Subject: [PATCH 6/6] bump version 1.2.1 --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- src/manifest.json | 13 ++++--------- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f4154f..466a784 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## not released +## v1.2.1 (2023-11-19) + - Add: Option to preserve source note title in the combined note text ## v1.2.0 (2023-11-14) diff --git a/package-lock.json b/package-lock.json index 49452a6..6dbfd0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "joplin-plugin-combine-notes", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "joplin-plugin-combine-notes", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "dependencies": { "i18n": "^0.15.1", diff --git a/package.json b/package.json index e64be21..c41d66f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "joplin-plugin-combine-notes", - "version": "1.2.0", + "version": "1.2.1", "scripts": { "prepare": "npm run dist && husky install", "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive", diff --git a/src/manifest.json b/src/manifest.json index 87715ee..9ff3485 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,19 +2,14 @@ "manifest_version": 1, "id": "io.github.jackgruber.combine-notes", "app_min_version": "1.8.1", - "version": "1.2.0", + "version": "1.2.1", "name": "Combine notes", "description": "Combine one or more notes", "author": "JackGruber", "homepage_url": "https://github.com/JackGruber/joplin-plugin-combine-notes", "repository_url": "https://github.com/JackGruber/joplin-plugin-combine-notes", - "keywords": [ - "combine", - "merge" - ], - "categories": [ - "productivity" - ], + "keywords": ["combine", "merge"], + "categories": ["productivity"], "screenshots": [], "icons": {} -} \ No newline at end of file +}