Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: fpm search #1054

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7d5a99d
fix: url bug
henilp105 Mar 27, 2024
06d353c
Merge branch 'fortran-lang:main' into fpm-search
henilp105 May 18, 2024
94fdf25
add: search functionality for fpm registry
henilp105 May 19, 2024
0a4f910
add: search
henilp105 May 19, 2024
7a4bdb5
add: search
henilp105 May 19, 2024
cc9bd57
add: search
henilp105 May 19, 2024
0a99d4a
add: search
henilp105 May 19, 2024
b048451
add: search
henilp105 May 19, 2024
0b66b85
add: search
henilp105 May 19, 2024
d2b173a
fix search
henilp105 May 19, 2024
6d5c44b
add: search
henilp105 May 19, 2024
354fda1
fix: get file and add page
henilp105 May 19, 2024
baed1f5
fix: if no page number is provided
henilp105 May 19, 2024
3456c39
add: search functionality support registry, namespaces,packages
henilp105 May 26, 2024
384ef93
clean
henilp105 May 26, 2024
ea021d3
clean
henilp105 May 26, 2024
7dbd3f7
clean
henilp105 May 26, 2024
11c05cb
clean
henilp105 May 26, 2024
762b78e
clean
henilp105 May 26, 2024
08f0171
clean
henilp105 May 26, 2024
511a107
Merge branch 'fortran-lang:main' into fpm-search
henilp105 May 26, 2024
a87b472
fix
henilp105 May 27, 2024
5f3a18d
fix
henilp105 May 27, 2024
334eeb5
add: new search paramters
henilp105 May 27, 2024
a0dbf40
add: new search paramters
henilp105 May 27, 2024
494194f
add: new search paramters
henilp105 May 27, 2024
5eb04a5
add: new search paramters
henilp105 May 27, 2024
034051d
add: version functionality
henilp105 May 29, 2024
373155c
add: docs
henilp105 May 29, 2024
18c3975
search in local registry
henilp105 May 29, 2024
606c20a
add: search
henilp105 May 29, 2024
e9822d9
Merge branch 'fortran-lang:main' into fpm-search
henilp105 May 29, 2024
c1216f0
add: search
henilp105 May 29, 2024
fc62c32
add: local registry search functionality for all parameters
henilp105 May 31, 2024
ced681e
clean
henilp105 May 31, 2024
52b0d79
add: enable global search
henilp105 May 31, 2024
0ca0eae
fix: bugs
henilp105 May 31, 2024
4a4c6ce
clean
henilp105 May 31, 2024
8800925
clean
henilp105 May 31, 2024
b02bd72
search description
henilp105 Jun 6, 2024
e05e51d
search query matching
henilp105 Jun 6, 2024
469051f
fix: search and clean
henilp105 Jun 6, 2024
c1b0c18
seach local registry functionality with all parameters
henilp105 Jun 6, 2024
aa1112b
Merge branch 'fortran-lang:main' into fpm-search
henilp105 Jun 7, 2024
8496b5c
clean
henilp105 Jun 9, 2024
4beb573
Merge branch 'fortran-lang:main' into fpm-search
henilp105 Jun 22, 2024
5c259a4
refactor
henilp105 Jun 22, 2024
1c86fdf
refactor and clean
henilp105 Jun 22, 2024
4a1975f
clean
henilp105 Jun 23, 2024
0f668a5
fix
henilp105 Jun 23, 2024
dad1f49
add docs
henilp105 Jun 23, 2024
c3f27ba
fix
henilp105 Jun 23, 2024
81ea75b
clean
henilp105 Jun 23, 2024
805f1e5
Merge branch 'main' into fpm-search
henilp105 Jun 28, 2024
a62162a
fix
henilp105 Jun 28, 2024
ad779ec
add: comments
henilp105 Jul 2, 2024
2d088aa
test commit
henilp105 Aug 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: bugs
henilp105 committed May 31, 2024
commit 0ca0eae2fc8e5bef56d753fb126c4ca7fa7d6191
10 changes: 8 additions & 2 deletions src/fpm/cmd/search.f90
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ subroutine cmd_search(settings)
!> Settings for the search command.
class(fpm_search_settings), intent(in) :: settings
type(fpm_global_settings) :: global_settings
character(:), allocatable :: tmp_file, name, namespace, description, query_url
character(:), allocatable :: tmp_file, name, namespace, description, query_url,package_version
type(toml_key), allocatable :: list(:)
integer :: stat, unit, ii
type(json_object) :: json
@@ -81,14 +81,16 @@ subroutine cmd_search(settings)

!> search parameters: name, namespace, version, license, query -> (description1, description2)
!> namespace,version,package from url.
!> add to search only in the local/global registry
!> for description search
!> fix all the version search in global and add docs for parameters.
!> description1 from fpm.toml and description2 from README.md
!> name, license, version, description1 from fpm.toml
!> description2 from README.md (if exists)
!> order manipulation parameters: page, sort, sort_by, limit
!> show page number and total_pages

!> Get the package data from the registry
! print *, settings%namespace
call downloader%get_pkg_data(query_url, version, tmp_file, json, error)
close (unit)
if (allocated(error)) then
@@ -107,9 +109,11 @@ subroutine cmd_search(settings)
call get_value(p, 'name', name)
call get_value(p, 'namespace', namespace)
call get_value(p, 'description', description)
call get_value(p, 'version', package_version)
print *, "Name: ", name
perazz marked this conversation as resolved.
Show resolved Hide resolved
print *, "namespace: ", namespace
print *, "Description: ", description
print *, "version: ", package_version
print *, ""
end do
else
@@ -152,6 +156,8 @@ subroutine search_package(namespace,package,version)
wild = wild//"/?.?.?"
end if
wild = wild//"/fpm.toml"
! print *, wild
print *, "Package Search in Local Registry:"

! Scan directory for packages
call list_files(path, file_names,recurse=.true.)