Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackGruber committed Nov 19, 2023
2 parents d3965c8 + 22f34ed commit 046e228
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 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)

- Add: Translation to German
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ 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).
- `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

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 7 additions & 1 deletion src/combineNote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/locales/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "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",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 4 additions & 9 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {}
}
}
10 changes: 10 additions & 0 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -104,6 +113,7 @@ export namespace settings {
custom: i18n.__("settings.combinedNoteTitleValueCustom"),
},
},

combinedNoteTitleCustom: {
value: "",
type: SettingItemType.String,
Expand Down

0 comments on commit 046e228

Please sign in to comment.