# Path: kotori/util/configuration.py
# def read_list(string, separator=u',', empty_elements=True):
#     data = list(map(str.strip, string.split(separator)))
#     if empty_elements == False:
#         data = [x for x in data if bool(x)]
#     return data


import os
import sys
import socket
import logging
from binascii import unhexlify
from urllib.parse import urlparse
from tabulate import tabulate
from collections import OrderedDict
from kotori.util.configuration import read_list
# -*- coding: utf-8 -*-
# (c) 2015-2016 Andreas Motl, Elmyra UG <andreas.motl@elmyra.de>


logger = logging.getLogger(__name__)

CONFIG_CHANNEL_PREFIX = 'lst-'


def sanitize_channel_label(label):
    return label.replace(CONFIG_CHANNEL_PREFIX, '')


def compute_channel_label(name):
    return CONFIG_CHANNEL_PREFIX + name


def lst_channels(config):

# Path: kotori/util/configuration.py
# def read_list(string, separator=u',', empty_elements=True):
#     data = list(map(str.strip, string.split(separator)))
#     if empty_elements == False:
#         data = [x for x in data if bool(x)]
#     return data


# Path: kotori/vendor/lst/commands.py
import os
import sys
import socket
import logging
from binascii import unhexlify
from urllib.parse import urlparse
from tabulate import tabulate
from collections import OrderedDict
from kotori.util.configuration import read_list

# -*- coding: utf-8 -*-
# (c) 2015-2016 Andreas Motl, Elmyra UG <andreas.motl@elmyra.de>


logger = logging.getLogger(__name__)

CONFIG_CHANNEL_PREFIX = 'lst-'


def sanitize_channel_label(label):
    return label.replace(CONFIG_CHANNEL_PREFIX, '')


def compute_channel_label(name):
    return CONFIG_CHANNEL_PREFIX + name


def lst_channels(config):

    channel_labels = read_list(config['lst']['channels'])