Skip to content

ZapaNOR/SimpleSearch

Repository files navigation

Simple Search

Simple Search is a spotlight-style search window for World of Warcraft systems.

In-game

  • Slash command: /ss
  • Default keybind: CTRL + Space
  • If you use character-specific keybindings, you may need to assign Toggle Simple Search manually in the native Keybindings menu.

Extending From Another Addon

Third-party addons can register new Simple Search modules without editing the SimpleSearch folder.

Recommended addon manifest setup:

## OptionalDeps: SimpleSearch

Example extension module:

This example uses ride: instead of mount: so it does not collide with the built-in mounts module.

local ss = _G.SimpleSearch
if not ss or (ss.API_VERSION or 0) < 1 then
    return
end

local RideSearch = {
    id = "ride_search",
    label = "Ride Search",
    prefixes = { "ride", "rides" },
    favoriteIDPrefixes = { "ride:" },
}

function RideSearch:Search(query, limit)
    local results = {}
    local normalizedQuery = ss:NormalizeText(query)

    for _, mountID in ipairs(C_MountJournal.GetMountIDs() or {}) do
        local name, _, icon, _, isUsable, _, _, _, _, shouldHideOnChar, isCollected = C_MountJournal.GetMountInfoByID(mountID)
        if name and isCollected and not shouldHideOnChar then
            local _, description, source = C_MountJournal.GetMountInfoExtraByID(mountID)
            local score = ss:ScoreQuery(normalizedQuery, name, source or "", description or "")
            if score then
                results[#results + 1] = {
                    id = "ride:" .. mountID,
                    title = name,
                    icon = icon,
                    score = score,
                    sortText = ss:NormalizeText(name),
                    lineView = {
                        icon = icon,
                        title = name,
                        subtitle = "Mount",
                        disabled = not isUsable,
                    },
                    action = isUsable and function()
                        ss:Close()
                        C_MountJournal.SummonByID(mountID)
                    end or nil,
                }
            end
        }
    end

    table.sort(results, function(left, right)
        if left.score ~= right.score then
            return left.score > right.score
        end

        return left.sortText < right.sortText
    end)

    while #results > limit do
        table.remove(results)
    end

    return results
end

local ok, err = ss:RegisterModule(RideSearch)
if not ok then
    geterrorhandler()(err)
end

Supported module fields:

  • id: unique string identifier, required.
  • label: display name, required.
  • prefixes: optional list of mount-style prefixes. Simple Search handles the trailing :.
  • favoriteIDPrefixes: optional list used to map favorites back to the module.
  • Search(query, limit): required. Returns a result array.
  • OnInitialize(): optional. Called once when Simple Search is ready, including for modules that register after login.
  • GetImplicitQuery(rawQuery): optional. Lets a module claim raw input such as /reload.
  • TryExecuteInput(rawQuery): optional. Lets a module directly execute raw input on Enter.

Supported result fields:

  • id: unique result id, required.
  • title: primary title.
  • icon: optional icon texture path or file id.
  • score: numeric search score.
  • sortText: optional secondary sort key.
  • lineView: optional row renderer data with title, subtitle, icon, and disabled.
  • action(result): optional click/enter action for normal Lua-safe execution.
  • macroText: optional secure macro execution path for protected actions.

Release Files

  • .pkgmeta controls packaging metadata for Wago/CurseForge.
  • .release/release.sh builds the release zip and can upload it.
  • .env stores your local API tokens and is intentionally ignored by Git.

Release Checklist

  1. Bump ## Version in SimpleSearch.toc.
  2. Add the real X-Wago-ID and X-Curse-Project-ID values to SimpleSearch.toc after the project pages exist.
  3. Add the real wago-id and curse-id values to .pkgmeta.
  4. Copy .env.example to .env and fill in your tokens.
  5. Create a Git tag such as v1.0.0 if you want a clean packaged version string.

Local Packaging

Build a local zip without uploading:

./.release/release.sh -d

Build and upload after .env is configured:

./.release/release.sh

The generated zip is written under .release/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors