Monitor the clipboard, filter the specified characters when writing to the clipboard, and support variable and regular expression to replace the matched text.
- Release version
$\text{v}1.0.0$ ;
- Fixed some bugs and logic flaws;
- Added status bar and log box;
- Removed C-style escape characters (can be replaced by variables);
- Added support for variables;
- Release version
$\text{v}1.1.0$ ;
- Fixed an issue where variables were not being parsed in some controls;
- Added
beforeandafterbuttons; - Cancel the display of the date of each log in the log bar;
- Added the result of variable parsing will be displayed in the log bar;
- Added background color for icons;
- Release version
$\text{v}1.1.1$ ;
- Fixed some bugs and logic vulnerabilities;
- Added a small floating window;
- Added a
shrink to floating windowbutton in the title bar; - Improved log output;
- Added multiple variables for base conversion, text conversion, random selection, etc., and
parse,buffer; - Added
MatchOptionsto choose whether to be case-sensitive; - Released version
$\text{v}1.1.2$ ;
git clone https://github.com/huanhuanonly/ClipboardFilter.git Click to download the executable file
ClipboardFilter.exe, which can be run by double-clicking it.
It is packaged using Enigma Virtual Box, and it's normal for the firewall to report a virus. If you are concerned, please choose the second method.
You need to download all files in the ./bin/v1.1.2/ directory.
Additionally, regardless of the method used, your configuration file will be stored in %temp%/ClipboardFilter.ini.
If you are using a system other than Windows, you will need to compile it manually.
Currently, writing, testing, and maintenance work are being done on the Windows platform.
- Filtering characters
Just add the characters that need to be filtered in the input field of Character set to use for filtering. The order of input is not important.
- Replace the matched pattern string
Use the insert button in the Replacer's Rule Item group to insert and set the corresponding rules, which will be matched and replaced in order.
Variables are parsed before each use and will be parsed as a specific string, which is also used for special character replacement.
${ variable-name [: parameter] } variable-names are case-insensitive.
-
env: Get an environment variable;-
param: The name of the environment variable to retrieve. - For example:
${env:WINDIR}might returnC:\WINDOWS.
-
-
file: Get the text content from a file;-
param: The file path that includes the filename. - For example:
${file:C:\file.txt}, note that only the first:acts as a separator.
-
-
clipboard: Get text data from the clipboard (before replacement);
hourminutesecondmsecyearmonthdayweekdateparam: (optional) format.
timeparam: (optional) format.
datetimeparam: (optional) format.
escape: Get the character corresponding to C-style escape sequences;param: C-style escape sequence, for example,\nis a newline.
linebreak: Alternative for newline;param: (optional)CRLF(default on Windows) orLF(default on other systems).
unicode: Get the character corresponding to Unicode encoding;param: A non-negative integer, Unicode encoding.
-
tounicode: Input a string of text and convert it to Unicode codes, separated by spaces.-
param: Input text. - For example:
${tounicode:abc}returns97 98 99.
-
-
tohtml: Input a string of text and convert it to HTML escape sequences.-
param: Input text. - For example:
${tohtml:<abc>}returns<abc>.
-
-
hex: Input a non-negative integer and convert it to hexadecimal.-
param: Non-negative integer. - For example:
${hex:5201314}returns4f5da2.
-
-
oct: Same as above, convert to octal. -
bin: Same as above, convert to binary. -
dec: Same as above, convert to decimal.
-
random: Get a random number within a specified range (integer);-
param: (optional) Two formats:-
lowerBound, upperBound: Returns a random number in the range$\left[lowerBound, upperBound\right]$ . -
upperBound: Returns a random number in the range$\left[0, upperBound\right]$ .
-
- For example:
-
${random}returns a$64$ bit random number; -
${random:-10,99}returns a random number in the range of$-10$ to$99$ (inclusive); -
${random:99}returns a random number in the range of$0$ to$99$ (inclusive).
-
-
-
rsoc: Short forRandomlySelectOneChar, randomly select one character.-
param: Character set. - For example:
${rsoc:abc}might return any of the charactersa,b, orc.
-
-
rsow: Short forRandomlySelectOneWord, randomly select one word.-
param: Word set, can be separated by any English punctuation and whitespace. - For example:
${rsow:like,love}might return eitherlikeorlove.
-
-
rsol: Short forRandomlySelectOneLine, randomly select one line.-
param: Line set, separated by newline characters.
-
-
index: Returns the last result plus one. The first call returns the integer$1$ .-
param: (optional) a string, multiple indexers can be used. - For example:
-
${index}, ${index} and ${index}returns1, 2 and 3; -
${index:a}, ${index:a} and ${index:b}returns1, 2 and 1; -
${index:a}, ${index:b}, ${index:a}, ${index:b}returns1, 1, 2, 2.
-
-
-
iota: Returns a continuous subsequence;-
param: A string, if both ends are digits, returns a series of numbers, otherwise returns a series of characters; - For example:
-
${iota:15}returns15, numeric sequences must be separated by non-numeric characters, or they will be treated as a single number; -
${iota:1-5}returns1-2-3-4-5; -
${iota:5-1}returns5-4-3-2-1; -
${iota:10+=13}returns10+=11+=12+=13; -
${iota:ae}returnsabcde; -
${iota:a,e}returnsa,b,c,d,e; -
${iota:e,a}returnse,d,c,b,a; -
${iota:aUc}returnsaUbUc, treating all characters except the first and last as separators.
-
-
-
shuffle: Shuffle the order of the text.-
param: Text. - For example:
${shuffle:ILoveYou}might returnoYeLIuov.
-
-
sort: Sort the text.-
param: Text. - For example:
${sort:ILoveYou1314}returns1134ILYeoouv.
-
-
reverse: Reverse the text.-
param: Text. - For example:
${reverse:ILoveYou1314}returns4131uoYevoLI.
-
-
hash: Map the text to a hexadecimal hash value based on themd5algorithm.-
param: Text. - For example:
${hash:ILoveYou1314}returnsc52393bda98d849cc966a830f17f4cab.
-
-
tolower: Convert text to lowercase.-
param: Text. - For example:
${tolower:ILoveYou1314}returnsiloveyou1314.
-
-
toupper: Convert text to uppercase.-
param: Text. - For example:
${toupper:ILoveYou1314}returnsILOVEYOU1314.
-
-
trimmed: Trim whitespace from both ends of the text.-
param: Text. - For example:
${trimmed: ILoveYou1314 }returnsILoveYou1314.
-
-
simplified: Trim whitespace from both ends and replace each sequence of internal spaces with a single space.-
param: Text. - For example:
${simplified: I Love You 1314 }returnsI Love You 1314.
-
-
parse: Parse variables within the text, supporting nesting.-
param: Text. - For example:
${parse:${buffer}}.
-
-
buffer: Get the text from the buffer.
After each rule replacement, the result is temporarily stored in the buffer. After all rule replacements are completed, the final result is written to the clipboard at once.
. │ .gitignore │ ClipboardFilter.exe │ ClipboardFilter.pro │ ClipboardFilter.pro.user │ LICENSE │ README.md │ README_zh-CN.md │ ├─bin │ ├─v1.0.0 │ │ ClipboardFilter_1.0.0.exe │ │ │ ├─v1.1.0 │ │ │ ClipboardFilter_1.1.0.exe │ │ │ │ │ └─... │ │ │ ├─v1.1.1 │ │ │ ClipboardFilter_1.1.1.exe │ │ │ │ │ └─... │ │ │ └─v1.1.2 │ │ ClipboardFilter_1.1.2.exe │ │ │ └─... │ ├─build │ ├─data │ │ res.qrc │ │ │ ├─Font │ │ CascadiaCode.ttf │ │ │ ├─Icon │ │ exit.svg │ │ MainIcon.ico │ │ MainIcon.png │ │ MainIcon.svg │ │ shrink.svg │ │ topmost.svg │ │ topmost2.svg │ │ │ ├─Screenshot │ │ home.png │ │ home_1.1.1.png │ │ │ ├─Source │ │ MainIcon.ai │ │ Shrink.ai │ │ │ ├─Ts │ │ ClipboardFilter_zh_CN.ts │ │ │ └─Ui │ maindialog.ui │ ├─include │ ClickableLabel.h │ Exception.h │ Logger.h │ MainDialog.h │ MainFloatingWindow.h │ StatusBarLabel.h │ TextEditWithVariables.h │ TextReplacer.h │ TextReplaceRuleListView.h │ Titlebar.h │ Trie.h │ VariableParser.h │ VariablesShader.h │ └─src Logger.cpp main.cpp MainDialog.cpp MainFloatingWindow.cpp TextReplaceRuleListView.cpp VariableParser.cpp Copyright huanhuanonly. All rights reserved.
