Skip to content

Commit

Permalink
feat: trait tag for wiki metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Jun 8, 2024
1 parent 177568d commit 4ddc203
Show file tree
Hide file tree
Showing 15 changed files with 224 additions and 4 deletions.
13 changes: 13 additions & 0 deletions src/wmo/$__TraitTag_WMO_Core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"created": "20240608173327437",
"text": "Tiddlywiki fields used by the core.",
"title": "$:/TraitTag/WMO/Core",
"tags": "$:/SuperTag/TraitTag",
"type": "text/vnd.tiddlywiki",
"modified": "20240608174742089",
"url": "https://tiddlywiki.com/#TiddlerFields",
"schema": "{\n \"type\": \"object\",\n \"lingo-base\": \"$:/plugins/linonetwo/wmo/language/\",\n \"properties\": {\n \"class\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Class/Title\",\n \"description\": \"TraitTag/WMO/Core/Class/Description\"\n },\n \"code-body\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/CodeBody/Title\",\n \"description\": \"TraitTag/WMO/Core/CodeBody/Description\"\n },\n \"color\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Color/Title\",\n \"description\": \"TraitTag/WMO/Core/Color/Description\"\n },\n \"description\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Description/Title\",\n \"description\": \"TraitTag/WMO/Core/Description/Description\"\n },\n \"draft.of\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/DraftOf/Title\",\n \"description\": \"TraitTag/WMO/Core/DraftOf/Description\"\n },\n \"draft.title\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/DraftTitle/Title\",\n \"description\": \"TraitTag/WMO/Core/DraftTitle/Description\"\n },\n \"footer\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Footer/Title\",\n \"description\": \"TraitTag/WMO/Core/Footer/Description\"\n },\n \"hide-body\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/HideBody/Title\",\n \"description\": \"TraitTag/WMO/Core/HideBody/Description\"\n },\n \"icon\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Icon/Title\",\n \"description\": \"TraitTag/WMO/Core/Icon/Description\"\n },\n \"library\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Library/Title\",\n \"description\": \"TraitTag/WMO/Core/Library/Description\"\n },\n \"list-after\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/ListAfter/Title\",\n \"description\": \"TraitTag/WMO/Core/ListAfter/Description\"\n },\n \"list-before\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/ListBefore/Title\",\n \"description\": \"TraitTag/WMO/Core/ListBefore/Description\"\n },\n \"name\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Name/Title\",\n \"description\": \"TraitTag/WMO/Core/Name/Description\"\n },\n \"plugin-priority\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/PluginPriority/Title\",\n \"description\": \"TraitTag/WMO/Core/PluginPriority/Description\"\n },\n \"plugin-type\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/PluginType/Title\",\n \"description\": \"TraitTag/WMO/Core/PluginType/Description\"\n },\n \"source\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Source/Title\",\n \"description\": \"TraitTag/WMO/Core/Source/Description\"\n },\n \"subtitle\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/Subtitle/Title\",\n \"description\": \"TraitTag/WMO/Core/Subtitle/Description\"\n },\n \"throttle.refresh\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/ThrottleRefresh/Title\",\n \"description\": \"TraitTag/WMO/Core/ThrottleRefresh/Description\"\n },\n \"toc-link\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/TocLink/Title\",\n \"description\": \"TraitTag/WMO/Core/TocLink/Description\"\n },\n \"_canonical_uri\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Core/CanonicalUri/Title\",\n \"description\": \"TraitTag/WMO/Core/CanonicalUri/Description\"\n }\n }\n}",
"wl-field-name-text": "schema"
}
]
13 changes: 13 additions & 0 deletions src/wmo/$__TraitTag_WMO_Standard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"created": "20240608173327437",
"text": "Standard tiddlywiki fields.",
"title": "$:/TraitTag/WMO/Standard",
"tags": "$:/SuperTag/TraitTag",
"type": "text/vnd.tiddlywiki",
"modified": "20240608174008307",
"url": "https://tiddlywiki.com/#TiddlerFields",
"schema": "{\n \"type\": \"object\",\n \"lingo-base\": \"$:/plugins/linonetwo/wmo/language/\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Title/Title\",\n \"description\": \"TraitTag/WMO/Standard/Title/Description\"\n },\n \"text\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Text/Title\",\n \"description\": \"TraitTag/WMO/Standard/Text/Description\"\n },\n \"modified\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Modified/Title\",\n \"description\": \"TraitTag/WMO/Standard/Modified/Description\",\n \"format\": \"datetime-local\"\n },\n \"modifier\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Modifier/Title\",\n \"description\": \"TraitTag/WMO/Standard/Modifier/Description\"\n },\n \"created\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Created/Title\",\n \"description\": \"TraitTag/WMO/Standard/Created/Description\",\n \"format\": \"datetime-local\"\n },\n \"creator\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Creator/Title\",\n \"description\": \"TraitTag/WMO/Standard/Creator/Description\"\n },\n \"tags\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Tags/Title\",\n \"description\": \"TraitTag/WMO/Standard/Tags/Description\"\n },\n \"type\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Type/Title\",\n \"description\": \"TraitTag/WMO/Standard/Type/Description\"\n },\n \"list\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/List/Title\",\n \"description\": \"TraitTag/WMO/Standard/List/Description\"\n },\n \"caption\": {\n \"type\": \"string\",\n \"title\": \"TraitTag/WMO/Standard/Caption/Title\",\n \"description\": \"TraitTag/WMO/Standard/Caption/Description\"\n }\n }\n}",
"wl-field-name-text": "schema"
}
]
19 changes: 19 additions & 0 deletions src/wmo/language/en-GB/Readme.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: $:/plugins/linonetwo/wmo/language/en-GB/Readme

