#!/bin/bash

# dicomax: to batch insert words in your personal ( or user) hunspell dictionary (with thanks to pingouinux and nesthib).V1. February 2013.

# Dependencies: zenity, odt2txt, hunspell, hunspell-en-US.

# The personal dictionary is a plain-text file set by default at   ~/.hunspell_en_US Adapt to your own language. More infos with man hunspell. 

name=$(zenity --entry --title "Name of txt file" --text "Write here the name of your txt file" --entry-text=Name?)
echo "name=$name"

sort -um "${name}".txt ~/.hunspell_en_US >~/.hunspell_en_US.temp

mv  ~/.hunspell_en_US{.temp,}

echo "Done"
zenity --info --text "Done"


