diff --git a/src/pm_kun/screen/__init__.py b/src/pm_kun/screen/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/pm_kun/screen/main.py b/src/pm_kun/screen/main.py new file mode 100644 index 0000000..f7ca599 --- /dev/null +++ b/src/pm_kun/screen/main.py @@ -0,0 +1,20 @@ +from kivy.app import App +from kivy.uix.widget import Widget + +""" +「xxx.kv」のxxx部分はclassの「XxxApp」の「Xxx」に対応している + name "Pmk" is short name in ProjectManagement Kun +""" + + +class PmkGame(Widget): + pass + + +class PmkApp(App): + def build(self): + return PmkGame() + + +if __name__ == "__main__": + PmkApp().run() diff --git a/src/pm_kun/screen/pmk.kv b/src/pm_kun/screen/pmk.kv new file mode 100644 index 0000000..9c0f43e --- /dev/null +++ b/src/pm_kun/screen/pmk.kv @@ -0,0 +1,19 @@ +#:kivy 1.0.9 + +: + canvas: + Rectangle: + pos: self.center_x - 5, 0 + size: 10, self.height + + Label: + font_size: 70 + center_x: root.width / 4 + top: root.top - 50 + text: "0" + + Label: + font_size: 70 + center_x: root.width * 3 / 4 + top: root.top - 50 + text: "0" \ No newline at end of file diff --git a/src/pm_kun/task/todo.py b/src/pm_kun/task/todo.py index 9a65586..ce245ea 100644 --- a/src/pm_kun/task/todo.py +++ b/src/pm_kun/task/todo.py @@ -1,5 +1,5 @@ from datetime import date -from typing import List, Optional +from typing import List, Optional, Union from pm_kun.type_definition import Priority, Status, ToDo @@ -63,11 +63,13 @@ def update_task( break return None - def search_task(self, id: str) -> None: + def search_task(self, id: str) -> Union[str, None]: """ タスクを検索するメソッド Args: """ for task in self.todo_list: if task["id"] == id: - return task + return task["task"] + else: + return None