The Hunspell Dictionaries Content Snap


#1

After a day of development and testing, I am thrilled to announce that the unofficial packaging work of the Hunspell Dictionaries Content Snap has finally reached its end.

https://github.com/Lin-Buo-Ren/hunspell-dictionaries-snap

The Hunspell Dictionaries Content Snap is an attempt to allow multiple snaps to share a single copy of the Hunspell spellchecking dictionaries for multiple languages via the content interface. It allows snapped apps. that implements spellchecking via the infamous Hunspell library to not ship independent copies of the spellchecking dictionaries in their snaps, which takes about 200MiB(uncompressed)/32MiB(squashed) of disk space.

This snap does not feature any applications and is not intended to be used by regular users, instead, it is for snap packagers to implement a counterpart plug to connect and map its content into their snaps.

Refer the following forum topics for its usage:
The content interface - doc - snapcraft.io

How to Use

The consumer snap’s snapcraft.yaml must define a counterpart plug for connection:

plugs:
  hunspell-dictionaries-plug:
    content: hunspell-dictionaries-1-3-1604
    interface: content
    target: $SNAP/usr/share/hunspell
    default-provider: hunspell-dictionaries

Then do the regular things, except connecting the consumer snap’s hunspell-dictionaries-plug plug to the hunspell-dictionaries snap’s hunspell-dictionaries-1-3-1604 slot:

# Install Snap #
sudo snap install hunspell-dictionaries

# Connect the Snap to the Mandatory Interface #
## hunspell-dictionaries: Providing hunspell dictionaries at $SNAP/usr/share/hunspell ##
sudo snap connect _consumer_snap_name_:hunspell-dictionaries-plug hunspell-dictionaries:hunspell-dictionaries-1-3-1604

Related Links

Support

Please refer our project’s issue tracker
https://github.com/Lin-Buo-Ren/hunspell-dictionaries-snap/issues

or create a new topic under snap category in the Snapcraft Forums
https://forum.snapcraft.io

Join Snapcrafters

https://forum.snapcraft.io/t/join-snapcrafters/1325


How to handle large optional components in a snap
Desktop: allow access to host hunspell dictionaries