Skip to content

Commit

Permalink
version 1.1.2 additions
Browse files Browse the repository at this point in the history
  • Loading branch information
djsudduth committed Apr 20, 2024
1 parent 8bcc3b0 commit 8bafa91
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Changelog

## not released
## v1.1.2 (2024-04-19)

## v1.1.0 (2024-03-09)
- Changed extractor dialog label from 'name' to 'keyword'
- Added option for combined, extracted paragraphs to title note with the tag keyword - similar to Logseq block linked references

## v1.1.0/1.1.1 (2024-03-09)

- v1.1.1 no code change - just a redeployment fix
- Added a dialog box to set the extraction keyword and tag
- Added selection to extract at the folder level vs selecting individual notes

Expand Down
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-paragraph-extractor",
"version": "1.1.0",
"version": "1.1.2",
"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/extractParagraphs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace extractParagraphs {
prefix +
`"/>
<br/>
Name:<br/><input type="text" name="keyword" value="` +
Keyword:<br/><input type="text" name="keyword" value="` +
tname +
`"/>
<br/>
Expand Down Expand Up @@ -82,7 +82,12 @@ namespace extractParagraphs {

export async function extract() {
// Paragraph extraction dialog

const dialogs = joplin.views.dialogs;
const tN = await joplin.settings.value("tagName");
const tP = await joplin.settings.value("tagPrefix");
await extractParagraphs.setform(tP, tN);

const extract = await dialogs.open(phandle);
if (extract.id === "cancel") {
return;
Expand Down Expand Up @@ -304,6 +309,7 @@ namespace extractParagraphs {
newTitle = titles[titles.length - 1];
} else if (titleOption == "custom") {
newTitle = await joplin.settings.value("combinedNoteTitleCustom");
newTitle = newTitle.replace("{{TAGKEYWORD}}", tagName);
newTitle = newTitle.replace("{{FIRSTTITLE}}", titles[0]);
newTitle = newTitle.replace("{{LASTTITLE}}", titles[titles.length - 1]);
newTitle = newTitle.replace("{{ALLTITLE}}", titles.join(", "));
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 @@ -7,6 +7,8 @@
"settings.ignoreCaseDescription": "Alle Notizen werden nach dem Schlüsselwort in beliebiger Kombination aus Groß- und Kleinschreibung durchsucht",
"settings.includeHeaders": "Fügen Sie die Überschrift des extrahierten Absatzes ein",
"settings.includeHeadersDescription": "Der H1-, H2- usw. Header ist in der zugrunde liegenden Extraktion enthalten (wenn ein Schlüsselwort im Header enthalten ist, wird es ignoriert).",
"settings.includeTaggedNotes": "Fügen Sie den gesamten Text aus Notizen mit dem Tag „Schlüsselwort“ ein",
"settings.includeTaggedNotesDescription": "Alle Notizinhalte, die über ein Joplin-Tag verfügen, das mit dem Schlüsselwort übereinstimmt, werden extrahiert",
"settings.tagName": "Standard- oder zuletzt verwendetes Absatz-Tag oder Schlüsselwort",
"settings.tagNameDescription": "Standardmäßiger oder zuletzt verwendeter Schlüsselwort- oder Hashtag-Text (ohne Präfix), der in den Absätzen verwendet wird.",
"settings.tagPrefix": "Standard- oder zuletzt verwendetes Tag-Präfixzeichen",
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 @@ -7,6 +7,8 @@
"settings.ignoreCaseDescription": "All notes will be searched for the keyword in any upper or lower case mix",
"settings.includeHeaders": "Include the header of the paragraph extracted",
"settings.includeHeadersDescription": "The H1, H2, etc header will be included with the underlying extraction (if keyword included in header, this is ignored)",
"settings.includeTaggedNotes": "Include all text from notes with tag keyword",
"settings.includeTaggedNotesDescription": "All note content that has a Joplin tag that matches the keyword will be extracted",
"settings.tagName": "Default or Last Used Paragraph Tag or Keyword",
"settings.tagNameDescription": "Default or last used keyword or hashtag text (without prefix) used within the paragraphs.",
"settings.tagPrefix": "Default or Last Used Tag Prefix Character",
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 1,
"id": "io.github.djsudduth.paragraph-extractor",
"app_min_version": "1.8.1",
"version": "1.0.0",
"version": "1.1.2",
"name": "Paragraph Extractor",
"description": "Extract specific paragraphs out of Joplin notes using keywords, hashtags or custom tags",
"author": "djsudduth",
Expand Down
2 changes: 1 addition & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export namespace settings {
label: i18n.__("settings.combinedNoteTitleCustom"),
description: i18n.__(
"settings.combinedNoteTitleCustomDescription",
"{{FIRSTTITLE}}, {{LASTTITLE}}, {{ALLTITLE}}, {{DATE}}"
"{{TAGKEYWORD}}, {{FIRSTTITLE}}, {{LASTTITLE}}, {{ALLTITLE}}, {{DATE}}"
),
},
});
Expand Down

0 comments on commit 8bafa91

Please sign in to comment.