microdotblog / microblog-mac

Micro.blog for Mac
https://micro.blog
MIT License
37 stars 6 forks source link

Instagram Alternative Import #16

Open keegsands opened 1 year ago

keegsands commented 1 year ago

Background

While helping my wife import her Instagram into micro.blog she ran into an unexpected behavior with the Instagram import feature. Most of her posts include several pictures and in the import dialog only the first image from each post is shown, so when she selected a few "pictures", clicked imported and ended up with over a dozen new blog posts she was surprised. I dug into the code and saw the import loops through all the media in each post and creates a separate blog post for each photo. I'm sure a majority of folks post only a single photo and this works great, and for those other folks the good news is all their photos are imported.

Changes

I made some very minor changes to the Instagram import so it will now just take the first photo from each Instagram post and create a new blog post in micro.blog with just that one image.

Next I made it so if the Instagram post had multiple photos then it will use the caption from the post rather than the photo, because in a multi-photo post there is a special caption in the parent object and the child photos are empty.

Finally, I updated the label for selected item count to say "post" instead of "photo" to better convey what is being imported.

Most Importantly

I don't expect these changes to actually be merged into the product since this new process does have some trade offs for those users that want to import ALL of their photos. I just figured this was the best way to communicate it back to you. I think it is so cool to be able to view the source code, understand the inner workings and then make this type of tweak (even if I'm not a native macOS developer). Thanks! Also if this just creates extra noise in your process please let me know and feel free to delete this PR.

selected-label

!

manton commented 1 year ago

Thanks! I'll check this out and see what makes sense to pull back into the app. Maybe a setting before import would be good to have more control over this.