From 94de2a588a8bea63d59622ecc2a02b055fe2df63 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sun, 25 Sep 2022 11:14:27 +0100 Subject: Convert man pages to HTML for online documentation (do not distribute) --- .github/workflows/c-cpp.yml | 8 +- src/.gitignore | 3 + src/Makefile.am | 9 ++- src/enchant-2.html | 162 ++++++++++++++++++++++++++++++++++++++ src/enchant-lsmod-2.html | 132 +++++++++++++++++++++++++++++++ src/enchant.html | 184 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 493 insertions(+), 5 deletions(-) create mode 100644 src/enchant-2.html create mode 100644 src/enchant-lsmod-2.html create mode 100644 src/enchant.html diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 56e25dc..54f26c2 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -5,7 +5,7 @@ on: [ push, pull_request ] jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: ASAN_FLAGS: "-fsanitize=address -fsanitize=undefined" @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v2 with: { submodules: true } - name: Install dependencies - run: sudo apt-get -y install libglib2.0-dev libaspell-dev hspell libhunspell-dev libvoikko-dev voikko-fi aspell-en libunittest++-dev hunspell-fr + run: sudo apt-get -y install libglib2.0-dev libaspell-dev hspell libhunspell-dev libvoikko-dev voikko-fi aspell-en libunittest++-dev hunspell-fr groff - name: Install nuspell run: | sudo apt-get -y install libicu-dev ninja-build @@ -46,7 +46,7 @@ jobs: - name: Install dependencies run: | brew tap nuspell/nuspell - brew install automake dbus-glib hspell hunspell libvoikko unittest-cpp nuspell coreutils + brew install automake dbus-glib groff hspell hunspell libvoikko unittest-cpp nuspell coreutils - name: Bootstrap (gnulib and autoreconf) run: PATH="$(brew --prefix)/opt/m4/bin:${PATH}" ./bootstrap - name: configure @@ -76,7 +76,7 @@ jobs: release: false msystem: ${{matrix.sys}} install: >- - patch git + patch git groff mingw-w64-${{matrix.env}}-autotools mingw-w64-${{matrix.env}}-gcc mingw-w64-${{matrix.env}}-glib2 diff --git a/src/.gitignore b/src/.gitignore index fad1440..0e9dece 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,8 +1,11 @@ /enchant-[1-9] /enchant.[15] +/enchant.html /enchant-[1-9].1 +/enchant-[1-9].html /enchant-[1-9].exe /enchant-lsmod-[1-9] +/enchant-lsmod-[1-9].html /enchant-lsmod-[1-9].exe /enchant-lsmod.1 /enchant-lsmod-[1-9].1 diff --git a/src/Makefile.am b/src/Makefile.am index b40b174..96b45a2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,11 +24,18 @@ noinst_HEADERS = debug.h pkgdata_DATA = enchant.ordering dist_man_MANS = enchant-@ENCHANT_MAJOR_VERSION@.1 enchant-lsmod-@ENCHANT_MAJOR_VERSION@.1 enchant.5 +nodist_doc_DATA = enchant-@ENCHANT_MAJOR_VERSION@.html enchant-lsmod-@ENCHANT_MAJOR_VERSION@.html enchant.html edit = sed \ -e 's|DATADIR|$(datadir)|g' -DISTCLEANFILES = $(dist_man_MANS) +DISTCLEANFILES = $(dist_man_MANS) $(nodist_doc_DATA) + +.1.html: + groff -mandoc -Thtml $< > $@ + +enchant.html: enchant.5 + groff -mandoc -Thtml $< > $@ enchant-@ENCHANT_MAJOR_VERSION@.1: $(builddir)/enchant.1 Makefile.am $(top_builddir)/config.status rm -f $@ $@.tmp diff --git a/src/enchant-2.html b/src/enchant-2.html new file mode 100644 index 0000000..4353067 --- /dev/null +++ b/src/enchant-2.html @@ -0,0 +1,162 @@ + + + + + + + + + +ENCHANT-2 + + + + +

ENCHANT-2

+ +NAME
+SYNOPSIS
+DESCRIPTION
+FILES AND DIRECTORIES
+SEE ALSO
+AUTHOR
+ +
+ + +

NAME + +

+ + +

Enchant - a +spellchecker

+ +

SYNOPSIS + +

+ + +

enchant-2 +-a|-l|-h|-v [-L] [-d +DICTIONARY] [FILE]

+ +

DESCRIPTION + +

+ + +

Enchant +is an ispell-compatible spellchecker.
+-d
DICTIONARY

+ +

use the given dictionary

+ +

-p WORDLIST

+ +

use the given personal +wordlist

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +

-a

+ + +

list suggestions in ispell pipe mode format

+
+ + +

-l

+ + +

list only the misspellings

+
+ + +

-L

+ + +

display line numbers

+
+ + +

-h

+ + +

display help and exit

+
+ + +

-v

+ + +

display version information and exit

+
+ +

FILES AND DIRECTORIES + +

+ + +

See +enchant(5) for details of configuration files and +personal word lists.

+ +

SEE ALSO + +

+ + + +

enchant-2(5), +aspell(1), enchant-lsmod-2(1)

+ +

AUTHOR + +

+ + +

Written by Dom +Lachowicz and Reuben Thomas.

+
+ + diff --git a/src/enchant-lsmod-2.html b/src/enchant-lsmod-2.html new file mode 100644 index 0000000..0cced46 --- /dev/null +++ b/src/enchant-lsmod-2.html @@ -0,0 +1,132 @@ + + + + + + + + + +ENCHANT-LSMOD-2 + + + + +

