Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Innovation distinguishes between a leader and a follower. -- Steve Jobs (1955-2011)


computers / comp.sys.mac.apps / Re: Shortcuts and JSON help

SubjectAuthor
* Shortcuts and JSON helpChris Schram
`* Re: Shortcuts and JSON helpJolly Roger
 `- Re: Shortcuts and JSON helpChris Schram

1
Shortcuts and JSON help

<ufv2m4$h5d$1@solani.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1071&group=comp.sys.mac.apps#1071

  copy link   Newsgroups: comp.sys.mac.apps
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: chrisp...@me.com (Chris Schram)
Newsgroups: comp.sys.mac.apps
Subject: Shortcuts and JSON help
Date: Sun, 8 Oct 2023 20:16:04 -0000 (UTC)
Organization: Where the hell is Langlois, Oregon?
Message-ID: <ufv2m4$h5d$1@solani.org>
Injection-Date: Sun, 8 Oct 2023 20:16:04 -0000 (UTC)
Injection-Info: solani.org;
logging-data="17581"; mail-complaints-to="abuse@news.solani.org"
User-Agent: slrn/1.0.3 (Darwin)
Cancel-Lock: sha1:UJazOHJ/pHQ67apL0NwY16p6wLM=
X-No-Archive: yes
X-User-ID: eJwNwokRwDAIA7CVzH8ZhxC8/wjtSWEpOeUZ6cGfI6DdAcy7rFWUS8leYSxFE3Y4E3w7jbpz0OVlJA16Pk17Fak=
 by: Chris Schram - Sun, 8 Oct 2023 20:16 UTC

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.

Re: Shortcuts and JSON help

<kogia9Ftc36U1@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1072&group=comp.sys.mac.apps#1072

  copy link   Newsgroups: comp.sys.mac.apps
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jollyro...@pobox.com (Jolly Roger)
Newsgroups: comp.sys.mac.apps
Subject: Re: Shortcuts and JSON help
Date: 8 Oct 2023 20:38:34 GMT
Organization: People for the Ethical Treatment of Pirates
Lines: 45
Message-ID: <kogia9Ftc36U1@mid.individual.net>
References: <ufv2m4$h5d$1@solani.org>
X-Trace: individual.net bsq4tXv+yYqufXRSW/TNCQmcI3EMZ25vhpIZ3/y+Lu1dzBOQ2h
Cancel-Lock: sha1:FURcyBwfe6eGxolhmbnhbtsulNg= sha256:T2kRYnE497HaVxWw7yWpvuGv2EOrAjNXpYlPFxpZGuI=
Mail-Copies-To: nobody
X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1<n@LQ!aZ7vLO_nWbK~@T'XIS0,oAJcU.qLM
dk/j8Udo?O"o9B9Jyx+ez2:B<nx(k3EdHnTvB]'eoVaR495,Rv~/vPa[e^JI+^h5Zk*i`Q;ezqDW<
ZFs6kmAJWZjOH\8[$$7jm,Ogw3C_%QM'|H6nygNGhhl+@}n30Nz(^vWo@h>Y%b|b-Y~()~\t,LZ3e
up1/bO{=-)
User-Agent: slrn/1.0.3 (Darwin)
 by: Jolly Roger - Sun, 8 Oct 2023 20:38 UTC

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

Re: Shortcuts and JSON help

<ug0g6m$156u$1@solani.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1073&group=comp.sys.mac.apps#1073

  copy link   Newsgroups: comp.sys.mac.apps
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: chrisp...@me.com (Chris Schram)
Newsgroups: comp.sys.mac.apps
Subject: Re: Shortcuts and JSON help
Date: Mon, 9 Oct 2023 09:12:55 -0000 (UTC)
Organization: Where the hell is Langlois, Oregon?
Message-ID: <ug0g6m$156u$1@solani.org>
References: <ufv2m4$h5d$1@solani.org> <kogia9Ftc36U1@mid.individual.net>
Injection-Date: Mon, 9 Oct 2023 09:12:55 -0000 (UTC)
Injection-Info: solani.org;
logging-data="38110"; mail-complaints-to="abuse@news.solani.org"
User-Agent: slrn/1.0.3 (Darwin)
Cancel-Lock: sha1:txzitsyaoSrxlaPDF13tMhlnpT4=
X-User-ID: eJwNyskBAzEIA8CWTEAIl4M5+i9hM++BunjRHG5YLG0rAr982gPSj/AOelzIk1b7kjdzTkgE/9Fvare+rTbjB1AfFac=
 by: Chris Schram - Mon, 9 Oct 2023 09:12 UTC

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.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor