from collections import defaultdict import os import re from glob import glob from pathlib import Path from urllib.parse import quote from importlib.resources import files import chevron from fontTools.ttLib import TTFont from gftools.utils import font_sample_text from sh import git DIFFBROWSERS_PROOF_RE = r"^(.*)-diffbrowsers_(.*).html$" class FileTreeMaker(object): def _recurse(self, parent_path, file_list, prefix, output_buf, level): if len(file_list) == 0: return else: file_list.sort(key=lambda f: os.path.isfile(os.path.join(parent_path, f))) for idx, sub_path in enumerate(file_list): full_path = os.path.join(parent_path, sub_path) if os.path.isdir(full_path): output_buf.append(f'
  • {sub_path}" % (prefix)) def make(self, root): self.root = root buf = ["