added documentation and default value for as of yet unimplemented paired punctuation stripping functionality (#25)
This commit is contained in:
parent
86bbfb442b
commit
a19d429841
|
@ -31,3 +31,4 @@ Configuring mstdn-ebooks is accomplished by editing `config.json`.
|
||||||
| learn_from_cw | false | If true, mstdn-ebooks will learn from CW'd posts. |
|
| learn_from_cw | false | If true, mstdn-ebooks will learn from CW'd posts. |
|
||||||
| mention_handling | 1 | 0: Never use mentions. 1: Only generate fake mentions in the middle of posts, never at the start. 2: Use mentions as normal (old behaviour). |
|
| mention_handling | 1 | 0: Never use mentions. 1: Only generate fake mentions in the middle of posts, never at the start. 2: Use mentions as normal (old behaviour). |
|
||||||
| max_thread_length | 15 | The maximum number of bot posts in a thread before it stops replying. A thread can be 10 or 10000 posts long, but the bot will stop after it has posted `max_thread_length` times. |
|
| max_thread_length | 15 | The maximum number of bot posts in a thread before it stops replying. A thread can be 10 or 10000 posts long, but the bot will stop after it has posted `max_thread_length` times. |
|
||||||
|
| strip_paired_punctuation | false | If true, mstdn-ebooks will remove punctuation that commonly appears in pairs, like " and (). This avoids the issue of posts that open a bracket without closing it. |
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"lang": "en",
|
|
||||||
"site": "https://botsin.space",
|
"site": "https://botsin.space",
|
||||||
"cw": null,
|
"cw": null,
|
||||||
"learn_from_cw": false,
|
"learn_from_cw": false,
|
||||||
"mention_handling": 1,
|
"mention_handling": 1,
|
||||||
"max_thread_length": 15
|
"max_thread_length": 15,
|
||||||
|
"strip_paired_punctuation": false
|
||||||
}
|
}
|
||||||
|
|
3
main.py
3
main.py
|
@ -20,7 +20,8 @@ cfg = {
|
||||||
"instance_blacklist": ["bofa.lol", "witches.town", "knzk.me"],
|
"instance_blacklist": ["bofa.lol", "witches.town", "knzk.me"],
|
||||||
"learn_from_cw": False,
|
"learn_from_cw": False,
|
||||||
"mention_handling": 1,
|
"mention_handling": 1,
|
||||||
"max_thread_length": 15
|
"max_thread_length": 15,
|
||||||
|
"strip_paired_punctuation": False
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.update(json.load(open('config.json', 'r')))
|
cfg.update(json.load(open('config.json', 'r')))
|
||||||
|
|
Loading…
Reference in New Issue