# Path: lib/fs.py
# def check_if_available(prg, msg):
# 
# Path: lib/podium.py
# def get_hostname():
# def get_home_dir():
# def get_username():
# def is_linux():
# def get_distro():
# def get_fingerprint(md5=False):
# def get_short_fingerprint(length=6):


import os
import sys
import config as cfg
from datetime import datetime
from optparse import OptionParser
from random import shuffle
from time import sleep
from lib import fs, podium
Very useful if you leave your computer switched on during the night.

Usage:
------

./alarm.py -p
    Play music. First do this to adjust volume! If the volume is low,
    you won't hear it in the morning.

./alarm.py -t 7h15
    Set alarm time. The format is HhM, where H is the hour (24-hour system),
    M is the minute, 'h' is the separator.

./alarm.py
    Set alarm with the default time. In my case it's 6h55.

Last update: 2017-01-08 (yyyy-mm-dd)
"""




MUSIC_DIR = '/media/jabba/JIVE/mp3/sfa_scifi'
if podium.get_short_fingerprint() in ['91d6c2', '863604']:
    MUSIC_DIR = '/trash/mp3'
TRAVERSE_RECURSIVELY = True
MPLAYER = cfg.MPLAYER
MPLAYER_OPTIONS = '-endpos 00:00:60'    # play first 60 seconds; disabled when -p is used
DEFAULT_TIME = '6h55'


# Path: lib/fs.py
# def check_if_available(prg, msg):
# 
# Path: lib/podium.py
# def get_hostname():
# def get_home_dir():
# def get_username():
# def is_linux():
# def get_distro():
# def get_fingerprint(md5=False):
# def get_short_fingerprint(length=6):


# Path: alarm.py
import os
import sys
import config as cfg
from datetime import datetime
from optparse import OptionParser
from random import shuffle
from time import sleep
from lib import fs, podium

Very useful if you leave your computer switched on during the night.

Usage:
------

./alarm.py -p
    Play music. First do this to adjust volume! If the volume is low,
    you won't hear it in the morning.

./alarm.py -t 7h15
    Set alarm time. The format is HhM, where H is the hour (24-hour system),
    M is the minute, 'h' is the separator.

./alarm.py
    Set alarm with the default time. In my case it's 6h55.

Last update: 2017-01-08 (yyyy-mm-dd)
"""




MUSIC_DIR = '/media/jabba/JIVE/mp3/sfa_scifi'
if podium.get_short_fingerprint() in ['91d6c2', '863604']:
    MUSIC_DIR = '/trash/mp3'
TRAVERSE_RECURSIVELY = True
MPLAYER = cfg.MPLAYER
MPLAYER_OPTIONS = '-endpos 00:00:60'    # play first 60 seconds; disabled when -p is used
DEFAULT_TIME = '6h55'


fs.check_if_available(MPLAYER, "Error: {} is not available!".format(MPLAYER))