# Path: pubs/config/spec.py



import os
import platform
import configobj
import validate
from .spec import configspec
            from .. import uis




DFT_CONFIG_PATH = os.path.expanduser('~/.pubsrc')


class ConfigurationNotFound(IOError):

    def __init__(self, path):
        super(ConfigurationNotFound, self).__init__(
            "No configuration found at path {}. Maybe you need to initialize "
            "your repository with `pubs init` or specify a --config argument."
            "".format(path))


def post_process_conf(conf):
    """Do some post processing on the configuration"""
    check_conf(conf)
    if conf['main']['docsdir'] == 'docsdir://':
        conf['main']['docsdir'] = os.path.join(conf['main']['pubsdir'], 'doc')
    return conf


def load_default_conf():
    """Load the default configuration"""

# Path: pubs/config/spec.py



# Path: pubs/config/conf.py
import os
import platform
import configobj
import validate
from .spec import configspec
            from .. import uis





DFT_CONFIG_PATH = os.path.expanduser('~/.pubsrc')


class ConfigurationNotFound(IOError):

    def __init__(self, path):
        super(ConfigurationNotFound, self).__init__(
            "No configuration found at path {}. Maybe you need to initialize "
            "your repository with `pubs init` or specify a --config argument."
            "".format(path))


def post_process_conf(conf):
    """Do some post processing on the configuration"""
    check_conf(conf)
    if conf['main']['docsdir'] == 'docsdir://':
        conf['main']['docsdir'] = os.path.join(conf['main']['pubsdir'], 'doc')
    return conf


def load_default_conf():
    """Load the default configuration"""

    default_conf = configobj.ConfigObj(configspec=configspec)