[分享] Hunspell拼字检查字典的内容共享Snap包

楼主: LinBuoRen (林博仁)   2018-09-02 23:41:26
经过一天的开发与测试,我很高兴地宣布 Hunspell 拼字检查字典的非官方内容共享Snap
软件包的打包工作已经告一段落。
<https://github.com/Lin-Buo-Ren/hunspell-dictionaries-snap>
Hunspell拼字检查字典的非官方内容共享Snap软件包是一个透过content权限限缩界面让
多个Snap软件包共用一份包含多个语言的Hunspell拼字检查字典的尝试。它能让以著名
的 Hunspell 程式库实作拼字检查功能的 Snap 应用不需要在自己的 Snap 软件包中自带
一份占用 200MiB(未经压缩)/ 32MiB(经压缩)磁盘空间的拼字检查字典。
此Snap软件包并不自带任何的应用软件且不是设计用来给一般使用者使用者使用,而是由
Snap打包者们实作对应的界面插头(interface plug)以连接到这个Snap包并将其内容映射
到他们的Snap软件包中。
使用方式请参阅下列论坛主题:
[The content interface - doc -
snapcraft.io](https://forum.snapcraft.io/t/the-content-interface/1074)
### 如何使用 ###
内容消费Snap包的snapcraft.yaml档案中必须定义一个连接用的对应界面插头:
```yaml
plugs:
hunspell-dictionaries-plug:
content: hunspell-dictionaries-1-3-1604
interface: content
target: $SNAP/usr/share/hunspell
default-provider: hunspell-dictionaries
```
然后再以常态作法进行安装,不同的是须将内容消费Snap包定义好的
`hunspell-dictionaries-plug` 界面插头连接到 `hunspell-dictionaries` Snap软件包
的 `hunspell-dictionaries-1-3-1604` 界面插槽(interface slot)中:
```
# 安装Snap软件包 #
sudo snap install hunspell-dictionaries
# 将Snap软件连接到必要界面 #
## hunspell-dictionaries:于 $SNAP/usr/share/hunspell 目录提供 Hunspell 拼字检
查字典 ##
sudo snap connect _consumer_snap_name_:hunspell-dictionaries-plug
hunspell-dictionaries:hunspell-dictionaries-1-3-1604
```
### 相关连结 ###
* 打包食谱来源码
<https://github.com/Lin-Buo-Ren/hunspell-dictionaries-snap>
* Desktop: allow access to host hunspell dictionaries - snapd - snapcraft.io
<https://forum.snapcraft.io/t/desktop-allow-access-to-host-hunspell-dictionaries/2598>
### 支援 ###
请参阅本专案的议题追踪系统
<https://github.com/Lin-Buo-Ren/hunspell-dictionaries-snap/issues>
或是到 Snapcraft 论坛的 snap 主题类别中建档新主题
<https://forum.snapcraft.io>
### 成为 Snapcrafters 的一份子 ###
<https://forum.snapcraft.io/t/join-snapcrafters/1325>

Links booklink

Contact Us: admin [ a t ] ucptt.com