[code]
#! /usr/bin/env python3
#
# rathunter4.py by Ice
#
import io
from gpiozero import MotionSensor, LED
import picamera
import time
import datetime
import subprocess
import atexit
import logging
ir = False
logfile = "/var/log/rathunter/rathunter.log"
moviesdir = "/media/hdd/"
host = subprocess.getoutput(["hostname", "-s"])
@atexit.register
def goodbye():
print("You are now leaving the rathunter4.py program.")
#Function to get get date and time
def dt():
return datetime.datetime.now().strftime("%Y-%m-%d_%H.%M.%S")
# Function to create new Filename from date and time
def getFileName(o):
return moviesdir+host+"-"+o+".h264"