Go to file
Kay Faraday 0ca511e848 simplify gen.py logic a bit 2022-08-12 00:34:13 +00:00
generators Reuse client and use client factory 2022-06-19 04:04:14 +02:00
requirements split requirements.txt into gpt2, markov, and base reqs 2021-07-26 05:45:45 +00:00
third_party add textsynth 2022-06-19 03:32:34 +02:00
.editorconfig don't create infinite loop threads, finally fixes #17 2019-05-04 16:44:57 +10:00
.gitignore broaden .gitignore 2021-07-26 06:03:29 +00:00
LICENSE-AGPL.md license compliance stuff and other changes 2021-07-26 04:52:44 +00:00
LICENSE-MPL relicense 2021-06-16 01:29:53 +00:00
README.md update README 2021-09-27 11:17:56 +00:00
config.defaults.json add textsynth 2022-06-19 03:32:34 +02:00
fetch_posts.py deduplicate user-agent setting code 2022-06-19 02:02:32 +00:00
gen.py simplify gen.py logic a bit 2022-08-12 00:34:13 +00:00
pleroma.py deduplicate user-agent setting code 2022-06-19 02:02:32 +00:00
reply.py license compliance stuff and other changes 2021-07-26 04:52:44 +00:00
schema.sql add basic migration support 2021-09-17 06:35:35 +00:00
utils.py deduplicate user-agent setting code 2022-06-19 02:02:32 +00:00

README.md

pleroma-ebooks

It's like @AgathaSorceress's mstdn-ebooks but it supports Pleroma better.

Secure Fetch

Secure fetch (aka authorised fetches, authenticated fetches, secure mode...) is not supported by pleroma-ebooks, and will fail to download any posts from users on instances with secure fetch enabled. For more information, see this wiki page.

Compatibility

Software Downloading statuses Posting Replying
Mastodon Yes Yes Yes
Pleroma Yes Yes Yes
Misskey Yes No No
diaspora* No No No
Others Maybe No No

Note: Bots are only supported on Mastodon and Pleroma instances. Bots can learn from users on other instances, but the bot itself must run on either a Mastodon or Pleroma instance.

pleroma-ebooks uses ActivityPub to download posts. This means that it is not dependant on any particular server software, and should work with anything that (properly) implements ActivityPub. Any software that does not support ActivityPub (e.g. diaspora*) is not supported, and won't work.

Configuration

Configuring pleroma-ebooks is accomplished by editing config.json. If you want to use a different file for configuration, specify it with the --cfg argument. For example, if you want to use /home/lynne/c.json instead, you would run python3 fetch_posts.py --cfg /home/lynne/c.json instead of just python3 fetch_posts.py

Setting Default Meaning
site https://botsin.space The instance your bot will log in to and post from. This must start with https:// or http:// (preferably the latter)
cw null The content warning (aka subject) pleroma-ebooks will apply to non-error posts.
learn_from_cw false If true, pleroma-ebooks will learn from CW'd posts.
ignored_cws [] If learn_from_cw is true, do not learn from posts with these CWs.
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.
strip_paired_punctuation false If true, pleroma-ebooks will remove punctuation that commonly appears in pairs, like " and (). This avoids the issue of posts that open a bracket (or quote) without closing it.
limit_length false If true, the sentence length will be random between length_lower_limit and length_upper_limit
length_lower_limit 5 The lower bound in the random number range above. Only matters if limit_length is true.
length_upper_limit 50 The upper bound in the random number range above. Can be the same as length_lower_limit to disable randomness. Only matters if limit_length is true.
overlap_ratio_enabled false If true, checks the output's similarity to the original posts.
overlap_ratio 0.7 The ratio that determins if the output is too similar to original or not. With decreasing ratio, both the interestingness of the output and the likelihood of failing to create output increases. Only matters if overlap_ratio_enabled is true.

Donating

Please don't feel obligated to donate at all.

  • Ko-Fi allows you to make one-off payments in increments of AU$3. These payments are not taxed.
  • PayPal allows you to make one-off payments of any amount in a range of currencies. These payments may be taxed.

License

This is released under the AGPLv3 (only) license, and based on Lynnesbian's fork which is under the MPL 2.0 license. See LICENSE-AGPL.md and LICENSE-MPL for details.

This means you must publish the source code of any ebooks bot you make with this. A link back to this repository on your bot's profile page or profile metadata will suffice. If you make changes to the code you need to link to your fork/repo instead