예제 #1
0
 def _update_ignores_from_file(self,
                               path):  # pragma: no cover (integration test)
     """Parse and append patterns from a standard ignores file."""
     for line in common.read_lines(path):
         pattern = line.strip(" @\\/*\n")
         if pattern and not pattern.startswith('#'):
             self._ignores.append('*' + pattern + '*')
예제 #2
0
파일: base.py 프로젝트: akuker/doorstop.net
 def ignores(self):
     """Yield glob expressions to ignore."""
     if self._ignores_cache is None:
         self._ignores_cache = []
         log.debug("reading and caching the ignore patterns...")
         for filename in self.IGNORES:
             path = os.path.join(self.path, filename)
             if os.path.isfile(path):
                 for line in common.read_lines(path):
                     pattern = line.strip(" @\\/*\n")
                     if pattern and not pattern.startswith('#'):
                         self._ignores_cache.append('*' + pattern + '*')
     yield from self._ignores_cache
예제 #3
0
파일: base.py 프로젝트: jkloo/doorstop
 def ignores(self):
     """Yield glob expressions to ignore."""
     if self._ignores_cache is None:
         self._ignores_cache = []
         log.debug("reading and caching the ignore patterns...")
         for filename in self.IGNORES:
             path = os.path.join(self.path, filename)
             if os.path.isfile(path):
                 for line in common.read_lines(path):
                     pattern = line.strip(" @\\/*\n")
                     if pattern and not pattern.startswith('#'):
                         self._ignores_cache.append('*' + pattern + '*')
     yield from self._ignores_cache
예제 #4
0
def _lines_css():
    """Yield lines of CSS to embedded in HTML."""
    yield ''
    for line in common.read_lines(CSS):
        yield line.rstrip()
    yield ''