txtproc is a command line tool to do various text transformations. It is called with some text to transform and a transformation function as input and will return the transformed text as output. For some of the transformation functions additional parameters must be provided as well.
Input text can be supplied:
on the command line
via a file (using the --file parameter)
from stdin when txtproc is used in a pipeline
via the clipboard (built-in on Windows or using a tool like xclip on Linux)
Output text can go:
to stdout, i.e. the console window or another tool in a pipeline (which again can be txtproc)
back to the input file (i.e. modifying the input file)
a new file (using redirection, i.e. the > symbol)
back to the clipboard (built-in on Windows or using a tool like xclip on Linux)
Yes, that is Clink. It's already listed on cli.portablefreeware.com as a CMD extension. I use it frequently but also use PyCmd, ConEmu, and Console2 at times. I use Clink more often because it's very fast, can be injected into a CMD window, keeps command history, can be customized, and can open paths as a parameter on launch. I probably would use Greg's Dos Shell instead because it has a lot of good features, but it since can't open paths as a parameter, that is a serious limitation.
Yes, I made a screenshot. The developer doesn't include a screenshot on the program's homepage.
I've known about texproc since it was first released and have used it in various scripts without a problem.
Yes, that is Clink. It's already listed on cli.portablefreeware.com as a CMD extension. I use it frequently but also use PyCmd, ConEmu, and Console2 at times. I use Clink more often because it's very fast, can be injected into a CMD window, keeps command history, can be customized, and can open paths as a parameter on launch. I probably would use Greg's Dos Shell instead because it has a lot of good features, but it since can't open paths as a parameter, that is a serious limitation.
Yes, I made a screenshot. The developer doesn't include a screenshot on the program's homepage.
I've known about texproc since it was first released and have used it in various scripts without a problem.
Thanks. I know about clink. It is a great tool. I just saw the window title and thought that there was a clink replacement shell or something I didn't know about . I looked into the release zip file and found the batch file with the window title! I got excited for nothing!
webfork wrote: ↑Wed Apr 29, 2020 5:35 pm
It looks like alpha status from the version number, but I don't know. Hence the question mark.
If I go by my experience, version numbers are next to useless in most cases.
Subjectivity in interpreting quality: what "alpha/beta quality" means to the developer:
Some accept that bugs are facts of life so they are more likely to "upgrade" the designation:
Crashes all the time = alpha.
Buggy, but mostly works = beta.
Occasional non-fatal bugs = release quality.
Some are more strict or are used to working in a strict professional environment. I think they may see things differently:
Can lose your work under any circumstances/Not basic-function-complete = alpha/no go.
Works without trouble, but may gracefully act weird/require workarounds by the client/user on some circumstance = beta. No crashes or lost work.
Water-tight and covers all the edge the developer can possibly think of = release quality. (Critical bugs in production jokes aside).
Type of software:
Data-reading tools: what if your music player kept crashing? You'd curse it and switch to another one.
Data-writing tools: what if your text editor crashes, or if your audio tagger saved malformed tags. You lost work or have to spend some/a lot of time correcting the issue.
And then, what if a low-level disk utility had a nasty bug and horribly mangled all your data!
Tempering expectations: even if the developer thinks the product is good, they may not want other to be too confident when dealing with it or send them angry emails.
How important does a developer see an addition to justify a major (number) upgrade of the version. "Now you can export to CSV! Version increased to 9.0 from 8.2"
Some ignore the whole model and use versions as they please: Chrome v80, using dates as versions, etc. Some start at version 1.0 no matter how polished the product is.
---------------------------------------------------
Some examples:
Cherrytree is still on version 0.39.
uutils coreutils (Gnu coreutils in one Windows executable, stay tuned ) is working alright at version 0.0.1.
Everything with a ton of features is still at version 1.4.
foobar2000 is similarly at 1.5.
FBReader (that I recommended to you here) left at 0.12 has more features than many other EPUB readers.
IMHO, version numbering is just like the odometer in your car -- it's good to tell you how fast you're going (or even if you're moving at all, when it's dark all around ) but little help if all you want is to know when you'll be at your destination...
I tested this out a bit and really liking it. I can definitely see a lot of uses in my daily work. A comprehensive list of actions:
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 the sub-text).
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 input text.
Search - Search sub-text in input text.
Replace - Replace sub-text in input text by a replacement text.
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 their respective tab stops.
SpacesToTabs - Replace spaces with the optimal number of tabs (spaces and tabs at the 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.
txtproc version 0.4.0
Usage: 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.
FYI, txtproc is able to generate CRC32 checksums for strings -- a hard to find function in Windows environments, it seems (not counting online tools)...