diff --git a/Sermon-Upload/README.md b/Sermon-Upload/README.md index 1311a54..1ecbaf2 100644 --- a/Sermon-Upload/README.md +++ b/Sermon-Upload/README.md @@ -1,3 +1,14 @@ # Sermon Upload Finds latest sermon based on input, uploads it, notifies the user whether or not it works. Sounds simple, it isn't. + +# Requirements + +Install `notify2` and `dbus-python` and other dependencies: + +``` +sudo apt-get install libgtk2.0-dev libdbus-1-dev +``` +``` +pip install dbus-python notify2 +``` diff --git a/Sermon-Upload/sermon-upload.py b/Sermon-Upload/sermon-upload.py index c88a49b..5f26439 100644 --- a/Sermon-Upload/sermon-upload.py +++ b/Sermon-Upload/sermon-upload.py @@ -23,7 +23,9 @@ def upload(scrdir, dstdir, key, ssh): # Input has to end in / list = sorted(glob.glob('*.mp3')) # Sort files alphabetically. mostrecent = list[-1] # Find most recent sermon secondrecent = list[-2] # Find second most recent sermon - + #print(mostrecent) + #mostrecent = re.sub (' ', '\\', mostrecent) # NOTE to self: figure out a way to handle spaces. + #print(mostrecent) sermonsrc = scrdir + mostrecent # Grab the most recent sermon to copy. sermondst = dstdir + mostrecent # Destination for most recent sermon. @@ -55,7 +57,7 @@ def upload(scrdir, dstdir, key, ssh): # Input has to end in / #print(mostrecent) #print(recentsermon) - if recentsermon == sermondst: + if recentsermon == sermondst: # NOTE: to self: add option to skip notification for no dependencies # if str(mostrecent) == str(recentsermon): # If the most recent sermon uploaded matches the most recent sermon locally, we're good.