syncing this with my previous fork

This commit is contained in:
Amber 2022-03-22 14:17:05 -05:00
parent 6cfe236526
commit 7ca6109f79
3 changed files with 13 additions and 8 deletions

View File

@ -8,7 +8,7 @@ This version makes quite a few changes from [the original](https://github.com/Je
- Doesn't unnecessarily redownload all toots every time - Doesn't unnecessarily redownload all toots every time
## FediBooks ## FediBooks
Before you use mstdn-ebooks to create your own ebooks bot, I recommend checking out [FediBooks](https://fedibooks.com). Compared to mstdn-ebooks, FediBooks offers a few advantages: Before you use mstdn-ebooks to create your own ebooks bot, I recommend checking out [FediBooks(Broken link)](https://fedibooks.com). Compared to mstdn-ebooks, FediBooks offers a few advantages:
- Hosted and maintained by someone else - you don't have to worry about updating, keeping the computer on, etc - Hosted and maintained by someone else - you don't have to worry about updating, keeping the computer on, etc
- No installation required - No installation required
- A nice UI for managing your bot(s) - A nice UI for managing your bot(s)
@ -25,7 +25,7 @@ Like mstdn-ebooks, FediBooks is free, both as in free of charge and free to modi
Secure fetch (aka authorised fetches, authenticated fetches, secure mode...) is *not* supported by mstdn-ebooks, and will fail to download any posts from users on instances with secure fetch enabled. For more information, see [this wiki page](https://github.com/Lynnesbian/mstdn-ebooks/wiki/Secure-fetch). Secure fetch (aka authorised fetches, authenticated fetches, secure mode...) is *not* supported by mstdn-ebooks, and will fail to download any posts from users on instances with secure fetch enabled. For more information, see [this wiki page](https://github.com/Lynnesbian/mstdn-ebooks/wiki/Secure-fetch).
## Install/usage Guide ## Install/usage Guide
An installation and usage guide is available [here](https://cloud.lynnesbian.space/s/jozbRi69t4TpD95). It's primarily targeted at Linux, but it should be possible on BSD, macOS, etc. I've also put some effort into providing steps for Windows, but I can't make any guarantees as to its effectiveness. An installation and usage guide is available [here(broken link)](https://cloud.lynnesbian.space/s/jozbRi69t4TpD95). It's primarily targeted at Linux, but it should be possible on BSD, macOS, etc. I've also put some effort into providing steps for Windows, but I can't make any guarantees as to its effectiveness.
### Docker ### Docker
While there is a Docker version provided, it is **not guaranteed to work**. I personally don't use Docker and don't know how the Dockerfile works; it was create over a year ago by someone else and hasn't been updated since. It might work for you, it might not. If you'd like to help update the Dockerfile, please get in touch with me on the Fediverse. While there is a Docker version provided, it is **not guaranteed to work**. I personally don't use Docker and don't know how the Dockerfile works; it was create over a year ago by someone else and hasn't been updated since. It might work for you, it might not. If you'd like to help update the Dockerfile, please get in touch with me on the Fediverse.
@ -64,8 +64,3 @@ Configuring mstdn-ebooks is accomplished by editing `config.json`. If you want t
| overlap_ratio_enabled | false | If true, checks the output's similarity to the original posts. | | 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. | | 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](https://ko-fi.com/lynnesbian) allows you to make one-off payments in increments of AU$3. These payments are not taxed.
- [PayPal](https://paypal.me/lynnesbian) allows you to make one-off payments of any amount in a range of currencies. These payments may be taxed.

10
config.def.json Normal file
View File

@ -0,0 +1,10 @@
{
"site": "https://botsin.space",
"cw": null,
"instance_blacklist": ["bofa.lol", "witches.town", "knzk.me"],
"learn_from_cw": false,
"mention_handling": 1,
"max_thread_length": 15,
"strip_paired_punctuation": false,
"website": "https://git.nixnet.services/amber/amber-ebooks"
}

View File

@ -69,7 +69,7 @@ if "secret" not in cfg:
print("Open this URL and authenticate to give mstdn-ebooks access to your bot's account: {}".format(client.auth_request_url(scopes=scopes))) print("Open this URL and authenticate to give mstdn-ebooks access to your bot's account: {}".format(client.auth_request_url(scopes=scopes)))
cfg['secret'] = client.log_in(code=input("Secret: "), scopes=scopes) cfg['secret'] = client.log_in(code=input("Secret: "), scopes=scopes)
json.dump(cfg, open(args.cfg, "w+")) open(args.cfg, "w").write(re.sub(",", ",\n", json.dumps(cfg)))
def extract_toot(toot): def extract_toot(toot):