Skip to content

Instantly share code, notes, and snippets.

@cutrus
cutrus / magpi.sh
Created April 10, 2019 19:09 — forked from coybit/magpi.sh
Bash script to download all issues of The MagPi.
#!/bin/bash
#
# Creates a directory named "magpi" on your home folder and all issues are downloaded there.
# It also checks if you already have some of the issues and skips them from downloading.
# Use argument: --log OFF to disable logging. It is there because I have this script on my crontab and I needed to monitor if it running properly. For enabling logging do:
# $ sudo touch /var/log/magpi.log
# $ sudo chmod 666 /var/log/magpi.log
# That's it.
#
# Command execution is:
import vapoursynth
core = vapoursynth.get_core()
if "video_in" in globals():
clip = video_in
else:
# run with vspipe
clip = core.ffms2.Source(source=in_filename)
clip=core.fmtc.bitdepth(clip, bits=32)