diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2021-02-04 20:23:56 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2021-02-04 20:27:27 +0000 |
commit | a73f9e8974821de481ef075f1496f80f55fcd6a1 (patch) | |
tree | 9bea56cfc87e4c755541df0e2457b3d8670567c9 | |
parent | 0cd8fa4be25d3e32c7eda959808ae3f6a1b25258 (diff) |
This is a stripped down version of testplan2html.py.
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-x | plans/pdf.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plans/pdf.py b/plans/pdf.py new file mode 100755 index 0000000..6357869 --- /dev/null +++ b/plans/pdf.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 + +import pdfkit + +def main(): + parser = ArgumentParser() + parser.add_argument("-f", + "--file", + required=True, + nargs="+", + help="Test plan file to be used") + parser.add_argument("--pdf", + required=True, + help="Path to the output pdf file. Only works if output generates HTML") + + args = parser.parse_args() + if args.pdf is not None: + pdfkit.from_file(args.file, args.pdf) + + +if __name__ == "__main__": + main() |