Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot-preview[bot] b0cd2e7928
Bump beautifulsoup4 from 4.9.1 to 4.9.3
Bumps [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) from 4.9.1 to 4.9.3.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-05 19:16:49 +00:00
5 changed files with 9 additions and 19 deletions

4
.gitignore vendored
View File

@ -11,7 +11,3 @@ __pycache__/
.editorconfig .editorconfig
.*.swp .*.swp
config.json config.json
config/
data/
config
data

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(Broken link)](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](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(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. 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.
### 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.
@ -58,3 +58,8 @@ Configuring mstdn-ebooks is accomplished by editing `config.json`. If you want t
| 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 (or quote) without closing it. | | 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 (or quote) without closing it. |
## 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.

View File

@ -1,10 +0,0 @@
{
"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

@ -62,8 +62,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+")) 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):
toot = functions.extract_toot(toot) toot = functions.extract_toot(toot)

View File

@ -1,4 +1,4 @@
Mastodon.py==1.5.1 Mastodon.py==1.5.1
markovify==0.8.2 markovify==0.8.2
beautifulsoup4==4.9.1 beautifulsoup4==4.9.3
requests==2.24.0 requests==2.24.0