Skip to content

Commit d2899c5

Browse files
committed
Merge branch 'develop'
2 parents bca4482 + b3918fb commit d2899c5

File tree

9 files changed

+35
-6
lines changed

9 files changed

+35
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## not released
44

5+
## v1.2.2 (2025-04-27)
6+
7+
- Fix: Placeholder for the error message `notebookNotExist` was output instead of the translation string
8+
- Add: Option to import from SUbfolders
9+
510
## v1.2.1 (2024-11-26)
611

712
- Fix: Don't add empty tag when tag ends with `,` or contains several `,` directly behind each other #37

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "joplin-plugin-hotfolder",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"scripts": {
55
"dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
66
"prepare": "npm run test && npm run dist && husky install",

src/hotfolder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class Hotfolder {
240240
this.log.error("Notebook: " + importNotebook + " dose not exist");
241241
await this.showMsg(
242242
i18n.__(
243-
"error.notebookNotExist",
243+
"msg.error.notebookNotExist",
244244
importNotebook.trim(),
245245
hotfolderNr == 0 ? "" : hotfolderNr + 1
246246
)
@@ -254,7 +254,7 @@ class Hotfolder {
254254
const watcher = chokidar.watch(hotfolderPath, {
255255
persistent: true,
256256
alwaysStat: true,
257-
depth: 0,
257+
depth: hotfolderSettings.depth,
258258
usePolling: hotfolderSettings.usePolling,
259259
interval: hotfolderSettings.pollingIntervall,
260260
binaryInterval: hotfolderSettings.pollingIntervall * 2,

src/locales/de_DE.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
"pollingIntervall": {
4444
"label": "Abfrage intervall",
4545
"description": "Intervall in millisekunden zur Abfrage des Hotfolders"
46+
},
47+
"depth": {
48+
"label": "Depth",
49+
"description": "Wie viel Unterordner sollen für den datei Import geprüft werden"
4650
}
4751
},
4852
"msg": {

src/locales/en_US.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
"pollingIntervall": {
4444
"label": "Polling intervall",
4545
"description": "Interval in milliseconds for querying the hotfolder"
46+
},
47+
"depth": {
48+
"label": "Depth",
49+
"description": "How many subdirectories will be checked for file import"
4650
}
4751
},
4852
"msg": {

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 1,
33
"id": "io.github.jackgruber.hotfolder",
44
"app_min_version": "1.8.1",
5-
"version": "1.2.1",
5+
"version": "1.2.2",
66
"name": "Hotfolder",
77
"description": "Monitors a locale folder and import the files as a new note.",
88
"author": "JackGruber",

src/settings.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ export namespace settings {
127127
description: i18n.__("settings.pollingIntervall.description"),
128128
};
129129

130+
settingsObject["depth" + (hotfolderNr == 0 ? "" : hotfolderNr)] = {
131+
value: 0,
132+
minimum: 0,
133+
maximum: 10,
134+
type: SettingItemType.Int,
135+
section: "hotfolderSection" + (hotfolderNr == 0 ? "" : hotfolderNr),
136+
public: true,
137+
advanced: true,
138+
label: i18n.__("settings.depth.label"),
139+
description: i18n.__("settings.depth.description"),
140+
};
141+
130142
if (hotfolderNr === 0) {
131143
await joplin.settings.registerSettings({
132144
hotfolderAnz: {
@@ -217,6 +229,8 @@ export namespace settings {
217229
"pollingIntervall" + hotfolderNrStr
218230
);
219231

232+
const depth = await joplin.settings.value("depth" + hotfolderNrStr);
233+
220234
return {
221235
notebookId: notebookId,
222236
importTags: importTags,
@@ -227,6 +241,7 @@ export namespace settings {
227241
usePolling: usePolling,
228242
pollingIntervall: pollingIntervall,
229243
intervallFileFinished: intervallFileFinished,
244+
depth: depth,
230245
};
231246
}
232247
}

src/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ interface hotfolderSettings {
1414
intervallFileFinished: number;
1515
usePolling: boolean;
1616
pollingIntervall: number;
17+
depth: number;
1718
}
1819

1920
export { processFile, hotfolderSettings };

0 commit comments

Comments
 (0)