Compare commits

...

2 Commits

Author SHA1 Message Date
0e709f8547 latest 2023-01-13 02:15:53 -08:00
28f5802f41 rename makefiles dir 2022-12-10 22:26:44 +01:00
11 changed files with 5432 additions and 0 deletions

View File

@ -0,0 +1,8 @@
default: output
output:
time bash gen.sh
du -sh output
clean:
rm -rfv output tmp.sh

View File

@ -0,0 +1,61 @@
#!/bin/bash
#-c:v libx264 \
#-c:v libx265 \
#-vf "scale=(iw*sar)*max($W/(iw*sar)\,$H/ih):ih*max($W/(iw*sar)\,$H/ih), crop=$W:$H" \
#-s:v ${W}x${H} \
W="3840"
H="2160"
DIR1="10621108"
DIR2="10721108"
#-vcodec libx264 \
#-crf 17 \
#-preset slow \
function main {
convertRaws
makeBigVersion
makeSmallVersion
}
function makeBigVersion {
#-c:v hevc_videotoolbox -q:v 100 \
#-vf scale=-2:${H} \
ffmpeg -framerate 24 \
-pattern_type glob \
-i 'output/frames/*.png' \
-c:v prores -profile:v 3 \
-pix_fmt yuv422p10 \
output/big.mov
}
function makeSmallVersion {
ffmpeg -i output/big.mov \
-vf scale=-2:1080 \
-c:v h264_videotoolbox \
-b:v 12000K \
output/preview.1080p.mp4
}
function convertRaws {
if [[ -e output/frames/done ]]; then
return
fi
mkdir -p output/frames
rm -rf tmp.sh
for i in $DIR1/*.ARW; do
BN="$(basename ${i%.*})"
echo sips -s format png $i --out "output/frames/1${BN}.png"
echo sips -s format png $i --out "output/frames/1${BN}.png" >> tmp.sh
done
for i in $DIR2/*.ARW; do
BN="$(basename ${i%.*})"
echo sips -s format png $i --out "output/frames/2${BN}.png"
echo sips -s format png $i --out "output/frames/2${BN}.png" >> tmp.sh
done
parallel --eta -j $(nproc) bash -c < tmp.sh && touch output/frames/done
}
main

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
#!/bin/bash
DEST="$HOME/tmp/2023-01-13-nostromo.oldhome"
mkdir -p "$DEST"
rsync -avP \
--exclude=/Library/Syncthing \
--exclude=/Library/Mail \
--exclude=/Library/Caches \
--exclude=/Library/Metadata \
--exclude=/Library/News \
--exclude=/Library/Python \
--exclude=/Library/Containers/com.utmapp.UTM \
--exclude=/Library/Application?Support/Signal \
--exclude=/.Trash \
--exclude=/.cache \
--exclude=/tmp \
--exclude=/go \
--exclude=.DS_Store \
--exclude=/Documents \
--delete-excluded \
--delete \
$HOME/ $DEST/home/
tar -c $DEST/home 2>/dev/null |
pv --size $(du -sb $DEST/home | awk '{print $1}') |
zstdmt |
age -r $SNEAK_LONGTERM_ARCHIVE_AGE_PUB |
ssh root@lstor1 "cat > /srv/backup/hosts/nostromo/2023-01-13-nostromo-oldhome.tzst.age"

View File

@ -0,0 +1,16 @@
THIS = $(shell basename $(CURDIR))
YYYYMMDD = $(shell date -u +%Y-%m-%d)
YYYY = $(shell date +%Y)
default: save_makefile update-lifeboat update-photos
save_makefile:
cp ./Makefile $(HOME)/dev/hacks/makefiles/$(YYYYMMDD).$(THIS).makefile
update-lifeboat:
rsync -avP --delete $(HOME)/Library/Syncthing/folders/lifeboat/*.zip /Volumes/1tb-lifeboat1G/berlin.sneak.fs.lifeboat/
zip -T /Volumes/1tb-lifeboat1G/berlin.sneak.fs.lifeboat/*.zip
update-photos:
rsync -avP --delete $(HOME)/Library/Syncthing/folders/LightroomMasters-CurrentYear/ ./fs/ 2>&1 | tee -a log.txt
cd ./fs && find . -type f -print0 | xargs -0 shasum 2&>1 | tee -a ../SHASUMS.txt

View File

@ -0,0 +1,28 @@
THIS = $(shell basename $(CURDIR))
YYYYMMDD = $(shell date -u +%Y-%m-%d)
default: backup
save_makefile:
cp ./Makefile $(HOME)/dev/hacks/makefiles/$(YYYYMMDD).$(THIS).makefile
backup: save_makefile do_file_backup write_checksum
write_checksum:
cd ./fs && find . -type f -print0 | xargs -0 sha1sum | tee -a ../SHASUMS.txt
do_file_backup:
rsync -avv \
--exclude=/tmp \
--exclude=/.cache \
--exclude=/.nvm \
--exclude=/.Trash \
--exclude=/Library/Caches \
--exclude=/Library/Mail \
--exclude=/Library/Developer \
--exclude=.DS_Store \
--delete-before \
--delete-excluded \
$(HOME)/ ./fs/ 2>&1 | tee -a ./$(shell date -u +%Y-%m-%d).log
echo '# $(shell date -u)' > ./lastbackup.txt
date -u '+%s' >> ./lastbackup.txt

View File

@ -0,0 +1,10 @@
THIS = usbroot-makefile
YYYYMMDD = $(shell date -u +%Y-%m-%d)
default: save_makefile alldirs
save_makefile:
cp ./Makefile $(HOME)/dev/hacks/makefiles/$(YYYYMMDD).$(THIS).makefile
alldirs:
for D in ./berlin.sneak.fs.* ; do cd $$D && make && cd .. ; done

View File

@ -64,6 +64,7 @@ RE+=' --exclude=/Library/Application?Support/Syncthing/index-*'
RE+=" --exclude=/Library/Metadata"
RE+=" --exclude=/Library/Caches/"
RE+=" --exclude=/Library/Containers/com.docker.docker/"
RE+=" --exclude=/Library/Group?Containers/group.com.apple.secure-control-center-preferences"
RE+=" --exclude=/Library/Cookies/"
RE+=" --exclude=/Library/Developer/"
RE+=" --exclude=/Library/Google/GoogleSoftwareUpdate/"
@ -72,6 +73,7 @@ RE+=" --exclude=/Library/Logs/"
RE+=" --exclude=/Library/Mail/" # keep your mail on the server!
RE+=" --exclude=/Library/Mail?Downloads/"
RE+=" --exclude=/Library/Parallels/"
RE+=" --exclude=/Library/Suggestions/"
RE+=" --exclude=/Library/Preferences/Macromedia/Flash?Player/"
RE+=" --exclude=/Library/Preferences/SDMHelpData/"
RE+=" --exclude=/Library/PubSub/"