The shortcut accepts anything (note: I should probably make this less “receptive” because in iOS 13 shortcuts appear in a lot of places they don’t always belong, but I’m not re-writing anything until iOS 13 officially ships.) Right away this is a big assumption because we are trusting the user to give us the correct kind of data (specifically, a URL). I’ll include a screenshot because it might help some folks understand how to make it, but it’s about as simple as shortcuts get: That’s why I have the push notification in step #7, so I know when it’s safe to send another URL. If you run the shortcut twice in rapid succession, it’s possible that your second URL might get added to the text file in the split-second after it is processed and before it is deleted, and your URL would be lost. I make no attempt to determine whether or not the URL is actually a video URL or not. If you ask Downie to download something that isn’t a video, it probably won’t work right. In step #5, you could use youtube-dl instead of Downie. In step #3 you could use launchd or Hazel. I chose Dropbox because that was the easiest way for me to do it, and I know that even if my Mac is offline for some reason (which is almost never is) or if Dropbox isn’t running on my Mac (which it almost always is), this will still work. Heck, you could probably use Shortcuts’ built-in “Run SSH Command” to send the URL to a text file directly. If you use ShellFish you could probably use Shortcuts to save the file directly to your Mac via SFTP, rather than using any cloud storage at all. In step #2, you could use iCloud instead of Dropbox. I’m not going to describe the only way to do this, because there are lots of ways to do this. When the script is finished, it deletes the original text file and waits for it to be re-created.Ī push notification is sent to tell me the video has been downloaded Those URLs are passed to Downie which has been previously configured to save videos to a different Dropbox folder. Somewhere, a Mac notices that the file has been created/modified.Ī shell script is triggered which looks for URLs in the text file. The Shortcut saves the URL to a text file in Dropbox. On my iPhone or iPad, send a URL to a Shortcut. I always like to explain the “concept” before I get into the nitty-gritty details of how it’s done. There has been approximately 4,371% more interest in this script than anything I have written on the Internet in the past 20 years, so I thought I should publish it somewhere I can point people to. On Mac Power Users #493 I made an off-hand reference to a script-and-shortcut that I use to save YouTube videos from my iOS device into a Dropbox folder that I later view on my Apple TV using Infuse.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |