Skip to content

[Feature]: formats <format> --json: name the engines each "withEngines" target needs #1710

Open

Description

@yavuzmeteafsar

What would you like Filee to do?

In filee formats <format> --json, add needsEngines: for each target in withEngines, the engines to install for it. It would follow the same rule as needsEngines on failed files in convert --json (#753, #773): only engines offered in Settings → Engines, and all the ones one route needs.

{
  "id": "md",
  "targets": ["pdf", "docx", "html"],
  "withEngines": ["pptx"],
  "needsEngines": { "pptx": ["pandoc"] }
}

Existing fields stay as they are; only the one-format output gets the new field.

Why / when would you use it?

A front end can then say "Install Pandoc to convert to PPTX" in its format picker, and run filee engines install pandoc --json from there. My macOS app (Molt) would do exactly this. Today a program only learns which engine is missing after a conversion fails, from needsEngines on the failed file.

The CLI already knows the answer: OptionalEngineRoutes.MissingPackages is behind both withEngines and needsEngines in convert --json, so this mostly writes out what is already computed.

Ideas for how it could work

  • An object keyed by target (as above). An array of { "target", "engines" } would also work; your call.
  • Update filee help formats and skills/filee/SKILL.md, with tests in Filee.Cli.Tests.
  • Optionally the text output too: "With optional engines: pptx (pandoc), …". Only if you want it.

I'd like to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions