club-1 / flarum-ext-sphinx-glossary
为Sphinx文档库存中定义的术语添加链接。
v1.0.1
2023-07-22 16:06 UTC
Requires
- php: >=7.4
- ext-curl: *
- club-1/sphinx-inventory-parser: ^1.0
- flarum/core: ^1.2.0
Requires (Dev)
- flarum/phpstan: ^1.8
- flarum/testing: ^1.0.0
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-mockery: ^1.1
- phpstan/phpstan-phpunit: ^1.2
Suggests
- club-1/flarum-ext-chore-commands: Allows to reparse all the comment posts with the new formatter's configuration
README
A Flarum 扩展。为Sphinx文档库存中定义的术语添加链接。
这是一个相当小众的扩展,边缘处理略显粗糙,但工作良好。如果您的社区围绕一个定义了大量术语的Sphinx文档的软件项目,这可能很有用。
目前它没有任何GUI管理员面板设置。它只能通过Flarum控制台进行配置。
此扩展基于Sphinx的intersphinx功能,配置方式类似。可以通过使用sphinx:add
命令将类似于intersphinx_mapping
配置值的映射添加到数据库中。然后sphinx:update
命令会获取并解析相应的库存以填充词汇表。此命令计划每天运行一次。它使用HTTP缓存和PHP流来保持资源低。
默认情况下,仅使用std:term
角色作为词汇表条目。这可以在每个映射的基础上更改,使用--role=ROLE
选项。例如
php flarum sphinx:add club1 https://club1.fr/docs/fr/ --role=term --role=logiciel --role=commande
安装
使用composer安装
composer require club-1/flarum-ext-sphinx-glossary:"*"
使用方法
从管理员面板启用扩展后,以下Flarum命令可用
sphinx:add Add a Sphinx documentation inventory to the mapping list
sphinx:list List the Sphinx inventory mappings
sphinx:objects Display info about the loaded Sphinx objects
sphinx:remove Remove a Sphinx documentation inventory from the mapping list and all its objects
sphinx:update Update Sphinx glossary entries by downloading the latest inventories
推荐
此扩展本身不会对之前发布的评论应用格式更改。如果您想重新解析数据库中所有评论帖子,建议安装并启用club-1/flarum-ext-chore-commands
扩展并使用其chore:reparse
命令。
更新
composer update club-1/flarum-ext-sphinx-glossary:"*"
php flarum migrate
php flarum cache:clear
开发
以下工具是开发所需的
致谢
此扩展基于以下库