看板 Linux 關於我們 聯絡資訊
經過一天的開發與測試,我很高興地宣佈 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> -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.224.251.29 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1535902900.A.785.html ※ 編輯: LinBuoRen (61.224.251.29), 09/03/2018 09:46:27 ※ 編輯: LinBuoRen (61.224.251.29), 09/03/2018 20:20:28