<commit_before>.\" #
.\" # Copyright (c) 2015, Juniper Networks, Inc.
.\" # All rights reserved.
.\" # This SOFTWARE is licensed under the LICENSE provided in the
.\" # ../Copyright file. By downloading, installing, copying, or 
.\" # using the SOFTWARE, you agree to be bound by the terms of that
.\" # LICENSE.
.\" # <NAME>, July 2015
.\" 
.Dd July 9, 2015
.Dt XOPO 1
.Os
.Sh NAME
.Nm xopo
.Nd turn libxo format strings into simplified form
.Sh SYNOPSIS
.Nm
.Op Fl options
.Sh DESCRIPTION
The
.Nm
utility simplifies libxo format strings into the form used for
.Xr gettext
lookups by the
.Nm libxo
library.
Using
.Nm ,
users can turn
.Em .pot
files generated by
.Xr xgettext
into data useful for libxo-enabled applications.
.Pp
Since
.Xr gettext
uses the string as the key into the message catalog,
.Nm libxo
uses a simplified version of the format string that removes
unimportant field formatting and modifiers, stopping minor formatting
changes from impacting the expensive translation process.
A developer
change such as changing "/%06d" to "/%08d" should not force hand
inspection of all .po files.
.Pp
.Nm
inspects the input file, looking for lines that begin with "msgid"
which carry format strings as the remainder of the input line.
These strings are passed to
.Nm libxo
for simplification and the resulting strings are replaced into the
output stream, allowing
.Nm
to operated as a filter.
.Pp
.Bl -tag -width "12345678901234567"
.It Fl "-simplify OR -s <text>"
Generate the simplified version of a single text string.
.It Fl "-po OR -f <pofile>"
Use the given po file for input.
.It Fl "-help"
Display this help text
.It Fl "-output OR -o <file>"
Write output content to the given file
.It Fl "-warn OR -W"
Generate warnings while parsing the format strings
.It Fl "-version"
Display version information
.El
.Pp
.Sh EXAMPLE
.Bd -literal<commit_msg>fix option .man issues<commit_after>.\" #
.\" # Copyright (c) 2015, Juniper Networks, Inc.
.\" # All rights reserved.
.\" # This SOFTWARE is licensed under the LICENSE provided in the
.\" # ../Copyright file. By downloading, installing, copying, or 
.\" # using the SOFTWARE, you agree to be bound by the terms of that
.\" # LICENSE.
.\" # <NAME>, July 2015
.\" 
.Dd July 9, 2015
.Dt XOPO 1
.Os
.Sh NAME
.Nm xopo
.Nd turn libxo format strings into simplified form
.Sh SYNOPSIS
.Nm
.Op Fl options
.Sh DESCRIPTION
The
.Nm
utility simplifies libxo format strings into the form used for
.Xr gettext
lookups by the
.Nm libxo
library.
Using
.Nm ,
users can turn
.Em .pot
files generated by
.Xr xgettext
into data useful for libxo-enabled applications.
.Pp
Since
.Xr gettext
uses the string as the key into the message catalog,
.Nm libxo
uses a simplified version of the format string that removes
unimportant field formatting and modifiers, stopping minor formatting
changes from impacting the expensive translation process.
A developer
change such as changing "/%06d" to "/%08d" should not force hand
inspection of all .po files.
.Pp
.Nm
inspects the input file, looking for lines that begin with "msgid"
which carry format strings as the remainder of the input line.
These strings are passed to
.Nm libxo
for simplification and the resulting strings are replaced into the
output stream, allowing
.Nm
to operated as a filter.
.Pp
.Bl -tag -width indent
.It Ic --simplify | Ic -s Ar text
Generate the simplified version of a single text string.
.It Ic --po | Ic -f Ar pofile
Use the given po file for input.
.It Ic --help
Display this help text
.It Ic --output | Ic -o Ar file
Write output content to the given file
.It Ic --warn | Ic -W
Generate warnings while parsing the format strings
.It Ic --version
Display version information
.El
.Pp
.Sh EXAMPLE
.Bd -literal
{'fraction_non_alphanumeric': 0.07878461952137672, 'fraction_numerical': 0.01425114278031729, 'mean_word_length': 3.547677261613692, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6288441', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1116, 'n_words': 597}