For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

取得數據

你可以透過 Eagle Plugin API 提供的方法存取儲存在 Eagle 應用的各種數據,比如檔案、資料夾、資源庫等,這裏有一些簡單的範例:

範例一:取得當前應用選中的檔案

let selected = await eagle.item.getSelected();
console.log(selected);

範例二:取得指定條件之檔案

let items = await eagle.item.get({
    ids: [],
    isSelected: true,
    isUnfiled: true,
    isUntagged: true,
    keywords: [""],
    ext: "",
    tags: [],
    folders: [],
    shape: "square",
    rating: 5,
    annotation: "",
    url: ""
});

範例三:取得當前應用選中的資料夾

除上述外,Eagle Plugin API 還提供許多不同的 API 取得資訊,請點擊下方連結查看完整資訊:

Last updated