From 9e1e6238fbe918b7985fb84d913ebff2b2acf3bd Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 9 Oct 2021 12:26:53 +0200 Subject: [PATCH] repository --- repository.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 repository.py diff --git a/repository.py b/repository.py new file mode 100644 index 0000000..2021487 --- /dev/null +++ b/repository.py @@ -0,0 +1,19 @@ +import arguments +import datetime +import os + + +class Repository: + def __init__(self, args): + self.directory = args[arguments.DIRECTORY] + self.temporary = args[arguments.TEMPORARY] + self.tmp = os.path.join(self.temporary, + datetime.datetime.now() + .strftime('%Y%m%d%H%M%S')) + + def __str__(self): + return f'''\ +Directory: {self.directory} + → {os.path.realpath(self.directory)} +Temporary: {self.tmp} +'''