=head1 SYNOPSIS

B<convertgls2bib> [I<option>]+ I<texfile> I<bibfile>

=head1 DESCRIPTION

Converts a B<.tex> file containing glossary definitions using
commands like C<\newglossaryentry> and C<\newacronym> to 
a B<.bib> file in the format required for B<bib2gls>.
Distributed with F<bib2gls>.

=head1 OPTIONS

=head2 GENERAL OPTIONS

=over 4

=item B<--help> or B<-h>

Display help message and exit.

=item B<--version> or B<-v>

Display version information and exit.

=item B<--silent> or B<--quiet> or B<-q>

Suppress all messages except for errors.

=item B<--verbose>

Switch on verbose mode.

=item B<--no-verbose>

Switch off verbose mode.

=item B<--debug> [I<n>]

Display debugging messages.

=item B<--debug-mode> I<setting>

May be used instead of B<--debug> where the level number is
difficult to remember. Value same as for B<bib2gls>'s
B<--debug-mode> option.

=item B<--no-debug>

Switch off debugging mode. Equivalent to B<--debug> B<0>.

=item B<--log-file> I<filename>

Log messages to given file. Intended primarily for debugging messages so
enabling debug mode will automatically create a transcript file, but otherwise
a file won't be created unless this option is used.

=back

=head2 ENCOSING AND LOCALISATION OPTIONS

=over 4

=item B<--texenc> I<name>

Set the character encoding to I<name> for the input B<.tex> files.

=item B<--bibenc> I<name>

Set the character encoding to I<name> for the output B<.bib> files.

=item B<--locale> I<lang tag>

Use the language resource files associated with the given language
tag I<lang tag>. If there isn't an appropriate file, the B<en>
(English) file will be used.

=back

=head2 FILTERING OPTIONS

=over 4

=item B<--preamble-only> or B<-p>

Only parse the document preamble. That is, stop parsing if
C<\begin{document}> encountered.

=item B<--no-preamble-only>

Parse the entire document (default).

=item B<--ignore-fields> I<list> or B<-f> I<list>

Ignore all the fields in the comma-separated I<list>. If the
list includes B<sort>, B<type> or B<category> it will automatically
implement the corresponding B<--ignore-sort>, B<--ignore-type> or
B<--ignore-category> option. Each item in the list should identify
the field by its original case-sensitive key.

This option is cumulative.

=item B<--no-ignore-fields>

Cancels the effect of B<--ignore-fields>.

=item B<--ignore-category>

Omit the B<category> field. Default if B<--split-on-category>.

=item B<--no-ignore-category>

Don't omit the B<category> field. Default unless B<--split-on-category>.

=item B<--ignore-type>

Omit the B<type> field. Default if B<--split-on-type>.

=item B<--no-ignore-type>

Don't omit the B<type> field. Default unless B<--split-on-type>.

=item B<--ignore-sort>

Ignore the B<sort> field (default).

=item B<--no-ignore-sort>

Don't ignore the B<sort> field.

=back

=head2 OUTPUT FILE OPTIONS

=over 4

=item B<--overwrite>

Overwrite existing .bib files. Default unless B<--split-on-type>
used.

=item B<--no-overwrite>

Don't overwrite existing .bib files. Default if B<--split-on-type>
used.

=item B<--split-on-type> or B<-t>

Split the entries into separate files according to the B<type> field.
This option automatically implements B<--ignore-type> and
B<--no-overwrite>.

=item B<--no-split-on-type>

Don't split the entries into separate files according to the B<type>
field (default).

=item B<--split-on-category> or B<-c>

Split the entries into separate files according to the B<category> field.
This option automatically implements B<--ignore-category> and
B<--no-overwrite>.

=item B<--no-split-on-category>

Don't split the entries into separate files according to the B<category>
field (default).

=back

=head2 ADJUSTMENT OPTIONS

=over 4

=item B<--absorb-see> 

Absorb C<\glssee> and C<\glsxtrindexseealso> into the data (default).

=item B<--no-absorb-see> 

Don't absorb C<\glssee> and C<\glsxtrindexseealso> into the data.

=item B<--index-conversion> or B<-i>

Any entries that would normally be converted to C<@entry> that don't
have a description or just have the description set to
C<\nopostdesc> or C<\glsxtrnopostpunc> will be converted to C<@index>
and the B<description> field will be omitted.

=item B<--no-index-conversion> 

Don't use C<@index> instead of C<@entry> if the description is empty or
just C<\nopostdesc> or C<\glsxtrnopostpunc> (default).

=item B<--space-sub> I<value> or B<-s> I<value>

Substitute spaces in labels with I<value>.

=item B<--field-map> I<mappings> or B<-m> I<mappings>

Add source key to destination field label mapping. The argument
should be a comma-separated list of I<src-field>=I<dest-field>
pairs. This option is cumulative.

The deprecated B<--key-map> is a synonym of B<--field-map>.

=item B<--no-field-map>

Cancels all mappings applied with B<--field-map>.
The deprecated B<--no-key-map> is a synonym of B<--field-map>.

=item B<--internal-field-map> I<mappings>

Adds the given mappings to the default set of internal field to key mappings.
(For example, B<desc> is the internal field label of the
B<description> key.) This option is cumulative.

This option is only needed if the internal field label is supplied
in the argument of command such as C<\glssetnoexpandfield>.

=back

=head1 REQUIRES

Java 8 and a TeX distribution.

=head1 LICENSE

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

=head1 RECOMMENDED READING

The bib2gls manual:

        texdoc bib2gls

The glossaries-extra manual:

        texdoc glossaries-extra

The glossaries manual:

        texdoc glossaries

=head1 AUTHOR

Nicola L. C. Talbot,
L<https://www.dickimaw-books.com/>

=cut

