diff --git a/ex1/a.py b/ex1/a.py new file mode 100644 index 0000000..bc2b1cc --- /dev/null +++ b/ex1/a.py @@ -0,0 +1,9 @@ +import sys + + +def print_args(): + return " ".join(sys.argv[1:]) + + +if __name__ == "__main__": + print(print_args()) \ No newline at end of file diff --git a/ex1/b.py b/ex1/b.py new file mode 100644 index 0000000..9757e0d --- /dev/null +++ b/ex1/b.py @@ -0,0 +1,13 @@ +import argparse +import sys + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("-t", "--target", choices=["titi", "toto", "tata"]) + args = parser.parse_args() + return args.target + + +if __name__ == "__main__": + print(main()) \ No newline at end of file diff --git a/ex1/c.py b/ex1/c.py new file mode 100644 index 0000000..715689f --- /dev/null +++ b/ex1/c.py @@ -0,0 +1,10 @@ +from a import print_args +from art import text2art + + +def main(): + return text2art(print_args()) + + +if __name__ == "__main__": + print(main()) diff --git a/ex2/Dockerfile b/ex2/Dockerfile new file mode 100644 index 0000000..44ae8ea --- /dev/null +++ b/ex2/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY app / +CMD ["/app"] \ No newline at end of file