MediaUse Docs

Plugin Structure
Deep dive into the file structure and configuration of a MediaUse plugin.
Standard Directory Structure
A robust site plugin follows a strict directory convention to ensure compatibility across the platform.
<site>/                  # Site folder (e.g., twitter/)
  manifest.yaml          # Core metadata and command tree
  workflows/             # YAML-based process orchestration
    search.yaml          # Search-related workflows
    post.yaml            # Posting-related workflows
  scripts/               # Page-side JavaScript logic
    <site>.site.js       # Extraction and helper functions
  tests/                 # Local integration tests
Manifest & Workflow Example
A real-world example of how commands are mapped to workflows and actions.
# manifest.yaml
name: "example_site"
commands:
  search:
    list:
      workflow: workflows/search.yaml
      operation: list
      params:
        - name: keyword
          type: string
          required: true

# workflows/search.yaml
list:
  steps:
    - action: navigate
      url: "https://www.example.com/search?q={{keyword}}"
    - action: waitforfunction
      expression: "!!document.querySelector(".list_item")"
    - action: evaluate
      script: "() => window.__mediauseDytt.extractList()"
File Details
Detailed explanation of each file's role:
File/DirRequirementDescription
manifest.yamlMandatoryDeclares name, version, auth flow, and command category mapping.
workflows/MandatoryContains YAML files defining browser step sequences (navigate, click, upload).
scripts/RecommendedContains JavaScript injected into the page for data extraction (site.js).
tests/RecommendedLocal integration tests to verify plugin stability.