Topic update: txtproc v0.4.0, last released 2016-01-16 (changes and downloads at https://github.com/phitsc/txtproc/releases).
FTR, here's a self-made txtproc man page generated from the executable output including version number, basic usage and complete function list:
FYI, txtproc is able to generate CRC32 checksums for strings -- a hard to find function in Windows environments, it seems (not counting online tools)...
[txtproc is] A command line tool for text processing.
FTR, here's a self-made txtproc man page generated from the executable output including version number, basic usage and complete function list:
Code:
txtproc version 0.4.0Usage: txtproc [options] [input text] --changes Print change history -e --execute Function to process the supplied text with-f --file Input file containing text to process-i --ignore-case Ignore case-l --list List available text processing functions-m --modify Modify the input file in-place-p --parameter Parameter to pass to processing function. Supply multiple times if necessary. -v --from-clipboard Read text to process from clipboard-x --to-clipboard Write processed text to clipboard --version Print version information -d --debug Print debug output-h --help This help information.[TEXT PROCESSING FUNCTIONS (use after -e):]Upper - Change input text to UPPER case.Lower - Change input text to lower case.Toggle - Toggle case of input text.Capital - Change Input Text To Capital Case.Sentence - Change input text to sentence case.Snake - Change input text to snake_case.Camel - Change input text to CamelCase.CRC32 - Calculate CRC of input text.MD5 - Calculate MD5 of input text.RIPEMD160 - Calculate RIPEMD160 of input text.SHA1 - Calculate SHA1 of input text.SHA256 - Calculate SHA-256 of input text.SHA512 - Calculate SHA-512 of input text.Checksum - Calculate all available checksums of input text.Count - Count number of characters, words and lines of input text.CountCharacters - Count number of characters of input text.CountWords - Count number of words of input text.CountWordOccurence - Count how many times each word occurs in the input text.CountSentences - Count number of sentences of input text.CountLines - Count number of sentences of input text.CountMore - Count number of characters, words, sentences and lines of input text.CountCharacterOccurence - Count how many times each character occurs in the input text.CountRegex - Count how many times the specified regular expression matches.RemoveEmptyLines - Removes empty lines from input text.RemoveExtraEmptyLines - Reduces consecutive empty lines to one empty line.RemoveDuplicateLines - Removes duplicate lines from input text.RemoveLinesContaining - Removes lines containing a specified sub-text from input text.RemoveLinesContainingRegex - Removes lines containing a specified regular expression from input text.SplitIntoLines - Split input text into lines using the specified separator string.JoinLines - Join lines of input text into one single line.AppendToLines - Append some text to each line of the input text.PrependToLines - Prepend (prefix) some text to each line of the input text.AddLineNumbers - Add line numbers to each line of input text.TrimLine - Removes a specified number of characters from the beginning and/or end of each line.RemoveWords - Removes a specified number of words from the beginning and/or end of each line.Strip - Removes whitespace from the beginning and/or end of each line.StripNonWordCharacters - Removes non-word characters from the beginning and/or end of each line.RemoveTo - Removes everything before and/or after the sub-text specified (optionally including it).ExtractColumn - Extracts the specified column delimited by the specified text out of each line.ReverseLines - Reverse order of lines within input text.ReverseSentences - Reverse order of sentences within input text.ReverseWords - Reverse order of words within input text.ReverseCharacters - Reverse order of characters within input text.ReverseCharactersWithinWords - Reverse order of characters within words of input text.Shuffle - Shuffle order of characters within input text.ShuffleWords - Shuffle order of words within input text.ShuffleLines - Shuffle order of lines within input text.ShuffleSentences - Shuffle order of sentences within input text.ShuffleWordsWithinSentence - Shuffle order of words within sentences of the input text.ShuffleWithinWords - Shuffle order of characters within words of the input text.Search - Search sub-text in input text.Replace - Replace sub-text in input text by a replacement.SearchRegex - Search sub-text in input text using a regular expression.ReplaceRegex - Replace sub-text in input text by a replacement text using a regular expression.SearchNonAscii - Search for non ASCII characters in input text.SearchDuplicateWords - Search the input text for consecutive words which have been duplicated.TabsToSpaces - Replace tabs by spaces such that characters following a tab align at respective tab stops.SpacesToTabs - Replace spaces with the optimal number of tabs (spaces and tabs at end of a line are removed).RemoveCharacters - Removes the specified set of characters from the input text.FlipUpsideDown - Flips the input text upside down (works only for supported characters).SortLines - Sort lines of input text alphabetically.SortLinesByLength - Sort lines of input text by line length.SortLinesByNumber - Sort lines of input text by first number found on each line.SortSentences - Sort sentences of input text alphabetically.SortWords - Sort words of input text alphabetically.Tweet - Break up input text into tweets.RemoveTags - Removes all tags from the input text.
Statistics: Posted by Midas — Thu Jan 18, 2024 8:43 am