Compare commits

..

No commits in common. "4c3f56bf2b9fabf0d9c9ebb5bf8776afab72f522" and "0c7af6afa6062df0a8fb07830c42b67fe4b320bc" have entirely different histories.

3 changed files with 5 additions and 6 deletions

View file

@ -4,11 +4,10 @@ REDDIT_AUTH_TOKEN=""
REDDIT_REFRESH_TOKEN=""
REDDIT_CLIENT_ID=""
REDDIT_CLIENT_SECRET=""
REDDIT_SUBREDDIT="ich_iel"
MASTODON_URL=""
MASTODON_EMAIL="mail@example.com"
MASTODON_PASSWORD="password"
MASTODON_EMAIL=""
MASTODON_PASSWORD=""
MASTODON_USER_ID=""
MASTODON_APP_NAME="Reddit Mastodon Crossposter"
MASTODON_APP_NAME=""
MASTODON_USER_SECRET="usercred.secret"
MASTODON_CLIENT_SECRET="clientcred.secret"

View file

@ -13,7 +13,7 @@
3. Initialize Mastodon.py with e.g. `masto.py` (please refer to the [Mastodon.py docs](https://mastodonpy.readthedocs.io)).
4. Set all `.env` variables if there are any remaining. (The code does not check for missing environment variables and assumes that everything is set correctly.)
4. Set all `.env` variables if there are any remaining.
5. Create a script `post_toots.sh` and make it executable `chmod +x post_toots.sh`:

View file

@ -26,7 +26,7 @@ mastodon = Mastodon(
# get recent posts to check for duplicates
last_posts = mastodon.account_statuses(getenv("MASTODON_USER_ID"), limit=15)
for submission in reddit.subreddit(str(getenv("REDDIT_SUBREDDIT"))).top(time_filter="day", limit=10):
for submission in reddit.subreddit("ich_iel").top(time_filter="day", limit=10):
# skip post if it is a stickied post
if (submission.stickied):
continue