Version 0.9.0-rc1

- enable/disable from slash command
- matching conditions (never, always, start, end, start or end)
- support capturing groups
- import examples
- testing capabilities
- compatibility with WoW Retail
- adapted help texts
- spelling errors
This commit is contained in:
2020-07-16 12:54:06 +02:00
parent cc4df96bac
commit bafb116bb9
39 changed files with 3043 additions and 1049 deletions

View File

@@ -1,8 +1,8 @@
# Grichelde - Text replacer
Grichelde is a WoW Classic Addon that replaces any characters or words you typed in a chatbox with any replacement text or word you specified.
You can define any search and replace text arbitrarily. The replacement is done **before** the text is send to others/in the target channel.
It does **not** change txt others have written in the chat/channel.
Grichelde is a WoW Classic Addon that replaces any characters or words you typed in a chatbox according to your replacement rules and text.
The replacement is done **before** the text is send to others/in the target channel. It does **not** change text others have written in the chat/channel,
but the text they will see **from you** when you sent it.
Its purpose it to simulate a speaking disability of your toon and hereby strengthen immersion in roleplay.
Initially started as a helper addon for a roleplaying friend, Grichelde can be used for much more, like
@@ -12,6 +12,9 @@ Initially started as a helper addon for a roleplaying friend, Grichelde can be u
* write out abbreviations for you
* create hilarious moments during roleplay
However it does not replace slash commands with other slash commands, it only works for chat text. It you want to replace commands,
please look at more sophisticated chat addons like [Prat](https://www.curseforge.com/wow/addons/prat-3-0).
## Disclaimer
#### No Warranty
The addon is provided "AS IS" and comes without warranty of any kind of function or correctness (for more details, consult the GPL 3 license).
@@ -35,19 +38,19 @@ Only slash commands, item links, textures, placeholders and ooc-markers are excl
#### My replacement is not taken.
After entering a search or replacement text, you see a button "Okay" next to yout input. This is **not** a validation message,
After entering a search or replacement text, you see a button "Okay" next to your input. This is **not** a validation message,
but the save button for text. This is a restriction from the UI library and can be seen in other addons as well.
Please click on "Okay" button to save the input permanently.
Please click on "Okay" to save the input permanently.
If it still does not work or gives you errors, please read the next question.
#### I have to disable the Addon frequently. Is there a more elegant solution
#### I have to disable the Addon frequently. Is there a more elegant solution?
Actually there are two solutions:
1. A right-click on the minimap button will disable Grichelde instantly. Right-click a second time will activate it again. Easy, isn't it?
2. You can disable Grichelde permanently and forcefully replace the sentence in the chatbox. I call it "Grichelde-On-Demand" :)
2. You can disable Grichelde permanently and forcefully replace a sentence in the chatbox with manual override. I call it "Grichelde-On-Demand" :)
In the chatbox put `/gri` or `/grichelde` in front of your typed text, you can also include the target channel,
i.e. `/gri /guild hello there` and Grichelde will apply the active replacements even if guild channel or Grichelde was disabled.
i.e. `/gri /guild hello there` and Grichelde will apply the active replacements and rules even if guild channel or Grichelde was disabled.
#### I get errors, what should I do?
@@ -56,13 +59,15 @@ You can bring up a small windows with your mapping by entering the `/gri mapping
#### Why that strange name?
Grichelde is the name of an Undead rogue without a jaw, who was played in RP sessions with a guild member.
She started replacing "s" and "t" letters manually for each line in the chat, which became cumbersome over time.
Grichelde is the name of an Undead rogue without a jaw, who was played in RP sessions by a guild member.
She started replacing `s` and `t` letters manually for each word in the chat, which became cumbersome over time.
(If you ever wondered how an Undead without a jaw sounds like, its really hilarious, you should try it.)
Without spelling errors, "Griselde" in German is an old-fashioned female first name.
#### I'm a Pro. Does it support regular expressions?
This is actually an unofficial feature. In general the searchText is passed in as Lua, so yes regex can be used in lookups.
There are two caveats: first, Lua does not support PCRE syntax, as it would bloat Lua's simplicity and performance (read [here](http://www.lua.org/pil/20.1.html) why).
Secondly, Grichelde does not support capture groups in the replacement text, so matches get lost.
RegEx are very powerful search and replacement patterns commonly used in programming. Technically all searches the addon performs on the input are done
with regular expression methods, however Lua unfortunately does not support full [PCRE](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) syntax and is very limited (read [here](http://www.lua.org/pil/20.1.html) why).
Nevertheless some patterns can be used like the anchors start of line `^` or end of line `$`, capturing groups `(hello) (world)`, character classes like numbers `%d` or (inversed) sets `[^%p]`.
Capture groups can be accessed in the replacement text with `%<number>` like in `%2 %1`. Also there are some mappings using RegEx in the Example section.