\procedure lingo-base() $:/plugins/linonetwo/wmo/language/

! <<lingo Name>>

<<lingo Description>>

!! Presentation

After installing the "SuperTag" plugin, you can expand the form below to see the details:

!!! Standard (common to all wikis)

<$json-editor-form filter="[[$:/TraitTag/WMO/Standard]get[schema]]" tiddler="$:/temp/WMO-example" />

!!! Core (used by TW5 official website)

<$json-editor-form filter="[[$:/TraitTag/WMO/Core]get[schema]]" tiddler="$:/temp/WMO-example" />
63 changes: 63 additions & 0 deletions src/wmo/language/en-GB/TraitTags.multids
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
title: $:/plugins/linonetwo/wmo/language/en-GB/

TraitTag/WMO/Standard/Title/Title: Title
TraitTag/WMO/Standard/Title/Description: The unique name of a tiddler
TraitTag/WMO/Standard/Text/Title: Text
TraitTag/WMO/Standard/Text/Description: The body text of a tiddler
TraitTag/WMO/Standard/Modified/Title: Modified
TraitTag/WMO/Standard/Modified/Description: The date and time at which a tiddler was last modified
TraitTag/WMO/Standard/Modifier/Title: Modifier
TraitTag/WMO/Standard/Modifier/Description: The tiddler title associated with the person who last modified a tiddler
TraitTag/WMO/Standard/Created/Title: Created
TraitTag/WMO/Standard/Created/Description: The date a tiddler was created
TraitTag/WMO/Standard/Creator/Title: Creator
TraitTag/WMO/Standard/Creator/Description: The name of the person who created a tiddler
TraitTag/WMO/Standard/Tags/Title: Tags
TraitTag/WMO/Standard/Tags/Description: A list of tags associated with a tiddler
TraitTag/WMO/Standard/Type/Title: Type
TraitTag/WMO/Standard/Type/Description: The content type of a tiddler
TraitTag/WMO/Standard/List/Title: List
TraitTag/WMO/Standard/List/Description: An ordered list of tiddler titles associated with a tiddler – see ListField
TraitTag/WMO/Standard/Caption/Title: Caption
TraitTag/WMO/Standard/Caption/Description: The text to be displayed on a tab or button

