From a67efe10f1a0bbeaff47f985f3d114c2566456bf Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 19 May 2024 16:52:32 +0100 Subject: [PATCH 1/4] report: Don't try to mix unknown discs into the primary sort order. This made sense when the discs weren't primarily ordered by box but it doesn't any more. Just leave the unknown ones at the end of the list. --- report | 5 ----- 1 file changed, 5 deletions(-) diff --git a/report b/report index f8d0326..9f2bc11 100755 --- a/report +++ b/report @@ -85,11 +85,6 @@ for my $name (sort { my $pa = $set_path{$a}[0]; my $ba = $box{$pa} // "~~~"; my $paths = $set_path{$name}; my @unk; set_box $box{$paths->[0]}; - while (@iso && $iso[0] lt $paths->[0]) { push @unk, shift @iso; } - if (@unk) { - print "[#UNK: *]\n"; - for my $path (@unk) { print "\t", $path, "\n"; } - } printf "[#%d: %d] %s\n", $set_id{$name}, scalar @$paths, $name; my $i = 0; for my $path (@$paths) { -- 2.11.0 From 11ec36c183badd178ae44997fbff5eaee3638eb2 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 28 May 2024 19:35:28 +0100 Subject: [PATCH 2/4] cycle: Print a diff of the changes, if there are any. --- cycle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cycle b/cycle index 6f4a177..43f561d 100755 --- a/cycle +++ b/cycle @@ -2,5 +2,5 @@ ./update PATHS ./report >PATHS.new -if cmp -s PATHS.new PATHS; then rm PATHS.new +if diff -u PATHS.new PATHS; then rm PATHS.new else mv PATHS.new PATHS; fi -- 2.11.0 From 092a23cf27bee94b97a872e5532eb05444f4b258 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 7 Jun 2024 23:21:38 +0100 Subject: [PATCH 3/4] cycle: Report the diff the other way round. --- cycle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cycle b/cycle index 43f561d..3006edc 100755 --- a/cycle +++ b/cycle @@ -2,5 +2,5 @@ ./update PATHS ./report >PATHS.new -if diff -u PATHS.new PATHS; then rm PATHS.new +if diff -u PATHS PATHS.new; then rm PATHS.new else mv PATHS.new PATHS; fi -- 2.11.0 From ea279fddcc662e19f7328c1a134ce0be3db92a9e Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 7 Jun 2024 23:22:15 +0100 Subject: [PATCH 4/4] track-boxing-progress: Script I used to track the boxing job. --- track-boxing-progress | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 track-boxing-progress diff --git a/track-boxing-progress b/track-boxing-progress new file mode 100755 index 0000000..2ffcbb6 --- /dev/null +++ b/track-boxing-progress @@ -0,0 +1,14 @@ +#! /bin/sh -e + +set -- $(psql -At -F" " -hroadstar -c ' + SELECT * FROM + (SELECT COUNT(*) FROM dvd_disc) AS ndisc, + (SELECT COUNT(*) FROM dvd_disc WHERE box IS NOT NULL) AS nboxed, + (SELECT COUNT(*) FROM + (SELECT DISTINCT box FROM dvd_disc + WHERE box IS NOT NULL) AS q) + AS nbox; +'); ndisc=$1 nboxed=$2 nbox=$3 + +echo "DONE $nboxed/$ndisc = $(( (100*$nboxed + $ndisc/2)/$ndisc ))%" +echo "BOXES $nbox + $(( (($ndisc - $nboxed)*$nbox + $nboxed - 1)/$nboxed ))" \ No newline at end of file -- 2.11.0