add link to latest pic bingwp

This commit is contained in:
Ivan Kirilov Dimitrov 2024-07-07 19:20:35 +02:00
parent c952553198
commit 7eff3eb22d
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294

View File

@ -77,6 +77,7 @@
description = "Download bing image of the day";
script = ''
${pkgs.nushell}/bin/nu -c "http get ('https://bing.com' + ((http get https://www.bing.com/HPImageArchive.aspx?format=js&n=1).images.0.url)) | save ('/var/pic' | path join ( [ (date now | format date '%Y-%m-%d'), '.png' ] | str join ))"
${pkgs.nushell}/bin/nu -c "${pkgs.toybox}/bin/ln -sf (ls /var/pic | where type == file | get name | sort | last) /var/pic/latest.png"
'';
};
};