fpm icon indicating copy to clipboard operation
fpm copied to clipboard

add: fpm search

Open henilp105 opened this issue 1 year ago • 2 comments

This PR intends to add the search and discovery of fpm installed and fpm - registry packages directly from cli. this command supports globbing for package name, version, license, namespace. the similar functionality has been patched at the registry repo. (https://github.com/fortran-lang/registry/pull/81). paging is not used in local registry due to multiple search queries.

This is the syntax of the new fpm search functionality:

fpm search --query q* --page 1 --registry URL --namespace n* --package p* --package_version v* --license l* --limit 10 --sort-by [name] --sort [asc/desc]

Parameters:

  • [x] query: Searches in fpm.toml description and fpm-registry descriptions only for fpm-registry (README.md) (case insensitive, globbing supported).
  • [x] package: Searches by package name (case insensitive, globbing supported).
  • [x] registry: Custom registry URL (default: fpm-registry).
  • [x] namespace: Searches by namespace (globbing supported).
  • [x] package_version: Searches by package version (globbing supported).
  • [x] license: Searches by license (globbing supported).
  • [x] page: Page number (default: 1).
  • [x] limit: Number of results (default: 10).
  • [x] sort-by: Sorts by name, author, createdat, updatedat, downloads (default: name).
  • [x] sort: Order of sorting, asc or desc (default: asc).

Tasks left

  • [ ] add docs and tests
  • [x] clean and refactor

Thanks and Regards, Henil

CC @certik @awvwgk @perazz @arteevraina

henilp105 avatar Jun 22 '24 17:06 henilp105

Let's get this merged @henilp105, is there any more tasks you plan of adding?

perazz avatar Sep 09 '24 09:09 perazz

Sure @perazz , Let's get this merged in a week, I will add some tests and clean UI by then.

henilp105 avatar Sep 09 '24 15:09 henilp105