archive
/
md-pdf
Archived
1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf/md_pdf/build/md.py

14 lines
361 B
Python

import glob
from typing import Generator, List
def get_files_content(filenames: List[str]) -> Generator[str, None, None]:
for filename in filenames:
with open(filename) as f:
yield f.read()
def read_files(files_glob: str) -> str:
filenames = sorted(glob.glob(files_glob))
return '\n'.join(list(get_files_content(filenames)))