# Path: publicstatic/conf.py
# class NotFoundException(errors.BasicException):
# class ParsingError(errors.BasicException):
# class ConfigurationExistsException(errors.BasicException):
# class NotInitializedException(errors.BasicException):
# def path():
# def defaults():
# def load(conf_path):
# def generate(conf_path, force):
# def find_conf(conf_path):
# def get(param, default=None):
# def set(param, value):
# def tags_rel_url():
# def commons():
# def _dumpopt(opt_name):
# def _purify(params):
# def _expand(rel_path):
# def _trsl(url):


import codecs
import os
import re
import shutil
import sys
import time
from datetime import datetime
from publicstatic import conf
from publicstatic.urlify import urlify
    from webbrowser import open_new_tab
            if not os.path.isdir(dest_dir):
                os.makedirs(dest_dir)

            if os.path.exists(dest_path):
                existing.append(dest_path)
                if not force:
                    continue

            shutil.copyfile(os.path.join(root, each_file), dest_path)

    return existing


def walk(path, operation):
    """Performs operation for each file in the specified path.

    - Operation should take two arguments: the original path and
      additional relative path to each file.
    - Directory names starting with underscore will be ignored."""
    visible = lambda name: not name.startswith('_')
    for curdir, dirnames, curfiles in os.walk(path):
        dirnames[:] = filter(visible, dirnames)
        for nextfile in curfiles:
            fullpath = os.path.join(curdir, nextfile)
            relpath = fullpath[len(path):].strip(os.sep)
            operation(path, relpath)


def tag_url(tag):
    """Returns relative URL to the specified tag page."""

# Path: publicstatic/conf.py
# class NotFoundException(errors.BasicException):
# class ParsingError(errors.BasicException):
# class ConfigurationExistsException(errors.BasicException):
# class NotInitializedException(errors.BasicException):
# def path():
# def defaults():
# def load(conf_path):
# def generate(conf_path, force):
# def find_conf(conf_path):
# def get(param, default=None):
# def set(param, value):
# def tags_rel_url():
# def commons():
# def _dumpopt(opt_name):
# def _purify(params):
# def _expand(rel_path):
# def _trsl(url):


# Path: publicstatic/helpers.py
import codecs
import os
import re
import shutil
import sys
import time
from datetime import datetime
from publicstatic import conf
from publicstatic.urlify import urlify
    from webbrowser import open_new_tab

            if not os.path.isdir(dest_dir):
                os.makedirs(dest_dir)

            if os.path.exists(dest_path):
                existing.append(dest_path)
                if not force:
                    continue

            shutil.copyfile(os.path.join(root, each_file), dest_path)

    return existing


def walk(path, operation):
    """Performs operation for each file in the specified path.

    - Operation should take two arguments: the original path and
      additional relative path to each file.
    - Directory names starting with underscore will be ignored."""
    visible = lambda name: not name.startswith('_')
    for curdir, dirnames, curfiles in os.walk(path):
        dirnames[:] = filter(visible, dirnames)
        for nextfile in curfiles:
            fullpath = os.path.join(curdir, nextfile)
            relpath = fullpath[len(path):].strip(os.sep)
            operation(path, relpath)


def tag_url(tag):
    """Returns relative URL to the specified tag page."""

    tag_location = conf.get('tag_location').format(tag=urlify(tag))