goldendict-ng/website/docs/custom_dictionary.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.2 KiB
Markdown
Raw Normal View History

## About the configuration of metadata.toml
2023-07-26 09:58:11 +00:00
A `metadata.toml`, which uses [toml](https://toml.io) format, can be placed on each dictionary's root folder to customize or override some properties. It is also used in [auto grouping by metadata](manage_groups.md)
feat: customize dictionary's fullindex option with metadata.toml (#1000) * feat: customize dictionary's fullindex option with metadata.toml * [autofix.ci] apply automated fixes * feat: display fulltext status in the dictionary info dialog * [autofix.ci] apply automated fixes * doc: add document about how to enable dictionary's fullindex feature * Update src/metadata.cc Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update src/ui/dictinfo.ui Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/mkdocs.yml Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * add images * feat: show fulltext search status in dictionary info dialog * Update dictinfo.cc * [autofix.ci] apply automated fixes * ui: change layout --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: YiFang Xiao <yifang.xiao@noreply.com> Co-authored-by: shenleban tongying <shenlebantongying@gmail.com>
2023-07-26 02:03:20 +00:00
## Customize the name of the dictionary
```toml
[metadata]
name = "New Name"
```
2023-07-26 09:58:11 +00:00
This `New Name` will be appeared as the dictionary name.
The `metadata.toml` should be placed beside dictionary files. One `metadata.toml` for each dictionary.
The metadata file uses [TOML](https://toml.io) format.
For example,
```
.
├── Cambridge
│ ├── metadata.toml (A)
│ ├── Cambridge.idx
│ ├── Cambridge.info
│ ├── Cambridge.syn
│ └── Cambridge.dict.dz
└── Collins
├── metadata.toml
├── res.zip
└── Collins.dsl (B)
```
feat: customize dictionary's fullindex option with metadata.toml (#1000) * feat: customize dictionary's fullindex option with metadata.toml * [autofix.ci] apply automated fixes * feat: display fulltext status in the dictionary info dialog * [autofix.ci] apply automated fixes * doc: add document about how to enable dictionary's fullindex feature * Update src/metadata.cc Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update src/ui/dictinfo.ui Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/mkdocs.yml Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * add images * feat: show fulltext search status in dictionary info dialog * Update dictinfo.cc * [autofix.ci] apply automated fixes * ui: change layout --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: YiFang Xiao <yifang.xiao@noreply.com> Co-authored-by: shenleban tongying <shenlebantongying@gmail.com>
2023-07-26 02:03:20 +00:00
## Disable full-text search for certain dictionary
```toml
fts=false
[metadata]
name="New Name"
```
2023-07-26 09:58:11 +00:00
The `fts` field's value can be `on/off`, `1/0` ,`true/false` etc.
feat: customize dictionary's fullindex option with metadata.toml (#1000) * feat: customize dictionary's fullindex option with metadata.toml * [autofix.ci] apply automated fixes * feat: display fulltext status in the dictionary info dialog * [autofix.ci] apply automated fixes * doc: add document about how to enable dictionary's fullindex feature * Update src/metadata.cc Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update src/ui/dictinfo.ui Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/mkdocs.yml Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * add images * feat: show fulltext search status in dictionary info dialog * Update dictinfo.cc * [autofix.ci] apply automated fixes * ui: change layout --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: YiFang Xiao <yifang.xiao@noreply.com> Co-authored-by: shenleban tongying <shenlebantongying@gmail.com>
2023-07-26 02:03:20 +00:00
```
fts=false
```
will disable the current dictionary's full-text search.
2023-07-26 09:58:11 +00:00
you can check the full-text search status on each dictionary's info dialog.
feat: customize dictionary's fullindex option with metadata.toml (#1000) * feat: customize dictionary's fullindex option with metadata.toml * [autofix.ci] apply automated fixes * feat: display fulltext status in the dictionary info dialog * [autofix.ci] apply automated fixes * doc: add document about how to enable dictionary's fullindex feature * Update src/metadata.cc Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update src/ui/dictinfo.ui Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/mkdocs.yml Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * Update website/docs/custom_dictionary.md Co-authored-by: shenleban tongying <shenlebantongying@gmail.com> * add images * feat: show fulltext search status in dictionary info dialog * Update dictinfo.cc * [autofix.ci] apply automated fixes * ui: change layout --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: YiFang Xiao <yifang.xiao@noreply.com> Co-authored-by: shenleban tongying <shenlebantongying@gmail.com>
2023-07-26 02:03:20 +00:00
2023-07-26 09:58:11 +00:00
![](img/dictionary-info-fullindex.png)