Skip to content

yinflying/apply_corrections

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 

Repository files navigation

apply_corrections

A weechat plugin to send a user's messages with corrections applied when they send a correction string (ex: s/typo/replacement).

INSTALL

put the apply_corrections.py to ~/.weechat/python/autoload and then restart the weechat.

USAGE

when you have send a wrong message to the channer,you could type 's/typo/replacement' to correct your message

│11:11 yinflying | this is a appply_corrections
│11:11 yinflying | s/appply/apply       <- Here are you have typed
│11:11 yinflying | this is a apply_corrections[repalce]  <- Here is corrected msg

OPTIONS

check_every

Interval, in seconds, between each check for expired messages. If set to 0 no check will be performed and all messages will be saved indefinitely.

data_timeout

Time, in seconds, before a message is expired. If set to 0 messages will never expire.

message_limit

Number of messages to store per nick. If set to 0 all messages will be saved until they expire.

print_format

Format string for the printed corrections (Default: "[corrected][tag]"). Variables allowed:

  • [nick]: The nick of the person who sent the messages.
  • [corrected]: The corrected text of the previous message(s).
  • [correction]: The correction (format: s/typo/replacement).
  • [original]: The original message before correction.
  • [pattern]: The "typo" portion of the correction.
  • [replacement]: The "replacement" portion of the correction.
  • [timestamp]: The timestamp of the original message.
  • [tag]: customized tag string message,defaut:[replace]

print_limit

Maximum number of lines to correct and print to the buffer. If set to 0 all lines that match the pattern will be printed.

Note: Setting check_every, data_timeout, message_limit, or some combination thereof to 0's will eat a lot of memory very quickly as it will drastically increase the size of the dictionary holding previous messages. Likewise, setting print_limit to 0 with a large number of saved messages will quickly fill your screen with a bunch of stuff should someone submit a generic enough correction string.

tag_msg :

Customeized tag string message for print_format [tag]

vaild_name:

control the valid nicks for applying correction

Default: "0"

Variables allowed:
"0"                 :allowed all nicks in all channel
"nick1,nick2,nick3" :allowed these nicks(usually contain yourself)

About

A weechat plugin to re-print a user's messages with corrections applied when they send a correction string (ex: s/typo/replacement).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%