Summary
This is an Apple .shortcut file that will make it easier to subscribe to the community you are currently viewing. It was designed for Lemmy 0.18.0 and requires a device running Mac OS or iOS and using Safari to view Lemmy. You have to be on the community page you want to subscribe to when you invoke the shortcut.
[Update: I discovered this version doesn't work for iOS. A different action was needed to capture the URL in Safari. If you want to use this on iOS, Download this file instead. To make it work on iOS, you need to go into the shortcut and enable "Include on Share Sheet." Invoking it requires you to click the share button when you are on the community page that you want to subscribe to.]
Important: Be sure to edit the shortcut and change the Instance URL at the very top from lemmy.ninja (my home instance) to the URL of your home instance. If you don't do this, it will not work unless you are a registered user at Lemmy.ninja.
Overview
Today @chase@midwest.social asked for an Apple .shortcut file that would make it easier to subscribe. I've linked the file I built for him here.
Due to the way Lemmy is designed, you can't just visit a community and subscribe to it. You first have to search for that community at your home instance so that your instance will connect to the community, and then you can click the link in the search results to visit the community and subscribe to it.
This shortcut works by taking the link you are currently viewing in Safari and directing Safari to search for it at your home instance. You then have to click on the community link in the search results and click the subscribe button. (See Usage below.)
The shortcut was designed for Lemmy 0.18.0. I believe the search functionality changed between 0.17.4 and 0.18.0, so I doubt it will work for earlier versions.
I'm sure this shortcut will quickly become obsolete as Lemmy's UI improves and third-party apps get developed. Until then, this should help speed up the process of adding communities to your subscribed list.
Usage
Let's say you are reading through the All Communities feed at your home Lemmy instance and you come across a great post about a vintage Atari 2600, hosted at lemmy.sdf.org.
You want to subscribe to the community this post is in. In the screenshot you'll see the community name at the top there: Atari 8bit
. Click that link and it will take you to the community page at lemmy.sdf.org.
Here we are in the Atari 8bit
community. This is where you invoke the shortcut. I put my shortcut in the menu bar group so that it appears in the shortcuts menu. Invoke the shortcut now.
When you click on it, the shortcut will take you back to your home instance (provided that you configured the correct address in the first step of the shortcut file). It will take the URL from the Safari page you were on and search for that URL at your home instance. After a few seconds, you should see the name of the community appear in the search results.
Click on the community link. Then, go over to the sidebar and click on Subscribe
until you are successfully subscribed to the community.
Configuration
After you download the shortcut, you must edit the shortcut and change the first step. Change https://lemmy.ninja/
to the URL of your home instance. If you don't complete this configuration step, the shortcut will not work for you unless you happen to be a registered user of Lemmy.ninja.
After that, the shortcut is ready to use and should be available on all devices connected to your iCloud account. If you're using MacOS, I suggest that you drag and drop the shortcut box into the Menu Bar
group to make it easy to access. I have only ever used shortcuts on my iPhone via Siri, so I have no idea where the most convenient location would be on iOS.