(paths)
| 167 | |
| 168 | |
| 169 | def expand(paths): |
| 170 | files = [] |
| 171 | for p in paths: |
| 172 | if os.path.isdir(p): |
| 173 | for root, _d, names in os.walk(p): |
| 174 | files.extend(os.path.join(root, n) for n in sorted(names) |
| 175 | if n.endswith(".md") and n != "_index.md") |
| 176 | else: |
| 177 | files.append(p) |
| 178 | return files |
| 179 | |
| 180 | |
| 181 | def main(): |