tik_manager4.objects.task ========================= .. py:module:: tik_manager4.objects.task .. autoapi-nested-parse:: Module for Task object. Attributes ---------- .. autoapisummary:: tik_manager4.objects.task.LOG Classes ------- .. autoapisummary:: tik_manager4.objects.task.Task Module Contents --------------- .. py:class:: Task(absolute_path, name=None, categories=None, path='', file_name=None, parent_sub=None, task_id=None, metadata_overrides=None) Bases: :py:obj:`tik_manager4.core.settings.Settings`, :py:obj:`tik_manager4.objects.entity.Entity` Task object to handle works and publishes. Task objects are getting populated by the subproject objects. All the task settings are stored in the task settings file. During the initial instantiation, the optional arguments are used to create the settings file if it does not exist. .. py:method:: add_category(category) Add a category to the task. Args: category (str): Category name Returns: Category: The category object .. py:method:: build_categories(category_list) Create category objects. Builds a dictionary of category objects from a list of category names. Does NOT create folders or apply settings. Args: category_list (list): List of category names Returns: dict: Dictionary of categories .. py:method:: delete_category(category) Delete a category from the task. Args: category: (str) Category to delete Returns: int: 1 if successful, -1 if failed .. py:method:: destroy() Destroy the task, deleting all categories and everything in them. .. py:method:: edit(nice_name=None, categories=None, metadata_overrides=None, uid=None) Edit the task. Edits the given arguments of the task and applies the settings. If no argument is given, the function does nothing. This method requires level 2 permissions. Args: nice_name (str): New name for the task task_type (str): New type for the task categories (list): New categories for the task Returns: int: 1 if successful, -1 if failed .. py:method:: find_works_by_wildcard(wildcard) Search for works by wildcard among all categories. Args: wildcard: (str) Wildcard to search Returns: list: List of works that match the wildcard .. py:method:: is_empty() Check all categories and return True if all are empty. .. py:method:: omit() Omit the task. .. py:method:: order_categories(new_order) Order the categories of the task. Args: new_order: (list) Categories with new order Returns: int: 1 if successful, -1 if failed .. py:method:: refresh() Refresh the task object. .. py:method:: resurrect() Resurrect the task. Make sure the parent sub (and everything above) is not deleted. .. py:method:: revive() Revive the task. .. py:property:: categories Return available categories Dictionary. .. py:property:: creator Creator of the task. .. py:property:: deleted Deleted state of the task. .. py:property:: file_name File Name of the task settings file. .. py:property:: id Unique ID of the task. .. py:property:: metadata Metadata of the task. .. py:property:: name Name of the task. .. py:property:: nice_name Nice name of the task. .. py:attribute:: object_type .. py:property:: parent_sub Parent sub of the task. .. py:property:: state State of the task. .. py:property:: type Type of the task. .. py:data:: LOG