From f6cb1e9d141d881ae6205027626d6643776e833c Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 15 Sep 2024 20:46:48 +0200 Subject: WIP requirements --- reqs2tex.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100755 reqs2tex.py (limited to 'reqs2tex.py') diff --git a/reqs2tex.py b/reqs2tex.py deleted file mode 100755 index 68c8f40..0000000 --- a/reqs2tex.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/python3 -import sys, tomllib - -def fmt(data): - print(data) - return f""" -\\makeatletter -\\makeatother -""" - -def main(input_file): - data = {} - with open(input_file, "rb") as file: - data = tomllib.load(file) - - output = fmt(data) - - output_file = input_file.removesuffix(".toml") + ".tex" - with open(output_file, "w+") as file: - file.write(output) - -if __name__ == "__main__": - if len(sys.argv) != 2: - print("usage: reqs2tex.py reqs.toml") - exit(1) - main(sys.argv[1]) - -- cgit v1.2.3