Skip to content

Commit 87c47c4

Browse files
committed
Add sub-wiki routing for external attachments
Introduces sub-wiki routing support for external attachments, allowing imported files to be automatically routed to the correct sub-wiki's files folder based on tiddler tags. Extracts routing logic into a reusable utility, updates type definitions, and adds a new handleSavingTiddler hook to move files when tags change. Updates documentation and configuration handling to reflect new features.
1 parent 50df7c9 commit 87c47c4

13 files changed

Lines changed: 452 additions & 94 deletions

pnpm-lock.yaml

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

src/tidgi-external-attachments/changelog.tid

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ title: $:/plugins/linonetwo/tidgi-external-attachments/changelog
22

33
! Changelog
44

5+
!! Version 1.8.0
6+
7+
* ''Feature'': Sub-wiki routing support
8+
** Imported files now automatically route to the correct sub-wiki's files folder based on tiddler tags
9+
** Uses the same routing logic as TidGi's FileSystemAdaptor
10+
** Supports direct tag matching, tag tree matching (includeTagTree), and custom filter expressions
11+
** Files are moved to the matched sub-wiki's configured files folder (based on WIKI_FOLDER_TO_MOVE_TITLE)
12+
* ''Improvement'': Extracted sub-wiki routing logic into reusable utility module
13+
* ''Enhancement'': Updated type definitions to support workspace service methods
14+
515
!! Version 1.7.0
616

717
* ''Breaking Change'': Requires TidGi-Desktop version 0.13.0 or higher
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Shared configuration constants for external attachments plugin
3+
*/
4+
5+
export const ENABLE_EXTERNAL_ATTACHMENTS_TITLE = '$:/config/ExternalAttachments/Enable';
6+
export const ENABLE_FOR_IMAGE_TITLE = '$:/config/ExternalAttachments/EnableForImage';
7+
export const USE_ABSOLUTE_FOR_DESCENDENTS_TITLE = '$:/config/ExternalAttachments/UseAbsoluteForDescendents';
8+
export const USE_ABSOLUTE_FOR_NON_DESCENDENTS_TITLE = '$:/config/ExternalAttachments/UseAbsoluteForNonDescendents';
9+
export const MOVE_TO_WIKI_FOLDER_TITLE = '$:/config/ExternalAttachments/MoveToWikiFolder';
10+
export const WIKI_FOLDER_TO_MOVE_TITLE = '$:/config/ExternalAttachments/WikiFolderToMove';
11+
export const MOVE_TO_TRASH_TITLE = '$:/config/ExternalAttachments/MoveToTrash';

0 commit comments

Comments
 (0)