(paths)
| 156 | |
| 157 | |
| 158 | def expand_paths(paths): |
| 159 | files = [] |
| 160 | for path in paths: |
| 161 | if os.path.isdir(path): |
| 162 | for root, _dirs, names in os.walk(path): |
| 163 | files.extend( |
| 164 | os.path.join(root, n) for n in sorted(names) if n.endswith(".md") |
| 165 | ) |
| 166 | else: |
| 167 | files.append(path) |
| 168 | return files |
| 169 | |
| 170 | |
| 171 | def main(): |