From 6278a0df5cb1e0c6d76c92d56c240ee2a068b125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 5 Feb 2022 18:16:35 +0100 Subject: [PATCH] add formatter interface --- PyTeX/formatting/formatter.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 PyTeX/formatting/formatter.py diff --git a/PyTeX/formatting/formatter.py b/PyTeX/formatting/formatter.py new file mode 100644 index 0000000..c4a4ea5 --- /dev/null +++ b/PyTeX/formatting/formatter.py @@ -0,0 +1,25 @@ +from typing import List, Optional, Dict, Tuple +from pathlib import Path + + +class Formatter: + """ + A formatter is bound to a specific input file with some + building configuration. + """ + def format(self, build_dir: Path) -> Optional[List[Tuple[str, Dict]]]: + """ + :param build_dir: Directory where output files are written to + :return: When configuration files are needed for a future + build of the output files, a list of the file names and their + needed configurations. Else None. + """ + pass + + @property + def output_files(self) -> List[str]: + """ + + :return: List of files that will be built when the formatter is invoked + """ + pass