def __init__(self): self.cli_struct = TemplateStructCli(domain='cli') super().__init__(self.cli_struct) self.WD_Path = Path(os.path.dirname(__file__)) self.TEMPLATES_CLI_PATH = f'{self.WD_Path.parent}/templates/cli' """ TEMPLATE VERSIONS """ self.CLI_PYTHON_TEMPLATE_VERSION = load_ct_template_version('cli-python', self.AVAILABLE_TEMPLATES_PATH) self.CLI_JAVA_TEMPLATE_VERSION = load_ct_template_version('cli-java', self.AVAILABLE_TEMPLATES_PATH)
def __init__(self): self.lib_struct = TemplateStructLib(domain='lib') super().__init__(self.lib_struct) self.WD_Path = Path(os.path.dirname(__file__)) self.TEMPLATES_LIB_PATH = f'{self.WD_Path.parent}/templates/lib' '"" TEMPLATE VERSIONS ""' self.LIB_CPP_TEMPLATE_VERSION = load_ct_template_version( 'lib-cpp', self.AVAILABLE_TEMPLATES_PATH)
def __init__(self): self.pub_struct = TemplateStructPub(domain="pub", language="latex") super().__init__(self.pub_struct) self.WD_Path = Path(os.path.dirname(__file__)) self.TEMPLATES_PUB_PATH = f"{self.WD_Path.parent}/templates/pub" '"" TEMPLATE VERSIONS ""' self.PUB_LATEX_TEMPLATE_VERSION = load_ct_template_version( "pub-thesis-latex", self.AVAILABLE_TEMPLATES_PATH)
def __init__(self): self.web_struct = TemplateStructWeb(domain='web') super().__init__(self.web_struct) self.WD_Path = Path(os.path.dirname(__file__)) self.TEMPLATES_WEB_PATH = f'{self.WD_Path.parent}/templates/web' '""Web Template Versions""' self.WEB_WEBSITE_PYTHON_TEMPLATE_VERSION = load_ct_template_version( 'web-website-python', self.AVAILABLE_TEMPLATES_PATH)
def __init__(self): self.gui_struct = TemplateStructGui(domain="gui") super().__init__(self.gui_struct) self.WD_Path = Path(os.path.dirname(__file__)) self.TEMPLATES_GUI_PATH = f"{self.WD_Path.parent}/templates/gui" '"" TEMPLATE VERSIONS ""' self.GUI_JAVA_TEMPLATE_VERSION = load_ct_template_version( "gui-java", self.AVAILABLE_TEMPLATES_PATH)
def __init__(self): self.pub_struct = TemplateStructPub(domain='pub', language='latex') super().__init__(self.pub_struct) self.WD_Path = Path(os.path.dirname(__file__)) self.TEMPLATES_PUB_PATH = f'{self.WD_Path.parent}/templates/pub' self.CWD = os.getcwd() '"" TEMPLATE VERSIONS ""' self.PUB_LATEX_TEMPLATE_VERSION = load_ct_template_version('pub-thesis-latex', self.AVAILABLE_TEMPLATES_PATH)
def sync_load_template_version(handle: str) -> str: """ Load the version of the template available from cookietemple specified by the handler for syncing. :param handle: The template handle :return: The actual version number of the template in cookietemple """ top_path = f'{os.path.dirname(__file__)}/..' available_templates_path = f'{str(top_path)}/create/templates/available_templates.yml' log.debug(f'Using available templates file from {available_templates_path} to load current cookietemple template version.') return load_ct_template_version(handle, available_templates_path)