goldendict-ng/src/metadata.hh
xiaoyifang 17cd445607
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 10:03:20 +08:00

21 lines
422 B
C++

#pragma once
#include <QStringView>
#include <optional>
#include <vector>
namespace Metadata {
/**
* Represent the metadata.toml beside the dictionary files
*/
struct result
{
std::optional< std::vector< std::string > > categories;
std::optional< std::string > name;
std::optional< bool > fullindex;
};
[[nodiscard]] std::optional< Metadata::result > load( std::string_view filepath );
} // namespace Metadata