TraitTag/WMO/Core/Class/Title: Class
TraitTag/WMO/Core/Class/Description:
TraitTag/WMO/Core/CodeBody/Title: Code Body
TraitTag/WMO/Core/CodeBody/Description: Introduced in v5.2.1 The view template will display the tiddler as code if set to yes
TraitTag/WMO/Core/Color/Title: Color
TraitTag/WMO/Core/Color/Description: The CSS color value associated with a tiddler
TraitTag/WMO/Core/Description/Title: Description
TraitTag/WMO/Core/Description/Description: The descriptive text for a plugin, or a modal dialogue
TraitTag/WMO/Core/DraftOf/Title: Draft Of
TraitTag/WMO/Core/DraftOf/Description: For draft tiddlers, contains the title of the tiddler of which this is a draft
TraitTag/WMO/Core/DraftTitle/Title: Draft Title
TraitTag/WMO/Core/DraftTitle/Description: For draft tiddlers, contains the proposed new title of the tiddler
TraitTag/WMO/Core/Footer/Title: Footer
TraitTag/WMO/Core/Footer/Description: The footer text for a modal
TraitTag/WMO/Core/HideBody/Title: Hide Body
TraitTag/WMO/Core/HideBody/Description: The view template will hide bodies of tiddlers if set to yes
TraitTag/WMO/Core/Icon/Title: Icon
TraitTag/WMO/Core/Icon/Description: The title of the tiddler containing the icon associated with a tiddler
TraitTag/WMO/Core/Library/Title: Library
TraitTag/WMO/Core/Library/Description: Indicates that a tiddler should be saved as a JavaScript library if set to yes
TraitTag/WMO/Core/ListAfter/Title: List After
TraitTag/WMO/Core/ListAfter/Description: If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles, or at the end of the list if this field is present but empty
TraitTag/WMO/Core/ListBefore/Title: List Before
TraitTag/WMO/Core/ListBefore/Description: If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty
TraitTag/WMO/Core/Name/Title: Name
TraitTag/WMO/Core/Name/Description: The human readable name associated with a plugin tiddler
TraitTag/WMO/Core/PluginPriority/Title: Plugin Priority
TraitTag/WMO/Core/PluginPriority/Description: A numerical value indicating the priority of a plugin tiddler
TraitTag/WMO/Core/PluginType/Title: Plugin Type
TraitTag/WMO/Core/PluginType/Description: The type of plugin in a plugin tiddler
TraitTag/WMO/Core/Source/Title: Source
TraitTag/WMO/Core/Source/Description: The source URL associated with a tiddler
TraitTag/WMO/Core/Subtitle/Title: Subtitle
TraitTag/WMO/Core/Subtitle/Description: The subtitle text for a modal
TraitTag/WMO/Core/ThrottleRefresh/Title: Throttle Refresh
TraitTag/WMO/Core/ThrottleRefresh/Description: If present, throttles refreshes of this tiddler
TraitTag/WMO/Core/TocLink/Title: Toc Link
TraitTag/WMO/Core/TocLink/Description: Suppresses the tiddler's link in a Table of Contents tree if set to no
TraitTag/WMO/Core/CanonicalUri/Title: Canonical URI
TraitTag/WMO/Core/CanonicalUri/Description: The full URI of an external image tiddler
4 changes: 4 additions & 0 deletions src/wmo/language/en-GB/Translations.multids
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: $:/plugins/linonetwo/wmo/language/en-GB/

Name: TiddlyWiki Common Ontology
Description: TiddlyWiki Common/Consensus Metadata Ontology. I18n for fields like `title` `caption` `modified`.
19 changes: 19 additions & 0 deletions src/wmo/language/zh-Hans/Readme.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: $:/plugins/linonetwo/wmo/language/zh-Hans/Readme

\procedure lingo-base() $:/plugins/linonetwo/wmo/language/

! <<lingo Name>>

<<lingo Description>>

!! 介绍

在安装了「超级标签」插件(即 SuperTag 插件)后,可以展开下面的表单查看详情:

!!! 标准(所有知识库通用)

<$json-editor-form filter="[[$:/TraitTag/WMO/Standard]get[schema]]" tiddler="$:/temp/WMO-example" />

!!! 核心(TW5官网使用的)

<$json-editor-form filter="[[$:/TraitTag/WMO/Core]get[schema]]" tiddler="$:/temp/WMO-example" />
65 changes: 65 additions & 0 deletions src/wmo/language/zh-Hans/TraitTags.multids
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
title: $:/plugins/linonetwo/wmo/language/zh-Hans/

TraitTag/WMO/Standard/Title/Title: 标题
TraitTag/WMO/Standard/Title/Description: 条目的唯一名称
TraitTag/WMO/Standard/Text/Title: 文本
TraitTag/WMO/Standard/Text/Description: 条目的内文
TraitTag/WMO/Standard/Modified/Title: 修改日期
TraitTag/WMO/Standard/Modified/Description: 条目的最近修改日期与时间
TraitTag/WMO/Standard/Modifier/Title: 修改者
TraitTag/WMO/Standard/Modifier/Description: 条目的最近修改者
TraitTag/WMO/Standard/Created/Title: 创建日期
TraitTag/WMO/Standard/Created/Description: 条目的创建日期
TraitTag/WMO/Standard/Creator/Title: 创建者
TraitTag/WMO/Standard/Creator/Description: 条目的创建者
TraitTag/WMO/Standard/Tags/Title: 标签
TraitTag/WMO/Standard/Tags/Description: 条目的标签清单
TraitTag/WMO/Standard/Type/Title: 类型
TraitTag/WMO/Standard/Type/Description: 条目的内容类型
TraitTag/WMO/Standard/List/Title: 列表
TraitTag/WMO/Standard/List/Description: 条目的列表,指定一些条目的标题清单 – 详见 ListField
TraitTag/WMO/Standard/Caption/Title: 标题文字
TraitTag/WMO/Standard/Caption/Description: 显示于页签或按钮上的标题文字

