aahnik / tgcf

The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
https://github.com/aahnik/tgcf/wiki
MIT License
1.31k stars 783 forks source link

Remove line and Add line plugins #387

Closed cosinguyen closed 1 year ago

cosinguyen commented 1 year ago
cosinguyen commented 1 year ago

I'm glad to hear from @aahnik , If anyone is looking for plugins like the above, please upgrade to version 1.1.5 or higher:

  1. Remove line: The Replace plugin can be used to do it with a combination of Regex (https://regex101.com/r/lqryEN/1). My configuration: "(.*Test 1.*|.*Test 2.*|.*Test 3:.*|.*Test 4:.*)": "" Note that you can use "" on the left and "" on the right or "" only for one side, but it's important to have a space after the : for it to be recognizable. But in my above case I used : in the regex content, so I had to put "" on the left With my above configuration it deletes lines containing Test 1 or Test 2 or Test 3: or Test 4:

  2. Add line: He updated it as Caption plugin

  3. Format: I forgot that when we type normally in Telegram with characters like **Test** it was possible to bold and when I tested it was successful, no need to upgrade much more. However he did something I was quite surprised that he added a regex feature for formatting. Check it: https://github.com/aahnik/tgcf/wiki/Replace-Plugin and test Replace plugin with "(hello)": bold, all hello words in the content will be bold.

My current usage version is 1.1.5, you can try