### Install Plugin from Package Source: https://dev.kitsu.cloud/recipes/make-your-plugin Install your plugin from the created zip archive using the Zou CLI. This process includes running database migrations and executing install hooks. ```bash python zou/cli.py install-plugin \ --path ./dist/my-plugin.zip ``` -------------------------------- ### List Installed Plugins Source: https://dev.kitsu.cloud/kitsu-plugins/installation Verify the installation of plugins by listing all currently installed plugins. ```bash zou list-plugins ``` -------------------------------- ### Install Kitsu Async Client Source: https://dev.kitsu.cloud/guides/async Install the Kitsu library with the 'async' extra to enable asynchronous operations. ```bash pip install gazu[async] ``` -------------------------------- ### Install Kitsu Plugin Source: https://dev.kitsu.cloud/references/cli Installs a plugin from a local folder, zip archive, or git repository. Restart the Zou server after installation. ```bash zou install-plugin --path /path/to/plugin ``` ```bash zou install-plugin --path ./dist/my-plugin.zip ``` ```bash zou install-plugin --path https://github.com/cgwire/kitsu-tickets.git ``` -------------------------------- ### Install snap package on Linux Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony Installs the Kitsu Publisher snap package. Use the --dangerous flag for installation and replace {version} with the correct version number. ```bash snap install kitsu-publisher_{version}_amd64.snap --dangerous ``` -------------------------------- ### Install and Build Frontend Source: https://dev.kitsu.cloud/kitsu-plugins/development Install npm dependencies and build the frontend project for static file output. This is a required step before packaging the plugin. ```bash cd plugins/my-plugin/frontend npm install && npm run build ``` -------------------------------- ### Enable and Start Meilisearch Service Source: https://dev.kitsu.cloud/self-hosting/full-text-search Enables the Meilisearch service to start on boot and starts the service immediately. ```bash sudo systemctl enable meilisearch sudo systemctl start meilisearch ``` -------------------------------- ### Install Kitsu Publisher Connector for Blender on Linux (Snap Package) Source: https://dev.kitsu.cloud/integrations/dcc/blender Installs the Kitsu Publisher connector for Blender on Linux when Blender is installed as a snap package. ```bash bash ./install.sh --snap ``` -------------------------------- ### Install Kitsu API Client (Python) Source: https://dev.kitsu.cloud/start-here/dev-quickstart Install the gazu Python SDK using pip. This is the first step before creating an API client. ```bash pip install gazu ``` -------------------------------- ### Start and Enable Services Source: https://dev.kitsu.cloud/self-hosting/setup These commands enable and start the application daemon and restart the Nginx server to apply the new configuration. ```bash sudo systemctl enable zou zou-events sudo systemctl start zou zou-events sudo systemctl restart nginx ``` -------------------------------- ### List Installed Plugins Source: https://dev.kitsu.cloud/recipes/make-your-plugin Verify that your plugin has been correctly installed by listing all installed plugins using the Zou CLI. ```bash python zou/cli.py list-plugins ``` -------------------------------- ### Install Plugin from Archive Source: https://dev.kitsu.cloud/kitsu-plugins/installation Install a plugin packaged as a .zip archive. This is useful for distributing plugins. ```bash zou install-plugin --path ./dist/my-plugin.zip ``` -------------------------------- ### Enable and Start RQ Job Queue Service Source: https://dev.kitsu.cloud/self-hosting/job-queue Commands to enable the zou-jobs systemd service to start on boot and to start it immediately. ```bash sudo systemctl enable zou-jobs sudo systemctl start zou-jobs ``` -------------------------------- ### Install Dependencies Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony Run this command in the project folder to install all necessary dependencies for the Electron app. ```bash npm install ``` -------------------------------- ### Install PKG package on macOS Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony Installs the Kitsu Publisher package on macOS using the installer command. The -target / flag specifies the root directory for installation. Replace {version} with the correct version. ```bash sudo installer -package Kitsu-publisher-{version}.pkg -target / ``` -------------------------------- ### Install Plugin from Local Folder Source: https://dev.kitsu.cloud/kitsu-plugins/installation Use this command to install a plugin located in a local directory on your server. ```bash zou install-plugin --path ./plugins/my-plugin ``` -------------------------------- ### Install Kitsu Publisher Connector for Blender on Linux (Unpacked Directory) Source: https://dev.kitsu.cloud/integrations/dcc/blender Installs the Kitsu Publisher connector for Blender on Linux when Blender is installed from an unpacked directory (tar.xz archive). Specify the path to your portable Blender installation. ```bash bash ./install.sh --unpacked-directory=PATH_TO_YOUR_PORTABLE_BLENDER ``` -------------------------------- ### Install libjpeg-dev on Ubuntu Source: https://dev.kitsu.cloud/self-hosting/troubleshooting Install the `libjpeg-dev` package, which is a requirement for Kitsu installation on Ubuntu servers or minimal desktops. ```bash sudo apt-get install libjpeg-dev ``` -------------------------------- ### Install Meilisearch Package Source: https://dev.kitsu.cloud/self-hosting/full-text-search Adds the Meilisearch APT repository and installs the Meilisearch package. ```bash # Add Meilisearch package echo "deb [trusted=yes] https://apt.fury.io/meilisearch/ /" | sudo tee /etc/apt/sources.list.d/fury.list # Update APT and install Meilisearch sudo apt update && sudo apt install meilisearch ``` -------------------------------- ### Install Plugin from Git Repository Source: https://dev.kitsu.cloud/kitsu-plugins/installation Install a plugin directly from a Git repository URL. Ensure the repository is accessible. ```bash zou install-plugin --path https://github.com/cgwire/kitsu-tickets.git ``` -------------------------------- ### Plugin Initialization and Routes Source: https://dev.kitsu.cloud/kitsu-plugins/development Example `__init__.py` file for defining API routes and lifecycle hooks. Routes are prefixed automatically with `/api/plugins//`. ```python from . import resources routes = [ ("/tickets", resources.TicketsResource), ("/tickets/", resources.TicketResource), ] def pre_install(manifest): pass def post_install(manifest): """Called after plugin installation. Use for seeding initial data.""" pass def pre_uninstall(manifest): pass def post_uninstall(manifest): pass ``` -------------------------------- ### Install Kitsu Publisher Connector for Unreal Engine on Windows Source: https://dev.kitsu.cloud/integrations/dcc/unreal-engine Installs the Kitsu Publisher plugin for Unreal Engine (version 5 and above) on Windows using PowerShell. This script attempts to install the plugin for all detected Unreal Editor installations. ```powershell .\install.ps1 ``` -------------------------------- ### Install Kitsu Publisher Connector for Blender on Linux (System Package) Source: https://dev.kitsu.cloud/integrations/dcc/blender Installs the Kitsu Publisher connector for Blender on Linux when Blender is installed via a system package (e.g., deb or rpm). ```bash bash ./install.sh --system ``` -------------------------------- ### Install Dependencies with Apt Source: https://dev.kitsu.cloud/self-hosting/setup Installs essential third-party software required for Kitsu, including PostgreSQL, build tools, Redis, Nginx, xmlsec1, and FFmpeg. ```bash sudo apt-get install postgresql postgresql-client postgresql-server-dev-all sudo apt-get install build-essential sudo apt-get install redis-server sudo apt-get install nginx sudo apt-get install xmlsec1 sudo apt-get install ffmpeg ``` -------------------------------- ### List Installed Kitsu Plugins Source: https://dev.kitsu.cloud/references/cli Lists all currently installed plugins. Supports different output formats and verbose output for more metadata. ```bash zou list-plugins ``` ```bash zou list-plugins --format json --verbose ``` -------------------------------- ### LDAP Configuration Environment Variables Example Source: https://dev.kitsu.cloud/self-hosting/lightweight-directory-access-protocol Example of setting essential environment variables for LDAP server connection and base DN configuration. ```bash LDAP_HOST=192.168.1.10 LDAP_PORT=389 LDAP_BASE_DN=CN=Users,DC=mystudio,DC=local LDAP_DOMAIN=mystudio.com LDAP_FALLBACK=True ``` -------------------------------- ### Python SDK Setup Source: https://dev.kitsu.cloud/start-here/agent-quickstart Configure the Kitsu Python SDK with the host URL and authenticate using a bot token stored in an environment variable. ```python import gazu gazu.set_host("https://kitsu.mystudio.com/api") gazu.set_token(os.environ["KITSU_BOT_TOKEN"]) ``` -------------------------------- ### LDAP User Synchronization Command Example Source: https://dev.kitsu.cloud/self-hosting/lightweight-directory-access-protocol Example command to synchronize users from LDAP to Kitsu, including necessary environment variables for credentials and synchronization settings. ```bash LC_ALL=C.UTF-8 \ LANG=C.UTF-8 \ DB_HOST=yourdbhost \ LDAP_HOST=192.168.1.10 LDAP_PORT=389 \ LDAP_BASE_DN=CN=Users,DC=mystudio,DC=local \ LDAP_DOMAIN=mystudio.com \ LDAP_USER=myusername \ LDAP_PASSWORD=myuserpassword \ LDAP_EMAIL_DOMAIN=mystudio.com \ LDAP_EXCLUDED_ACCOUNTS=Administrator,TestAccount \ zou sync-with-ldap-server ``` -------------------------------- ### Install Kitsu Publisher Connector for Blender on macOS Source: https://dev.kitsu.cloud/integrations/dcc/blender Installs the Kitsu Publisher connector for Blender on macOS, suitable for installations via DMG image or Homebrew. ```bash bash ./install.sh --dmg ``` -------------------------------- ### Install Kitsu Dependencies Source: https://dev.kitsu.cloud/open-source/development-environment-quickstart After cloning the repository, navigate into the project directory and run this command to download all necessary Node.js dependencies. ```shell cd kitsu npm install ``` -------------------------------- ### Run Toon Boom Harmony install script with help Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony Displays help information for the Toon Boom Harmony Kitsu Publisher installation script. This script is run using PowerShell on Windows. ```powershell .\install.ps1 -help ``` -------------------------------- ### Install boto3 for S3 Storage Source: https://dev.kitsu.cloud/self-hosting/environment-variables Install the boto3 package to enable S3 storage integration. This is required after setting S3-related environment variables. ```bash cd /opt/zou . zouenv/bin/activate pip install boto3 ``` -------------------------------- ### Install Zou and Upgrade Pip Source: https://dev.kitsu.cloud/self-hosting/setup Creates a Python virtual environment for Zou, upgrades pip within that environment, and installs the Zou package. ```bash sudo python3.12 -m venv /opt/zou/zouenv sudo /opt/zou/zouenv/bin/python -m pip install --upgrade pip sudo /opt/zou/zouenv/bin/python -m pip install zou ``` -------------------------------- ### Install virtualenvwrapper Source: https://dev.kitsu.cloud/open-source/development-environment-quickstart Install the virtualenvwrapper tool using pip. This helps manage Python virtual environments. ```bash pip install virtualenvwrapper ``` -------------------------------- ### CSV Format Example Source: https://dev.kitsu.cloud/recipes/import-studio-team Example of a CSV file structure for importing artist data, including email, first name, last name, and role. ```csv email,first_name,last_name,role jane.doe@example.com,Jane,Doe,Animator john.smith@example.com,John,Smith,Supervisor ``` -------------------------------- ### Install boto3 Package Source: https://dev.kitsu.cloud/self-hosting/preview-storage Install the boto3 package using pip within your virtual environment to enable S3 backend functionality. ```bash sudo /opt/zou/zouenv/bin/python -m pip install boto3 ``` -------------------------------- ### Quick Start Async Session Source: https://dev.kitsu.cloud/guides/async Initialize an asynchronous session with Kitsu and perform concurrent API calls using asyncio.gather. ```python import asyncio import gazu.aio async def main(): async with gazu.aio.create_session( "https://kitsu.mystudio.com/api", "user@example.com", "password", ) as client: # Fetch projects, task types, and task statuses concurrently projects, task_types, task_statuses = await asyncio.gather( gazu.aio.fetch_all("projects/open", client=client), gazu.aio.fetch_all("task-types", client=client), gazu.aio.fetch_all("task-status", client=client), ) print(f"{len(projects)} projects, {len(task_types)} task types") asyncio.run(main()) ``` -------------------------------- ### Start Vite Development Server Source: https://dev.kitsu.cloud/kitsu-plugins/development Run the Vite development server for the frontend. This enables hot reloading for faster frontend development cycles. ```bash cd plugins/my-plugin/frontend npm run dev ``` -------------------------------- ### Build and Run Kitsu Docker Container Source: https://dev.kitsu.cloud/start-here/docker Builds a Docker image for Kitsu or pulls the latest version, then runs it, exposing necessary ports. Use this for initial setup. ```bash docker build -t cgwire/cgwire . # or sudo docker pull cgwire/cgwire docker run --init -ti --rm -p 80:80 -p 1080:1080 --name cgwire cgwire/cgwire ``` -------------------------------- ### Clone Zou Repository Source: https://dev.kitsu.cloud/open-source/development-environment-quickstart Get the Zou backend sources by cloning its Git repository. This is necessary for backend development and setup. ```bash git clone git@github.com:cgwire/zou.git ``` -------------------------------- ### Plugin Manifest Configuration Source: https://dev.kitsu.cloud/kitsu-plugins/development Example `manifest.toml` file defining plugin metadata. This file is required for plugin deployment and description. ```toml id = "my_plugin" name = "My Plugin" version = "0.1.0" description = "My plugin description." maintainer = "Author " website = "mywebsite.com" license = "GPL-3.0-only" icon = "ticket-check" # Lucide icon name frontend_project_enabled = true # Show in production context frontend_studio_enabled = true # Show in studio context ``` -------------------------------- ### Create Zou User and Directories Source: https://dev.kitsu.cloud/self-hosting/setup Sets up a dedicated user 'zou' and creates necessary directories for Zou, including a backups folder, and sets appropriate ownership. ```bash sudo useradd --home /opt/zou zou sudo mkdir /opt/zou sudo mkdir /opt/zou/backups sudo chown zou: /opt/zou/backups ``` -------------------------------- ### Show Zou Version Source: https://dev.kitsu.cloud/references/cli Displays the currently installed version of the Zou CLI. ```bash zou version ``` -------------------------------- ### Full Workflow: Working File to Output File Source: https://dev.kitsu.cloud/recipes/file-management Demonstrates registering a working file and then producing an output file from it. Requires Gazu host and login credentials. ```python import gazu gazu.set_host("http://localhost/api") gazu.log_in("admin@example.com", "mysecretpassword") ``` -------------------------------- ### Enable Kitsu Services on Reboot Source: https://dev.kitsu.cloud/self-hosting/troubleshooting Configure Kitsu and its event service to start automatically on system reboot. ```bash sudo systemctl enable zou zou-events ``` -------------------------------- ### Create Project Template from Existing Project Source: https://dev.kitsu.cloud/guides/project-templates Generates a new project template by snapshotting the configuration of an existing project. This is useful for replicating established project setups. ```python template = gazu.project_template.new_project_template_from_project( project, name="Snapshot of Reference Show", description="Configuration extracted from our reference production", ) ``` -------------------------------- ### Build Frontend and Create Plugin Package Source: https://dev.kitsu.cloud/recipes/make-your-plugin Before packaging, build your plugin's frontend assets. Then, create the plugin package using the Zou CLI. ```bash cd plugins/my-plugin/frontend && npm run build && cd - python zou/cli.py create-plugin-package \ --path ./plugins/my-plugin \ --output-path ./dist ``` -------------------------------- ### Start Task (Set to WIP) Source: https://dev.kitsu.cloud/guides/task-tracking Convenience function to set a task's status to 'Work In Progress'. ```python gazu.task.start_task(task_dict) ``` -------------------------------- ### Initialize Zou Database and Data Source: https://dev.kitsu.cloud/open-source/development-environment-quickstart Clear the existing database, initialize a new one, and populate it with initial data using the Zou CLI. Ensure a Postgres database named 'zoudb' is set up with user 'postgres' and password 'mysecretpassword'. ```bash python zou/cli.py clear-db python zou/cli.py init-db python zou/cli.py init-data ``` -------------------------------- ### Create Preview and Temp Folders Source: https://dev.kitsu.cloud/self-hosting/setup Creates directories for storing video previews and temporary files, and sets ownership to the 'zou' user and 'www-data' group. ```bash sudo mkdir /opt/zou/previews sudo chown -R zou:www-data /opt/zou/previews sudo mkdir /opt/zou/tmp sudo chown -R zou:www-data /opt/zou/tmp ``` -------------------------------- ### Prepare New Instance with Zou CLI Source: https://dev.kitsu.cloud/self-hosting/data-migration Clears the original database and rebuilds tables on the new instance. Ensure environment variables are loaded. ```bash . /etc/zou/zou.env zou clear-db zou reset-migrations zou upgrade-db ``` -------------------------------- ### Script Entry Point for CSV Import Source: https://dev.kitsu.cloud/recipes/import-studio-team Example of a main script execution block that ties together authentication, CSV loading, parsing, and artist import. Ensure the 'artists.csv' file is in the same directory or provide a correct path. ```python if __name__ == "__main__": gazu.set_host("http://localhost/api") user = gazu.log_in("admin@example.com", "mysecretpassword") artists_df = load_csv(Path("artists.csv")) artists = parse_artists(artists_df) upload_artists(artists) ``` -------------------------------- ### Quick Start Session Management Source: https://dev.kitsu.cloud/guides/session-management Use `gazu.create_session` within a `with` block for automatic client login, session cleanup, and logout upon exiting the block. This is ideal for simple, single-session operations. ```python import gazu with gazu.create_session("https://kitsu.mystudio.com/api", "user@example.com", "password") as client: projects = gazu.project.all_open_projects(client=client) print(projects) # automatic logout + session close ``` -------------------------------- ### Create Kitsu Plugin Package Source: https://dev.kitsu.cloud/references/cli Packages a plugin's source folder into a zip file, preparing it for installation. The output path for the zip file can be specified. ```bash zou create-plugin-package --path ./plugins/my_plugin --output-path ./dist ``` -------------------------------- ### Batch Downloads with Overall Progress Tracking Source: https://dev.kitsu.cloud/recipes/progress-callbacks Demonstrates downloading multiple files sequentially while tracking overall progress using `tqdm`. It first gathers all preview files and then iterates through them, displaying progress for each download. ```python from tqdm import tqdm project = gazu.project.get_project_by_name("My Project") tasks = gazu.task.all_tasks_for_project(project) comments_with_previews = [] for task in tasks: for comment in gazu.task.all_comments_for_task(task): for preview in comment.get("previews", []): comments_with_previews.append(preview) for i, preview in enumerate(comments_with_previews, 1): print(f"[{i}/{len(comments_with_previews)}] {preview['id']}") gazu.files.download_preview_file( preview, f"./downloads/{preview['id']}.mp4", progress_callback=on_progress, ) print() ``` -------------------------------- ### gazu.task.start_task Source: https://dev.kitsu.cloud/references/gazu Marks a task as started and sets its real start date to the current time. Optionally, it can update the task status to a specified 'started' status and assign it to a person. ```APIDOC ## gazu.task.start_task(task, started_task_status = None, person = None) ### Description Create a comment to change task status to started_task_status (by default WIP) and set its real start date to now. ### Method Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * **task** (str / dict) - The task dict or the task ID. * **started_task_status** (str / dict) - The task status dict or ID. * **person** (str / dict) - The person dict or the person ID. ### Returns (dict) Created comment. ``` -------------------------------- ### Run Zou Debug Server Source: https://dev.kitsu.cloud/open-source/development-environment-quickstart Start the Zou debug server with specified environment variables for preview folder, debugging, and mail settings. The API will be available at http://localhost:5000. ```bash PREVIEW_FOLDER=$PWD/previews DEBUG=1 MAIL_DEBUG=1 FLASK_DEBUG=1 FLASK_APP=zou.app INDEXER_KEY=meilimasterkey python zou/debug.py ``` -------------------------------- ### Create New Project Template Source: https://dev.kitsu.cloud/guides/project-templates Initializes a new project template with basic production settings. This serves as the foundation before attaching specific configurations. ```python template = gazu.project_template.new_project_template( name="Animated Series", description="Default setup for our 11-minute episodes", fps="24", ratio="16:9", resolution="1920x1080", production_type="tvshow", production_style="3d", ) ``` -------------------------------- ### OIDC Redirect URI Example Source: https://dev.kitsu.cloud/self-hosting/openid-connect-sso Register this URI on your identity provider's client configuration. Replace placeholders with your domain details. ```text :///api/auth/oidc/callback ``` -------------------------------- ### OIDC Redirect URI Example (Concrete) Source: https://dev.kitsu.cloud/self-hosting/openid-connect-sso An example of a concrete redirect URI for OIDC authentication. ```text https://kitsu.example.com/api/auth/oidc/callback ``` -------------------------------- ### Create a Studio Source: https://dev.kitsu.cloud/guides/team-management Use this snippet to create a new studio with a specified name and color. ```python gazu.studio.new_studio("Paris", "#0000CC") ``` -------------------------------- ### Install RPM Build Tool Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony If you intend to build RPM packages on Debian-based Linux, install the 'rpm' package. ```bash apt-get install rpm ``` -------------------------------- ### Initialize Database Tables Source: https://dev.kitsu.cloud/references/cli Creates the necessary database tables. Ensure the database itself already exists before running this command. ```bash zou init-db ``` -------------------------------- ### Seed Initial Data for Kitsu Source: https://dev.kitsu.cloud/self-hosting/setup Run this command to populate Kitsu with necessary basic data like project statuses. Ensure the environment is sourced first. ```bash . /etc/zou/zou.env /opt/zou/zouenv/bin/zou init-data ``` -------------------------------- ### Install Zou Python Dependencies Source: https://dev.kitsu.cloud/open-source/development-environment-quickstart With the 'zou' virtual environment activated, install the required Python packages listed in requirements.txt. ```bash pip install -r requirements.txt ``` -------------------------------- ### Retrieve Project by Name using Kitsu API Source: https://dev.kitsu.cloud/guides/bot-automation This Python script demonstrates how to connect to the Kitsu API using a bot token and retrieve a project by its name. Ensure you have the 'gazu' library installed and replace placeholders with your Kitsu host and bot token. ```python import gazu gazu.set_host("yourkitsu.cg-wire.com/api/") gazu.set_token("my_jwt_token") p = gazu.project.get_project_by_name("MyProduction") ``` -------------------------------- ### Setting Up Project File Tree Source: https://dev.kitsu.cloud/recipes/file-management Configure the directory structure and naming conventions for your project's files. This involves defining mount points, root directories, folder paths, and file name formats for different entity types and modes. ```python import gazu gazu.set_host("http://localhost/api") gazu.log_in("admin@example.com", "mysecretpassword") project = gazu.project.get_project_by_name("My Project") gazu.files.update_project_file_tree(project, { "working": { "mountpoint": "/prod", "root": "work", "folder_path": { "shot": "/shots///", "asset": "/assets///", "sequence": "/sequences//", "style": "lowercase" }, "file_name": { "shot": "____v", "asset": "____v", "sequence": "___v", "style": "lowercase" } }, "output": { "mountpoint": "/prod", "root": "output", "folder_path": { "shot": "/shots////", "asset": "/assets////", "sequence": "/sequences///", "style": "lowercase" }, "file_name": { "shot": "____v", "asset": "____v", "sequence": "___v", "style": "lowercase" } }, "delivery": { "mountpoint": "/delivery", "root": "final", "folder_path": { "shot": "//", "asset": "//", "sequence": "/", "style": "lowercase" }, "file_name": { "shot": "___v", "asset": "___v", "sequence": "__v", "style": "lowercase" } } }) ``` -------------------------------- ### Initialize and Run Event Listener Source: https://dev.kitsu.cloud/guides/event-listeners This snippet shows how to initialize the event client, add a listener for new assets, and run the client. It's recommended to run the event client in a separate thread to avoid blocking the main thread. ```python gazu.set_host("https://kitsu.mystudio.com/api") gazu.set_event_host("https://kitsu.mystudio.com") gazu.log_in("email", "password") def my_callback(data): print("Asset created %s" % data["asset_id"]) event_client = gazu.events.init() gazu.events.add_listener(event_client, "asset:new", my_callback) gazu.events.run_client(event_client) ``` -------------------------------- ### Install Python 3.12 and Development Headers Source: https://dev.kitsu.cloud/self-hosting/setup Adds the deadsnakes PPA to install Python 3.12 and its development headers, which are necessary for compiling Python extensions. ```bash sudo apt-get install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt-get update sudo apt-get install python3.12 python3.12-venv python3.12-dev ``` -------------------------------- ### Install Plugin in Editable Mode Source: https://dev.kitsu.cloud/kitsu-plugins/development Install the plugin in editable mode for development. This allows code changes to be reflected without needing to reinstall the plugin. ```bash pip install -e ./plugins/my-plugin ``` -------------------------------- ### Create a New Project Source: https://dev.kitsu.cloud/guides/production-setup Use this to create a new project, which serves as the root container for all production data. You can specify the production type and style. ```python project = gazu.project.new_project(name="Agent 327", production_type="short", production_style="2d") ``` -------------------------------- ### Set Task Start and Due Dates Source: https://dev.kitsu.cloud/guides/task-tracking Update the planned start and due dates for a task. Ensure the task object is fetched and updated correctly. ```python task = gazu.task.get_task(task_id) task["start_date"] = "2024-03-01" task["due_date"] = "2024-03-15" gazu.task.update_task(task) ``` -------------------------------- ### Install macOS Build Dependencies Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony On macOS, use Homebrew to install the necessary packages for building the Electron app, including graphics libraries and build utilities. ```bash brew install pkg-config cairo pango libpng jpeg giflib librsvg ``` -------------------------------- ### Initialize Database Source: https://dev.kitsu.cloud/self-hosting/setup Run this command in your bash console to initialize the Kitsu database. Ensure environment variables are sourced first. ```bash . /etc/zou/zou.env /opt/zou/zouenv/bin/zou init-db ``` -------------------------------- ### Install Debian Build Dependencies Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony On Debian-based Linux systems, install these packages to build the Electron app. This includes essential build tools and graphics libraries. ```bash apt-get install build-essential libcairo2-dev libpango1.0-dev \ libjpeg-dev libgif-dev librsvg2-dev ``` -------------------------------- ### Full Instance Synchronization Source: https://dev.kitsu.cloud/references/cli Retrieves all data from a source instance. Requires source API URL and project name. ```bash zou sync-full --source https://source-kitsu.com/api --project "My Project" ``` -------------------------------- ### Install rpm package on Linux Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony Installs the Kitsu Publisher rpm package on RHEL-based Linux distributions. Replace {version} with the current Kitsu Publisher version. ```bash rpm -i kitsu-publisher_{version}_x86_64.rpm ``` -------------------------------- ### List All Projects Source: https://dev.kitsu.cloud/guides/production-setup Fetches a list of all projects available in the system. ```python projects = gazu.project.all_projects() ``` -------------------------------- ### Install deb package on Linux Source: https://dev.kitsu.cloud/integrations/dcc/toon-boom-harmony Installs the Kitsu Publisher deb package on Debian-based Linux distributions. Ensure you replace {version} with the actual Kitsu Publisher version. ```bash dpkg -i kitsu-publisher_{version}_amd64.deb ``` -------------------------------- ### Generate Preview Extras Source: https://dev.kitsu.cloud/references/cli Use this command to generate tiles, thumbnails, and metadata for project previews. It can be limited to specific projects, entities, or episodes. ```bash zou generate-preview-extra --project "My Project" --with-tiles --with-thumbnails ``` -------------------------------- ### gazu.task.all_tasks_for_person_and_type Source: https://dev.kitsu.cloud/references/gazu Gets all tasks for a person and task type. ```APIDOC ## gazu.task.all_tasks_for_person_and_type ### Description Gets all tasks for a person and task type. ### Method Not specified (assumed to be a function call in a Python SDK) ### Parameters #### Path Parameters - **person** (str / dict) - Required - The person dict or id. - **task_type** (str / dict) - Required - The task type dict or id. ### Response #### Success Response - **tasks** (list[dict]) - Tasks for the person and task type. ``` -------------------------------- ### Get Project by Name Source: https://dev.kitsu.cloud/guides/production-setup Retrieves a specific project by its name. ```python project = gazu.project.get_project_by_name(name="Agent 327") ``` -------------------------------- ### Create a New Project with a Template Source: https://dev.kitsu.cloud/guides/project-templates Apply a project template by passing it to the `new_project` function during project creation. The template provides default settings. ```python template = gazu.project_template.get_project_template_by_name("Animated Series") project = gazu.project.new_project( name="Episode 5 — The Heist", project_template=template, ) ``` -------------------------------- ### gazu.task.get_task_time_spent_for_date Source: https://dev.kitsu.cloud/references/gazu Gets the time spent for a specific task on a given date. ```APIDOC ## gazu.task.get_task_time_spent_for_date(task, date) ### Description Gets the time spent for a task on a specific date. ### Parameters #### Path Parameters - **task** (str / dict) - Required - The task dict or id. - **date** (str) - Required - Date in YYYY-MM-DD format. ### Returns - (dict) Time spent information. ``` -------------------------------- ### `gazu.person.get_person_url(person)` Source: https://dev.kitsu.cloud/references/gazu Gets the web URL associated with a given person. ```APIDOC ## `gazu.person.get_person_url(person)` ### Description Gets the web URL associated with a given person. ### Parameters #### Path Parameters - **person** (str / dict) - Required - The person dict or the person ID. ### Returns (str) Web url associated to the given person ``` -------------------------------- ### Create Plugin Skeleton Source: https://dev.kitsu.cloud/kitsu-plugins/development Use this command to generate the basic file structure for a new Kitsu plugin. ```bash zou create-plugin-skeleton --path ./plugins --id my-plugin ``` -------------------------------- ### Manual Async Client Authentication Source: https://dev.kitsu.cloud/guides/async Manually create an async client instance, log in to obtain tokens, perform operations, and then log out. ```python client = gazu.aio.AsyncKitsuClient("https://kitsu.mystudio.com/api") tokens = await gazu.aio.log_in("user@example.com", "password", client=client) # ... do work ... await gazu.aio.log_out(client=client) ``` -------------------------------- ### Get Task Status by Name Source: https://dev.kitsu.cloud/guides/task-tracking Retrieve a task status by its name. ```python task_status = gazu.task.get_task_status_by_name(task_status_name) ``` -------------------------------- ### Get Task Type by Name Source: https://dev.kitsu.cloud/guides/task-tracking Retrieve a task type by its name. ```python task_type = gazu.task.get_task_type_by_name(task_type_name) ``` -------------------------------- ### Create Database Tables for Testing Source: https://dev.kitsu.cloud/recipes/make-your-plugin Create the necessary database tables for testing if they do not already exist. This command should be run with the test database specified. ```bash DB_DATABASE=zoudb-test python -c \ "from zou.app import app, db; app.app_context().push(); db.create_all()" ``` -------------------------------- ### Get Project by ID Source: https://dev.kitsu.cloud/guides/production-setup Retrieves a specific project using its unique identifier. ```python project = gazu.project.get_project(project_id) ``` -------------------------------- ### gazu.client.get Source: https://dev.kitsu.cloud/references/gazu Performs a GET request to a specified path, returning a JSON response by default. ```APIDOC ## gazu.client.get(path, json_response = True, params = None) ### Description Run a get request toward given path for configured host. ### Parameters #### Path Parameters - **path** (str) - Required - The path to query. - **json_response** (bool) - Optional - Whether to return a json response. Defaults to True. - **params** (dict) - Optional - The parameters to pass to the request. ``` -------------------------------- ### Enable Studio-wide Section in Manifest Source: https://dev.kitsu.cloud/kitsu-plugins/development Add `frontend_studio_enabled = true` and an `icon` to your plugin's manifest file to create a section in the Kitsu left sidebar. The icon is chosen from the Lucide icon set. ```toml frontend_studio_enabled = true icon = "ticket-check" ``` -------------------------------- ### Get Kitsu API Version Source: https://dev.kitsu.cloud/self-hosting/setup Retrieves the version information of the Kitsu API server. ```python gazu.client.get_api_version() ``` -------------------------------- ### gazu.files.new_software Source: https://dev.kitsu.cloud/references/gazu Creates a new software in the database. ```APIDOC ## gazu.files.new_software ### Description Create a new software in datatabase. ### Parameters #### Path Parameters - `name` (str) - Required - Name of created software. - `short_name` (str) - Required - Short representation of software name (for UIs). - `file_extension` (str) - Required - Main file extension generated by given software. - `secondary_extensions` (list[str]) - Optional - Optional list of secondary file extensions (e.g. ["ma", "mb"] for Maya). ### Returns (dict) Created software. ``` -------------------------------- ### Get Task Status by ID Source: https://dev.kitsu.cloud/guides/task-tracking Retrieve a task status using its unique identifier. ```python task_status = gazu.task.get_task_status(task_status_id) ``` -------------------------------- ### Get Task Type by ID Source: https://dev.kitsu.cloud/guides/task-tracking Retrieve a task type using its unique identifier. ```python task_type = gazu.task.get_task_type(task_status_id) ``` -------------------------------- ### Scaffold Kitsu Plugin Skeleton Source: https://dev.kitsu.cloud/recipes/make-your-plugin Use the Kitsu CLI to generate the basic file structure and manifest for a new plugin. This command should be run from the 'zou' folder. ```bash python zou/cli.py create-plugin-skeleton --path ./plugins --id my-plugin ``` -------------------------------- ### gazu.project.new_project Source: https://dev.kitsu.cloud/references/gazu Creates a new project with specified configurations. ```APIDOC ## gazu.project.new_project(name, production_type = 'short', team = None, asset_types = None, task_statuses = None, task_types = None, production_style = '2d3d', project_template = None) ### Description Creates a new project. ### Parameters #### Path Parameters - **name** (str) - Required - Name of the project to create. - **production_type** (str) - Optional - Type of production (short, featurefilm, tvshow). Defaults to 'short'. - **team** (list) - Optional - Team of the project. - **asset_types** (list) - Optional - Asset types of the project. - **task_statuses** (list) - Optional - Task statuses of the project. - **task_types** (list) - Optional - Task types of the project. - **production_style** (str) - Optional - Style of production (2d, 3d, 2d3d, ar, vfx, stop-motion, motion-design, archviz, commercial, catalog, immersive, nft, video-game, vr). Defaults to '2d3d'. - **project_template** (dict / ID) - Optional - Project template to apply after creation. Settings explicitly provided in the call (fps, ratio, etc.) take precedence over the template's defaults. ### Returns - (dict) Created project. ``` -------------------------------- ### Get a Specific Working File Source: https://dev.kitsu.cloud/guides/asset-management Retrieve a single working file by its unique ID. ```python working_file = gazu.files.get_working_file(working_id) ``` -------------------------------- ### Get Project Team Source: https://dev.kitsu.cloud/guides/team-management Retrieves the list of users currently assigned to a specific project. ```python team = gazu.project.get_team(project) ``` -------------------------------- ### Instantiate and Use Multiple Kitsu API Clients (Python) Source: https://dev.kitsu.cloud/start-here/dev-quickstart Create and manage multiple API clients to interact with different Kitsu servers or simulate different user sessions. This allows for tasks like data migration or switching between user contexts. ```python source_client = gazu.client.create_client("https://mysource.kitsu") target_client = gazu.client.create_client("https://mytarget.kitsu") gazu.client.log_in("user-source@mail.com", "default", client=source_client) gazu.client.log_in("user-target@mail.com", "default", client=target_client) gazu.client.get("/", client=source_client) gazu.project.all_open_projects(client=target_client) ``` -------------------------------- ### Rename a Database Source: https://dev.kitsu.cloud/self-hosting/backup Rename an existing database, for example, to convert it to the default database name 'zoudb'. ```bash ALTER DATABASE targetdb RENAME TO zoudb; ``` -------------------------------- ### Get Task by Entity and Type Source: https://dev.kitsu.cloud/guides/task-tracking Retrieve a specific task for an entity using its task type. ```python task = gazu.task.get_task_by_entity(asset, task_type) ``` -------------------------------- ### Create Plugin Package Source: https://dev.kitsu.cloud/recipes/make-your-plugin Package your plugin into a zip archive for distribution. This includes backend code, migrations, manifest, and frontend build artifacts. ```bash python zou/cli.py create-plugin-package \ --path ./plugins/my-plugin \ --output-path ./dist ``` -------------------------------- ### Enable Production Section Source: https://dev.kitsu.cloud/kitsu-plugins/development Configure a section in the production menu by setting 'frontend_project_enabled' to true and providing an icon. ```toml frontend_project_enabled = true icon = "ticket-check" ``` -------------------------------- ### Restart Zou Server Source: https://dev.kitsu.cloud/kitsu-plugins/installation After installing a plugin, restart the Zou server to load new routes and models. ```bash sudo systemctl restart zou ``` -------------------------------- ### Create Testing PostgreSQL Database Source: https://dev.kitsu.cloud/open-source/development-environment-quickstart Create a new PostgreSQL database named 'zoutest' using the psql command. This is recommended for running tests to avoid conflicts with the development database. ```bash sudo su -l postgres psql -c 'create database zoutest;' -U postgres ``` -------------------------------- ### Get Kitsu API Server Hostname Source: https://dev.kitsu.cloud/self-hosting/setup Retrieves the hostname of the currently configured Kitsu API server. ```python gazu.client.get_host() ``` -------------------------------- ### Retrieve Output Type by ID or Name Source: https://dev.kitsu.cloud/guides/asset-management Get a specific output type using its ID or name. ```python output_type = gazu.files.get_output_type(output_type_id) ``` ```python output_type = gazu.files.get_output_type_by_name("Cache") ``` -------------------------------- ### List All Software Source: https://dev.kitsu.cloud/guides/asset-management Retrieve a list of all registered DCC software in Kitsu. ```python softwares = gazu.files.all_softwares() ``` -------------------------------- ### Uninstall Plugin Source: https://dev.kitsu.cloud/kitsu-plugins/installation Remove an installed plugin using its ID. This process also triggers uninstall lifecycle hooks. ```bash zou uninstall-plugin --id my_plugin ```