TraitTag/WMO/Core/Class/Title: CSS类
TraitTag/WMO/Core/Class/Description: 5.1.16 版引进 渲染条目时,套用到条目的 CSS 类 - 请参阅依自订类别的自订样式。也适用于互动窗口
TraitTag/WMO/Core/CodeBody/Title: 代码体
TraitTag/WMO/Core/CodeBody/Description: 5.2.1 版引进 若设置为 yes,视图模板将以程式码形式显示条目
TraitTag/WMO/Core/Color/Title: 颜色
TraitTag/WMO/Core/Color/Description: 条目的 CSS 颜色值
TraitTag/WMO/Core/Description/Title: 描述
TraitTag/WMO/Core/Description/Description: 插件的说明、描述
TraitTag/WMO/Core/DraftOf/Title: 草稿条目
TraitTag/WMO/Core/DraftOf/Description: 草稿条目,包含条目的标题、标签、字段 ...
TraitTag/WMO/Core/DraftTitle/Title: 草稿标题
TraitTag/WMO/Core/DraftTitle/Description: 草稿条目的标题
TraitTag/WMO/Core/Footer/Title: 注脚
TraitTag/WMO/Core/Footer/Description: 互动窗口的注脚
TraitTag/WMO/Core/HideBody/Title: 隐藏主体
TraitTag/WMO/Core/HideBody/Description: 若设置为 yes,视图模板将隐藏条目的主体
TraitTag/WMO/Core/Icon/Title: 图标
TraitTag/WMO/Core/Icon/Description: 条目的标题含有与条目关联的图标
TraitTag/WMO/Core/Library/Title: 库
TraitTag/WMO/Core/Library/Description: 若设置为 yes,表示条目应该被保存为一个 JavaScript 程序库
TraitTag/WMO/Core/ListAfter/Title: 列表后
TraitTag/WMO/Core/ListAfter/Description: 当前条目名称将被添加到条目排序清单的设置条目名称之后,或若此字段存在但是空的,则被添加于清单的尾端
TraitTag/WMO/Core/ListBefore/Title: 列表前
TraitTag/WMO/Core/ListBefore/Description: 前条目名称将被添加到条目排序清单中的设置条目名称之前,或若此字段存在但是空的,则被添加于清单的前端
TraitTag/WMO/Core/Name/Title: 名称
TraitTag/WMO/Core/Name/Description: 具可读性的插件条目的名称
TraitTag/WMO/Core/PluginPriority/Title: 插件优先级
TraitTag/WMO/Core/PluginPriority/Description: 插件条目的优先级数值
TraitTag/WMO/Core/PluginType/Title: 插件类型
TraitTag/WMO/Core/PluginType/Description: 插件条目的类型
TraitTag/WMO/Core/Stability/Title: 稳定性
TraitTag/WMO/Core/Stability/Description: 插件的开发状态:已弃用、实验性、稳定或旧版
TraitTag/WMO/Core/Source/Title: 源
TraitTag/WMO/Core/Source/Description: 条目的网址
TraitTag/WMO/Core/Subtitle/Title: 副标题
TraitTag/WMO/Core/Subtitle/Description: 互动窗口的副标题
TraitTag/WMO/Core/ThrottleRefresh/Title: 限制刷新
TraitTag/WMO/Core/ThrottleRefresh/Description: 如果存在,则限制此条目的刷新
TraitTag/WMO/Core/TocLink/Title: 目录链接
TraitTag/WMO/Core/TocLink/Description: 若设置为 no,则抑制目录树中的条目链接。
TraitTag/WMO/Core/CanonicalUri/Title: 规范 URI
TraitTag/WMO/Core/CanonicalUri/Description: 外部图像条目的完整的 URI
4 changes: 4 additions & 0 deletions src/wmo/language/zh-Hans/Translations.multids
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: $:/plugins/linonetwo/wmo/language/zh-Hans/

Name: 太微通用本体
Description: 太微通用的/有共识的元数据本体。翻译了 `title` `caption` `modified` 等字段。
9 changes: 9 additions & 0 deletions src/wmo/plugin.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "$:/plugins/linonetwo/wmo",
"name": "wmo",
"author": "linonetwo",
"description": "TiddlyWiki Common/Consensus Metadata Ontology. I18n for fields like `title` `caption` `modified`.",
"plugin-type": "plugin",
"version": "0.0.1",
"list": "readme"
}
6 changes: 6 additions & 0 deletions src/wmo/readme.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
title: $:/plugins/linonetwo/wmo/readme
type: text/vnd.tiddlywiki

\procedure lingo-base() $:/plugins/linonetwo/wmo/language/

<<lingo Readme>>
5 changes: 5 additions & 0 deletions src/wmo/tree.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: $:/plugins/linonetwo/wmo/tree
creator: LinOnetwo
type: text/vnd.tiddlywiki

<<tree prefix:"$:/plugins/linonetwo/wmo/">>
2 changes: 1 addition & 1 deletion wiki/tiddlers/$__DefaultTiddlers.tid
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ modifier: 林一二
title: $:/DefaultTiddlers
type: text/vnd.tiddlywiki

Index Examples
Index Examples $:/plugins/linonetwo/wmo

Large diffs are not rendered by default.

Loading

0 comments on commit 4ddc203

Please sign in to comment.