CASEFIX(1)                                                            DIALOG(1)



NAME
       casefix - modifies the text casing of text

SYNOPSIS
       casefix -option [option_parameter]...[-nth_option [nth_option_parameter]] [objects of command]

       casefix -option [option_parameter]...[-nth_option [nth_option_parameter]]
 
       lowercaseall [-option option_parameter]...[-nth_option [nth_option_parameter]] [objects of command]
       
       caseaspropernouns [-option option_parameter]...[-nth_option [nth_option_parameter]] [objects of command]
       
       capall [-option option_parameter]...[-nth_option [nth_option_parameter]] [objects of command]
       switchcaseall [-option option parameter]...[-nth option [nth option parameter]] [objects of command]
       
       wackycase [-option option_parameter]...[-nth_option [nth_option_parameter]] [objects of command]
       
       prepsentences [-option option_parameter]...[-nth_option [nth_option_parameter]] [objects of command]

DESCRIPTION
       The casefix command is a WYAFIWYG style text casing editor program that can modify the text casing of a alphabetic character, alphanumeric group of characters (word, we shall refer to alphanumeric groups of characters as words thoughout most of the rest of this document for the sake of brevity), list, string, char array, or stream of words according to several user selectable modes including a custom mode.

       The casefix command is a command line implementation of libcasefix and serves as one of the example programs for developers who wish to utilize libcasefix.

       If you invoked casefix by one of its supported aliases, all options are the same except that no mode option is required. 

       The modes that the casefix command has are:
 
       lowerall (option 1) - lower cases all alphabetic characters. Apropos to regular words which do not begin sentences nor are proper nouns, nor the pronoun "I", in preparation of running another casefix function / routine over same set of words.

       nominate (option 2) - cases the words in the case of proper nouns, that is the first alphabetic character of every word, lower casing all other alphabetic characters. Apropos to names of people and other proper nouns, words that begin sentences, first and significant words in titles, and the pronoun "I". nominate is more preferable than custom mode equivalent; it doesn't need to check the casing template every character.

       capall (option 3) - capitalizes all alphabetic characters apropos to important notices, Apropos uses: signage, names of regulatable people and entities.

       switchcaseall (option 4) - changes the case of all alphabetic characters regardless of original casing. Apropos to differentiating two things with same name, ie. file names, correcting files where the <caps lock> button was incorrectly on the whole time of creation.  

       wackify (option 5) - changes the case of alphabetic characters in a pseudo-random way. Apropos to wackiness.

       custom (option 6) - cases words according to a user supplied casing template. Apropos to BiCapitalization, camelCasing character blocks (words) where non-last subword lengths are the same, as well as other custom uses

       prepsentences (option 7) - cases sentences in the fashion of prose sentences, that is the first alphanumeric character of the first word is capitalized if it is an alphabetic character and lower cases all other alphabetic characters until it reaches a sentence delimiter. The sentence delimiters are the "." - period, the "?" - question mark, and the "!" - exclamation point.

       Be advised that prepsentences does not necessarily case sentences properly given the vagaries and the various styles of written language. It does not have grammer parsing capability beyond that described here nor does it differentiate proper nouns from other words. In other words, it runs over proper nouns which are not the first word of a sentence. It still may be useful in that it may be easier to prepsentence the text and then correct the sentences, perhaps using an editor that incorporates a libcasefix tool, rather than making case correction some other way. 

OPTIONS
       -a,--about : about and other information

       -h,--help : a simple help screen

       -i [path]filename : input file. The default input is from stdin.

       -o [path]filename : output file; casefix always opens the output file in append mode and creates the output file if it doesn't exist. The default output is to stdout.

       -1 : lowerall mode - lower cases all alphabetic characters

       -2 : nominate mode - cases the words in the case of proper nouns, that is capitalizing the first alphabetic character of every word, lower casing all other alphabetic characters

       -3 : capall mode - capitalizes all alphabetic characters

       -4 : switchcaseall mode - changes the case of all alphabetic characters regardless of original casing
 
       -5 : wackify mode - changes the case of alphabetic characters in a pseudo-random way

       -6 casingtemplatestring : custom mode -  cases words according to a user supplied casing template. casefix cases the character in the incoming word according to the template. The function uses the following code to indicate how each character should be cased:

                U or u - character should be upper case
                L or l - character should be lower case
                     = - leave character unchanged
 
              So a template string, say "Uu=lL" would, for every word, capitalize the 1st and 2nd charters and lower cases the 4th and 5th character, and leave the 3rd character unchanged. All characters in a word thats position is past the end of the template string, are left unchanged. All non-alphanumeric characters are passed to the output stream unchanged and act as word seperaters.

       -7 : prepsentences mode - cases sentences in the fashion of prose sentences, that is the first alphanumeric character of the first word is capitalized if it is an alphabetic character and lower cases all other alphabetic characters until it reaches a sentence delimiter. The sentence delimiters are the "." - period, the "?" - question mark, and the "!" - exclamation point.

       -l - report libcasefix version

OTHER NOTES
       If the casefix program receives data on the command line that is not an option nor associated with an option (following all options), casefix will take what follows the options as objects of the command, and will casefix them according to the parameters of the invocation.

       A mode option is required for casefix to run, unless invoke it by one of its aliases.

       Casefix can receive input objects via the commandline (or xargs), stdin (either the console or from a pipe from other programs) or from a specified file.
       If casefix is run to take its input from stdin other than the command line, do not expect the casefix program to finish running until a EOF (<CONTROL><D> on many systems) is sent. <CONTROL><C> will abort casefix but if an output file is specified, do not expect casefix to close (save) the file properly. If you have to save output to a file while inputing from stdin (either the console or via a pipe) when no EOF is to be forth coming, and an exit must be triggered by an abort; do something like this:

EXAMPLES
                      casefix -somemode | cat > filename

       To do a custom mode casefix, where the 2nd and 4th letter of each word are to be capitalized and the 1st and 6th letter are to be in the lower case and leave all other characters unchanged, taking and saving to separate files:

              casefix -i inputfilename -o outputfilename -6 lu=u=l

COMPATIBILITY
		Casefix only changes the case of certain alphabetic characters and passes all other characters unchanged. casefix neither deletes or adds to.the input. Also being ANSI / ISO C90 compliant (with provisions to compile with older C compilers in a ANSI / ISO C90 compliant way, in source), the casefix program should function on all platforms according to the description in this man page.
		
		Casefix supports several character sets, currently only one byte character sets supported by the libc version and locale it is compiled under and for. Also UTF-8 is supported for ASCII compatible characters only.
		
		All files and streams emitted should also be compatible with whatever platform it is run on.
BUGS
	   No known bugs. Send bug reports to 

AUTHOR
       Jerry Brandenberger (jbrandenberger@gmail.com)

MAINTAINER


SEE ALSO
       libcasefix Programmer's Reference Guide, in the casefix Application Developer's Kit

$Date: 2013/01/29 14:19:32 $                                         CASEFIX(1)
