User Tools

Site Tools


melanobot:configuration:formatterconfig

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
melanobot:configuration:formatterconfig [2015/05/10 18:48]
melanosuchus
melanobot:configuration:formatterconfig [2016/02/06 19:56] (current)
melanosuchus Document the new string syntax
Line 2: Line 2:
 A simple string format to be used in the config. A simple string format to be used in the config.
  
-Formatting options are in the form **#//option//#**.+Formatting options are in the form **%(//option//)**.
  
 Valid options: Valid options:
  
-  * (empty) -- A # character 
   * **-** -- Clears all formatting   * **-** -- Clears all formatting
   * **-** followed by **b**, **i** or **u** (or any combination of them) -- **bold**, //italic// or __underlined__ text   * **-** followed by **b**, **i** or **u** (or any combination of them) -- **bold**, //italic// or __underlined__ text
Line 13: Line 12:
     * **<color darkred>​dark_red</​color>​**     * **<color darkred>​dark_red</​color>​**
     * **<color darkgreen>​dark_green</​color>​**     * **<color darkgreen>​dark_green</​color>​**
-    * **<​color ​darkyellow>​dark_yellow</​color>​**+    * **<​color ​orange>​dark_yellow</​color>​**
     * **<color darkblue>​dark_blue</​color>​**     * **<color darkblue>​dark_blue</​color>​**
     * **<color darkmagenta>​dark_magenta</​color>​**     * **<color darkmagenta>​dark_magenta</​color>​**
Line 26: Line 25:
     * **<color cyan>​cyan</​color>​**     * **<color cyan>​cyan</​color>​**
     * **<color white>​white</​color>​** (white)     * **<color white>​white</​color>​** (white)
 +    * **nocolor** (resets to the default)
   * //n// -- A 3 bit color   * //n// -- A 3 bit color
     * **<color black>​0</​color>​**     * **<color black>​0</​color>​**
Line 36: Line 36:
     * **<color white>​7</​color>​** (7)     * **<color white>​7</​color>​** (7)
   * **x**//​NNN//​ -- A 12 bit color (single digit hex rgb components)   * **x**//​NNN//​ -- A 12 bit color (single digit hex rgb components)
 +
 +Placeholders:​
 +Subtrings in the form ''​$identifier''​ or ''​${identifier}''​ will be used as placeholders for values provided by the context in which that string is being used, if a value is not available, they will expand to an empty string.
 +
 +To insert a literal ''​$'',​ use ''​$$''​.
 +
  
 ===== Example ===== ===== Example =====
-''​Hello ​#-b#World#-##red#red #2#green #x00f#blue#-# ##1''​ becomes ''​Hello **World**! <color red>​red</​color>​ <color green>​green</​color>​ <color #​00f>​blue</​color> ​#1''​+''​Hello ​$(-b)World$(-)$(red)red $(2)green $(x00f)blue$(-1$$''​ becomes ''​Hello **World**! <color red>​red</​color>​ <color green>​green</​color>​ <color #​00f>​blue</​color>​ 1$''​
  
  
melanobot/configuration/formatterconfig.1431276539.txt.gz · Last modified: 2015/05/26 15:35 (external edit)