nephos
index
/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos/__init__.py

File containing initialising functions for Nephos
 
Used to store attributes which will be used throughout the program.

 
Package Contents
       
__main__
exceptions
load_config
logger
mail_notifier
maintenance (package)
manage_db
nephos
preprocessor (package)
recorder (package)
scheduler
uploader (package)
ver_info

 
Functions
       
first_time()
If the program is being run first time, create the directory Nephos
and it's subdirectories in user's home directory
 
-Nephos:
    - config: contains user editable configuration files
    - logs: store log information in txt
    - databases: stores the database for Nephos
    - recordings: stores the recorded streams
    - processed: stores processed mp4 files to be uploaded
    - docs: stores the detailed documentation for Nephos
 
Returns
-------
bool: True, when Nephos launched first time
      False, otherwise
load_mail_list()
Checks and removes incorrect mail addresses from toaddr parameter
of logger's SMTP handler
 
Returns
-------
type: list
updated list of emails
validate_entries(data)
Validates the data entry for the channels, jobs and sharelists
 
Parameters
----------
data
    type: dict
    contains multiple channels' data
 
Returns
-------
type: dict
validated and rectified data

 
Data
        CRITICAL_MAIL_ADDRS_PATH = '/home/thealpha/Nephos/.critical_mail_addrs'
LOG = <logging.Logger object>
REGEX_CHECK = {'country_code': re.compile('[a-zA-Z ]+'), 'duration': re.compile('[^0]\\d*'), 'email': re.compile('[^@\\s][\\w\\d\\._\\+][^\\s]+@[\\w\\d\\.]+\\.[\\w\\d]*'), 'ip': re.compile('[^\\s]+:[\\d]+'), 'language': re.compile('[a-zA-Z ]+'), 'repetition': re.compile('[01]{7}'), 'start_time': re.compile('\\d{2}:\\d{2}'), 'timezone': re.compile('[a-zA-Z ]+')}
__config_dir__ = '/home/thealpha/Nephos/config'
__db_dir__ = '/home/thealpha/Nephos/databases'
__default_config_dir__ = '/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos/default_config'
__default_db_dir__ = '/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos/databases'
__default_docs_dir__ = '/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos/../docs'
__docs_dir__ = '/home/thealpha/Nephos/docs'
__home_dir__ = '/home/thealpha'
__log_dir__ = '/home/thealpha/Nephos/logs'
__nephos_dir__ = '/home/thealpha/Nephos'
__package_dir__ = '/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos'
__recording_dir__ = '/home/thealpha/Nephos/recordings'
__upload_dir__ = '/home/thealpha/Nephos/processed'