ooc-lang / sam

:package: sam keeps your ooc repos up-to-date

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add search functionality

rvd opened this issue · comments

commented

i.e.
$ sam search "keyword"

keyword would then be matched against title and description of all published packages.

$ sam info "package"
could be a printout of description and dependencies

I suspect the grimoire was originally meant to be more than just a collection of Origins, and descriptions longer than one line would perfectly fit in the formula yaml files.

As it is now, no formula has descriptions, so on "sam update" a library/index or stub file could be created/updated which holds at least a description of every package copied from the usefile of that package. This index could then be used for the search.

Indeed, the library should ideally contain more than origins, such as descriptions, homepages, etc. As for having a local index to speed up search, that could be for a v2 of the search feature - seeing as the number of formulas is quite low for the time being, even a plain text search would work (afaict homebrew doesn't have an index file, just flat files for each formula and it does the search in that).