Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach first 4 image URLs to the post #47

Merged
merged 2 commits into from
May 22, 2024
Merged

Attach first 4 image URLs to the post #47

merged 2 commits into from
May 22, 2024

Conversation

Jcps
Copy link
Contributor

@Jcps Jcps commented Dec 18, 2022

I wanted to have my images auto-attach to the Mastodon post, as I want to post more image and description only posts.

I added a new config 'include_images' to the feed config, as well as the initial questionnaire. If this is enabled, requests pulls down the first 4 images found in <i> tags and uploads those as media via the Mastodon.media_post(media_file, mime_type=None) method in the Mastodon API.

I, personally, am setting up two tags on my Micro.blog, so that all my posts are defined as a photos post or a blog post, and separated into two different feeds. I then have two feeds configured in my .feediverse file with different templates.

- template: 'New Blog Post: {title} {link} {hashtags}'
  url: https://blog.jacksampson.info/categories/syndicate/feed.xml
  include_images: false
- template: '{summary}'
  url: https://blog.jacksampson.info/categories/photos/feed.xml
  include_images: true```

@edsu
Copy link
Owner

edsu commented May 22, 2024

Better late than never?

@edsu edsu merged commit 9bdd1d0 into edsu:master May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants