Skip to content

Commit

Permalink
feat: support slash folder
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Nov 14, 2024
1 parent 8ab0d18 commit e95cdab
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/inverse-link-and-folder/configs/config.tid
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ caption: <<lingo Name $:/plugins/linonetwo/inverse-link-and-folder/language/>>
;<<lingo Configs/default-show/Caption>>
:<$checkbox tiddler="$:/plugins/linonetwo/inverse-link-and-folder/configs/default-show" field="text" checked="yes" unchecked=""> <<lingo Configs/default-show/Description>></$checkbox>

!!! <<lingo "FolderTid">>
!!! <<lingo "TagFolderTid">>

;<<lingo Configs/folder-exclude-filter/Caption>>
:<$edit-text tiddler="$:/plugins/linonetwo/inverse-link-and-folder/configs/folder-exclude-filter" tabindex=-1 focus=false cancelPopups="yes" fileDrop=no tag="input" /> <<lingo Configs/folder-exclude-filter/Description>>
Expand Down
12 changes: 8 additions & 4 deletions src/inverse-link-and-folder/info-area.tid
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ title: $:/plugins/linonetwo/inverse-link-and-folder/info-area
<<inverse-link-and-folder-card "[all[current]backlinks[]!is[system]]" "LinkIn">>

<%if [all[current]!subfilter<notShowFolderUnder>] %>
<<inverse-link-and-folder-card "[all[current]tagging[]!subfilter<folderExcludeFilter>sort[title]]" "FolderTid">>
<<inverse-link-and-folder-card "[all[current]tagging[]!subfilter<folderExcludeFilter>]" "TagFolderTid">>
<%endif%>

<<inverse-link-and-folder-card "[all[tiddlers]prefix<currentTiddler>] -[<currentTiddler>]" "SlashFolderTid">>

<<inverse-link-and-folder-card "[all[current]backtranscludes[]]" "BackTransclude">>
</ul>
<%else%>
Expand All @@ -24,13 +26,15 @@ title: $:/plugins/linonetwo/inverse-link-and-folder/info-area
<strong><<lingo "RelatedReferences">></strong>
<$button class="inverse-link-and-folder-card-close">{{$:/core/images/close-button}}<$action-createtiddler $basetitle={{{ [[$:/state/inverse-link-and-folder/show-manually/]addsuffix<currentTiddler>] }}} $overwrite="yes" text="no"/></$button>
</li>
<<inverse-link-and-folder-list "[all[current]backlinks[]!is[system]sort[title]]" "LinkIn">>
<<inverse-link-and-folder-list "[all[current]backlinks[]!is[system]]" "LinkIn">>

<%if [all[current]!subfilter<notShowFolderUnder>] %>
<<inverse-link-and-folder-list "[all[current]tagging[]!subfilter<folderExcludeFilter>sort[title]]" "FolderTid">>
<<inverse-link-and-folder-list "[all[current]tagging[]!subfilter<folderExcludeFilter>]" "TagFolderTid">>
<%endif%>

<<inverse-link-and-folder-list "[all[current]backtranscludes[]sort[title]]" "BackTransclude">>
<<inverse-link-and-folder-list "[all[tiddlers]prefix<currentTiddler>] -[<currentTiddler>]" "SlashFolderTid">>

<<inverse-link-and-folder-list "[all[current]backtranscludes[]]" "BackTransclude">>
</ul>
<%endif%>
\end
Expand Down
6 changes: 5 additions & 1 deletion src/inverse-link-and-folder/language/en-GB/Readme.tid
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ title: $:/plugins/linonetwo/inverse-link-and-folder/language/en-GB/Readme
This plugin provides these additional info on the bottom of every tiddler:

# other tiddler linking to this tiddler
# tiddlers in this folder (tagged with this tiddler's title, tagging in TiddlyWiki is equivalent to putting into a folder)
# tiddlers in this folder
## <<lingo "TagFolderTid">>
##* <<lingo "TagFolderTid/Description">>
## <<lingo "SlashFolderTid">>
##* <<lingo "SlashFolderTid/Description">>
# tiddlers that transclude this tiddler (tiddlers using `{{}}` syntax to include this tiddler)

!! Credits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Configs/not-show-folder-under/Caption: tiddlers that don't show file lists
Configs/not-show-folder-under/Description: tiddlers matched by this filter will not be shown under the file list, e.g. if you have already shown it in some other way, you can set it here so that it won't be shown again.
RelatedReferences: Related References
LinkIn: Link In
FolderTid: Tid in Folder
TagFolderTid: Tag folder content
TagFolderTid/Description: TiddlyWiki tags can represent folders. The list of tags for the sub-tiddlers shown here contains the title of the current tiddler, and the sub-tiddlers are placed in the folder by adding tags. The current tiddler is the folder.
SlashFolderTid: Slash folder content
SlashFolderTid/Description: The slash in the tilde can indicate a folder, shown here is a sub-tiddler that is placed into a folder by adding a slash to the title of the current tiddler, followed by the title of the sub-tiddler. The current tiddler is the folder.

Translated with DeepL.com (free version)
BackTransclude: Transcluded by
ShowReferences: Show References
6 changes: 5 additions & 1 deletion src/inverse-link-and-folder/language/zh-Hans/Readme.tid
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ title: $:/plugins/linonetwo/inverse-link-and-folder/language/zh-Hans/Readme
本插件在每个条目的底部提供以下附加信息:

# 链接到此条目的其他条目(反链)
# 此文件夹中的条目(用此条目的标题打标签,太微里加标签的动作就等价于放入文件夹)
# 此文件夹中的条目
## <<lingo "TagFolderTid">>
##* <<lingo "TagFolderTid/Description">>
## <<lingo "SlashFolderTid">>
##* <<lingo "SlashFolderTid/Description">>
# 被哪些条目嵌入(被使用 `{{}}` 语法嵌入的条目)

!! 功劳
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Configs/not-show-folder-under/Caption: 不展示文件列表的条目
Configs/not-show-folder-under/Description: 被这个筛选器匹配的条目下不会展示文件列表,例如你已经用其它方式展示了就可以在这里设置让它不重复展示。
RelatedReferences: 相关引用
LinkIn: 链入
FolderTid: 文件夹内容
TagFolderTid: 标签文件夹内容
TagFolderTid/Description: 太微里标签可以表示文件夹,这里展示的子条目的标签列表里含有当前条目的标题,子条目通过加标签而放入文件夹内。当前条目就是文件夹。
SlashFolderTid: 斜杠文件夹内容
SlashFolderTid/Description: 太微里斜杠可以表示文件夹,这里展示的是通过在当前条目的标题后加上斜杠,然后跟上子条目标题,从而放入文件夹内的子条目。当前条目就是文件夹。
BackTransclude: 被嵌入
ShowReferences: 显示引用
ShowReferences/Description: 点击显示引用,无引用时点击无效。

0 comments on commit e95cdab

Please sign in to comment.