Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.apps > #46763 > unrolled thread
| Started by | Chris Schram <chrispam1@me.com> |
|---|---|
| First post | 2023-10-08 20:16 +0000 |
| Last post | 2023-10-09 09:12 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.sys.mac.apps
Shortcuts and JSON help Chris Schram <chrispam1@me.com> - 2023-10-08 20:16 +0000
Re: Shortcuts and JSON help Jolly Roger <jollyroger@pobox.com> - 2023-10-08 20:38 +0000
Re: Shortcuts and JSON help Chris Schram <chrispam1@me.com> - 2023-10-09 09:12 +0000
| From | Chris Schram <chrispam1@me.com> |
|---|---|
| Date | 2023-10-08 20:16 +0000 |
| Subject | Shortcuts and JSON help |
| Message-ID | <ufv2m4$h5d$1@solani.org> |
A few things first: I live in an area where "high=speed Internet" means early 1950s copper wire. Fortunately our local public library has the good stuff. I recently updated my iMac to macOS Sonoma, and have been trying to play with the Aerial screen savers. This is mostly a fool's errand, as all my available bandwidth gets sucked up, and I can't do anything else online. I have a MacBook Air that's stuck at macOS Monterey that I can take to the aforementioned library. That along with the contents of the file... </Library/Application Support/com.apple.idleassetsd/Customer/entries.json> ...gives me everything I need to download ALL the videos All that said, I want to write a Shortcuts script that can parse each "Dictionary" from the "assets" array, and extract "url-4_240FPS" and "id" so I can build a shell script I can take to the library on my old MacBook to download ALL the videos. I have parsed simple JSON files before in Shortcuts, but it was some time ago, and whatever I learned has escaped my elderly brain. Can someone help me out here, or point me to a site where the answer lies? Thanks. -- chrispam1@me.com is a filtered spam magnet. Email replies may be lost. You're better off replying to this newsgroup.
[toc] | [next] | [standalone]
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2023-10-08 20:38 +0000 |
| Message-ID | <kogia9Ftc36U1@mid.individual.net> |
| In reply to | #46763 |
On 2023-10-08, Chris Schram <chrispam1@me.com> wrote: > A few things first: > I live in an area where "high=speed Internet" means early 1950s copper > wire. Fortunately our local public library has the good stuff. > > I recently updated my iMac to macOS Sonoma, and have been trying to play > with the Aerial screen savers. This is mostly a fool's errand, as all my > available bandwidth gets sucked up, and I can't do anything else online. > > I have a MacBook Air that's stuck at macOS Monterey that I can take to > the aforementioned library. That along with the contents of the file... ></Library/Application Support/com.apple.idleassetsd/Customer/entries.json> > ...gives me everything I need to download ALL the videos > > All that said, I want to write a Shortcuts script that can parse each > "Dictionary" from the "assets" array, and extract "url-4_240FPS" and > "id" so I can build a shell script I can take to the library on my old > MacBook to download ALL the videos. > > I have parsed simple JSON files before in Shortcuts, but it was some > time ago, and whatever I learned has escaped my elderly brain. > > Can someone help me out here, or point me to a site where the answer > lies? Thanks. I don't have /Library/Application Support/com.apple.idleassetsd on my Ventura systems, and am not running Monterey anymore. So I can't look at this file. Anywa, the Shortcuts User Guide has a section under Advanced shortcuts about using Web APIS in shortcuts with a whole section about working with JSON: <https://support.apple.com/guide/shortcuts/welcome/ios> And in the spirit of not reinventing the wheel, have you considered simply installing the open source Aerial screen saver? <https://aerialscreensaver.github.io> -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR
[toc] | [prev] | [next] | [standalone]
| From | Chris Schram <chrispam1@me.com> |
|---|---|
| Date | 2023-10-09 09:12 +0000 |
| Message-ID | <ug0g6m$156u$1@solani.org> |
| In reply to | #46764 |
On 2023-10-08, Jolly Roger <jollyroger@pobox.com> wrote: > On 2023-10-08, Chris Schram <chrispam1@me.com> wrote: >> A few things first: >> I live in an area where "high=speed Internet" means early 1950s copper >> wire. Fortunately our local public library has the good stuff. >> >> I recently updated my iMac to macOS Sonoma, and have been trying to play >> with the Aerial screen savers. This is mostly a fool's errand, as all my >> available bandwidth gets sucked up, and I can't do anything else online. >> >> I have a MacBook Air that's stuck at macOS Monterey that I can take to >> the aforementioned library. That along with the contents of the file... >></Library/Application Support/com.apple.idleassetsd/Customer/entries.json> >> ...gives me everything I need to download ALL the videos >> >> All that said, I want to write a Shortcuts script that can parse each >> "Dictionary" from the "assets" array, and extract "url-4_240FPS" and >> "id" so I can build a shell script I can take to the library on my old >> MacBook to download ALL the videos. That should have been "url-4K-SDR-240FPS" up there. I hadn't noticed my JSON reader truncated it. >> I have parsed simple JSON files before in Shortcuts, but it was some >> time ago, and whatever I learned has escaped my elderly brain. >> >> Can someone help me out here, or point me to a site where the answer >> lies? Thanks. > > I don't have /Library/Application Support/com.apple.idleassetsd on my > Ventura systems, and am not running Monterey anymore. So I can't look at > this file. That path is found only in Sonoma. It's where all the Aerial screensaver magic happens. I may have caused some confusion intermingling Monterey and Sonoma in my original post. Rather than lug my Sonoma iMac to the library, I'll be doing my downloads on my Monterey MacBook Air. > Anywa, the Shortcuts User Guide has a section under Advanced shortcuts > about using Web APIS in shortcuts with a whole section about working > with JSON: > ><https://support.apple.com/guide/shortcuts/welcome/ios> I am very disappointed with the Shortcuts User Guide. It's like it was written for someone who doesn't need a Shortcuts User Guide. There are a couple of Take Control books that cover Shortcuts, but JSON seems to get short shrift. I DID eventually create a usable script, by trial-and-error hacking until things started working. It generates the essence of a brute-force shell script with a whole mess of lines in the form: curl <url-4K-SDR-240FPS> --output <id>.mov > And in the spirit of not reinventing the wheel, have you considered > simply installing the open source Aerial screen saver? > ><https://aerialscreensaver.github.io> I have uses Aerial.saver in the past, and I actually manually (!) went through (almost) all of its videos and changed their filenames to the indirect ones that the Sonoma screensaver likes. (Except I made a bunch of errors.) One advantage Aerial.saver has is you can download its videos in lower resolution 1080p, potentially saving a whole lot of storage space. When I fed those renamed files into Sonoma, it displayed them OK, but then proceeded to redownload each one, It did keep them at the lower resolution however. Go figure. -- chrispam1@me.com is a filtered spam magnet. Email replies may be lost. You're better off replying to this newsgroup.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.mac.apps
csiph-web