ENCHANT-LSMOD-2

+ +NAME
+SYNOPSIS
+DESCRIPTION
+SEE ALSO
+AUTHOR
+ +
+ + +

NAME + +

+ + +

enchant-lsmod - +list provider and dictionary information

+ +

SYNOPSIS + +

+ + + +

enchant-lsmod-2 +[[-lang|-word-chars] +[language_tag]|-list-dicts|-help|-version]

+ +

DESCRIPTION + +

+ + + +

enchant-lsmod-2 +gives information about Enchant’s spell-checker +providers and the dictionaries each offers. See +enchant-2(1) for details about how the providers and +dictionaries are located. If no command-line options are +given, the available providers are listed.

+ + +

OPTIONS

+ + + + + + + +
+ + +

-lang

+ + +

Show which provider and dictionary will be used for the +given language, or all languages if none is supplied.

+ +

-word-chars

+ +

Show the extra word characters +for the given language, if available. This is of little +interest to most users.

+ +

-list-dicts

+ +

List the provider and +dictionary for all available languages.

+ + + + + + + + +
+ + +

-help

+ + +

Show brief help.

+
+ +

-version

+ +

Prints the program’s +version.

+ +

SEE ALSO + +

+ + + +

enchant-2(1)

+ +

AUTHOR + +

+ + +

Written by Dom +Lachowicz and Reuben Thomas.

+
+ + diff --git a/src/enchant.html b/src/enchant.html new file mode 100644 index 0000000..d52bef7 --- /dev/null +++ b/src/enchant.html @@ -0,0 +1,184 @@ + + + + + + + + + +ENCHANT + + + + +

ENCHANT

+ +NAME
+ORDERING FILE
+PERSONAL WORD LISTS
+FILES AND DIRECTORIES
+SEE ALSO
+AUTHOR
+ +
+ + +

NAME + +

+ + +

Enchant - +enchant ordering files and personal word lists

+ +

ORDERING FILE + +

+ + +

Enchant uses +global and per-user ordering files named +enchant.ordering to decide which spelling provider to +use for particular languages. The per-user file takes +precedence.

+ +

The ordering +file takes the form language_tag:<comma-separated list +of spelling providers>. The language tag is an IETF +BCP 47 language tag, typically of the form +COUNTRY_LANGUAGE. To see what dictionaries are +available, run enchant-lsmod-2. ’*’ is +used to mean “use this ordering for all languages, +unless instructed otherwise.” For example:

+ + +

*:aspell,hunspell,nuspell +
+en:aspell,hunspell,nuspell
+en_GB:hunspell,nuspell,aspell
+fr:hunspell,nuspell,aspell

+ +

PERSONAL WORD LISTS + +

+ + +

Personal word +lists are simple plain text files with one word per line. +Lines starting with a hash sign ’#’ are +ignored.

+ +

SHARING +PERSONAL WORD LISTS BETWEEN SPELL-CHECKERS
+It is possible, and usually safe, to share Enchant’s +personal word lists with other spelling checkers that use +the same format (note that other spell-checkers may not +support comments!). The spell-checkers known to be +compatible are Hunspell, Nuspell and Ispell. (Although +Enchant does not support Ispell as a back-end, it’s +still fine to share word lists with it.) Other +spell-checkers supported by Enchant are either incompatible, +or have no personal word list mechanism. There may well be +yet other spell-checkers, unknown to Enchant, that use the +same format.

+ +

Some +applications use Hunspell or Nuspell, but store the personal +word list under another name or in another location. Firefox +is one example. Firefox also seems to reorder its word list +when updating it; again, this is OK, as the result is still +in the same format. Anonther example is Thunderbird.

+ +

To share word +lists with Enchant, find the other spelling checker’s +word list file, e.g. ~/.hunspell_fr_FR or +~/.config/nuspell/fr_FR, and merge it with the +corresponding Enchant file, in this case +~/.config/enchant/fr_FR.dic. Use the following +command, replacing ENCHANT-DICT and OTHER-DICT +with the corresponding dictionary file names:

+ +

cat +ENCHANT-DICT OTHER-DICT | sort -u > merged.txt

+ +

Take a look at +merged.txt to check the merge has worked, then

+ +

mv merged.txt +ENCHANT-DICT
+rm OTHER-DICT
+ln -s OTHER-DICT ENCHANT-DICT

+ +

to replace the +other dictionary file with a link to the Enchant dictionary, +again filling in the name of the dictionary files.

+ +

FILES AND DIRECTORIES + +

+ + +

Enchant looks +in the following places for files, in decreasing order of +precedence:
+ENCHANT_CONFIG_DIR

+ +

(If the environment variable is +set.)

+ +

XDG_CONFIG_HOME/enchant +(non-Windows systems)

+ +

Default: +~/.config/enchant

+ + +

CSIDL_LOCAL_APPDATA\enchant +(Windows systems)

+ +

Default: C:\Documents and +Settings\username\Local Settings\Application +Data\enchant

+ +

DATADIR/enchant

+ +

(Or the equivalent location +relative to the enchant library for a relocatable +build.)

+ +

Dictionaries +are looked for in a subdirectory with the same name as the +provider; for example, DATADIR/enchant/hunspell and +~/.config/enchant/hunspell.

+ +

Some providers +may also look in a standard system directory for their +dictionaries; the hunspell provider can be configured to do +so at build time.

+ +

SEE ALSO + +

+ + + +

enchant-2(1), +enchant-lsmod-2(1)

+ +

AUTHOR + +

+ + +

Written by Dom +Lachowicz and Reuben Thomas.

+
+ + -- cgit v1.2.1