Ejemplo n.º 1
0
    def dialog_copy_new_name(self):
        dialog = Dialog(
            title=f'Make Duplicate of "{self.entry.name}"',
            body="Please enter a new name for your duplicate project.")

        new_name = dialog.get_result("New Name").lower()
        project_names = [
            x.name.lower()
            for x in Folder.ls_folders(self.get_root_dir().parent)
        ]

        if not new_name in project_names:
            return new_name

        Log("That project name already exists.. Please try again!")
        Log.press_enter()

        return self.dialog_copy_new_name()
Ejemplo n.º 2
0
 def get_local_projects():
     local = Folder.ls_folders(EXTRACTED)
     return [Project(x.name) for x in local]