I've set up Raspberry Pi 3 with the Picamera, PIR. When motion detected, starts to record. Email is sent too. All is working.
I'm now trying to find a way to edit the python script (the code) in a user-friendly way rather than going directly into the .py script. So for example, if I wanted to change the email address, I could easily do this- maybe in HTML or something?
Below is taken from my script (some omitted)
The parts I would want to change are highlight in bold
myscript.py
----------
....
#sending email
smtpUser = 'myemailaddress@gmail.com'
smtpPass = 'myemailpassword here'
toAdd = 'myemailaddress@gmail.com'
fromAdd = smtpUser
#Subject, header, body
subject = 'subject is here'
header = 'To: ' + toAdd + '\n' + 'From: ' + fromAdd + '\n' + 'Subject: ' + subject
body = 'message here'
s = smtplib.SMTP ('smtp.gmail.com',587)
s.ehlo()
s.starttls()
s.ehlo()
s.login(smtpUser, smtpPass)
s.sendmail (fromAdd, toAdd, header + '\n\n' + body)
s.quit()
--------
Is this possible? Can I create a webpage / form which is linked to specific part of the script and change it? I've looked online and couldn't find anything. Any help is much appreciated!