From 02877167870245be0986a2bb8af984c9eb3dc1dd Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sat, 3 Aug 2024 01:19:06 +0200 Subject: obsolete files removed --- update-pictures.nu | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 update-pictures.nu (limited to 'update-pictures.nu') diff --git a/update-pictures.nu b/update-pictures.nu deleted file mode 100755 index 8d888f8..0000000 --- a/update-pictures.nu +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env nu - -$env.BORG_PASSPHRASE = (cat ~/.borg-sub2) -/etc/profiles/per-user/ch/bin/borg mount --last 1 ssh://u242757-sub2@u242757.your-storagebox.de:23/./borg ~/borg /home/ch/img - -do -i { # ensure that borg is unmounted to enable backups - let img_dir = ls ~/borg/*/home/ch/img | first | get name - let pub_dir = '/srv/media/pictures' - - cd $pub_dir - let published = (ls | get name) - cd $img_dir - # TODO overwrite modified images - # TODO add description - let all = (open motivs.json | where rating == 3 | get stack | each {|s| $s.0}) - let new = ($all | filter {|id| not ($id in $published) }) - print $new - cd backup - $new | each {|img| - let public = $'($pub_dir)/($img)' - echo $public - cp -uv $img $public - chmod u+w $public - # TODO add description - /etc/profiles/per-user/ch/bin/exiv2 rm $public - /etc/profiles/per-user/ch/bin/exiv2 -M "set Xmp.dc.creator pdp8@pdp8.info" -M "set Xmp.dc.rights © pdp8@pdp8.info" -M "set Xmp.dc.license http://creativecommons.org/licenses/by-sa/4.0/" -M "set Xmp.xmpRights.UsageTerms Creative Commons Attribution-ShareAlike 4.0 International License" -M "set Xmp.xmpRights.Marked True" -M "set Xmp.dc.description Original artwork available from pdp8@pdp8.info" $public - } - - cd /home/ch/src/publish/ - /home/ch/.nix-profile/bin/make www-pictures -} - -/run/wrappers/bin/umount ~/borg -- cgit v1.2.3