Added starting and containing results individual sorting
Updated spec file to work on gitea releases
This commit is contained in:
parent
96f7a83e1e
commit
d844f1de04
@ -157,14 +157,14 @@ class SearchPassService(dbus.service.Object):
|
||||
path = path_join(dir_path, filename)[:-4]
|
||||
password_list.append(path)
|
||||
|
||||
results = list(filter(lambda p: p.startswith(name), password_list))[:5]
|
||||
results = list(sorted(filter(lambda p: p.startswith(name), password_list)))[:5]
|
||||
|
||||
remaining = 5 - len(results)
|
||||
|
||||
if remaining > 0:
|
||||
containing_results = list(filter(lambda p: name in p, password_list))[
|
||||
:remaining
|
||||
]
|
||||
containing_results = list(
|
||||
sorted(filter(lambda p: name in p, password_list))
|
||||
)[:remaining]
|
||||
|
||||
results.extend(containing_results)
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
Name: gnome-pass-search-provider
|
||||
Version: 1.3.2
|
||||
Version: 1.3.3
|
||||
Release: %autorelease
|
||||
Summary: Gnome Shell search provider for zx2c4/pass
|
||||
License: GPL-3.0+
|
||||
Url: https://git.dm1sh.ru/dm1sh/%{name}
|
||||
Source0: https://git.dm1sh.ru/dm1sh/%{name}/archive/%{name}-%{version}.tar.gz
|
||||
Source0: https://git.dm1sh.ru/dm1sh/%{name}/archive/%{version}.tar.gz
|
||||
Requires: gnome-shell
|
||||
Requires: pass
|
||||
Requires: (pass or gopass)
|
||||
Requires: python3-gobject
|
||||
Requires: python3-dbus
|
||||
Requires: python3-fuzzywuzzy
|
||||
@ -15,13 +15,17 @@ Requires: python3-Levenshtein
|
||||
A Gnome Shell passwords search provider for zx2c4/pass (passwordstore.org) or compatibles and Bitwarden/Vaultwarden that sends passwords to clipboard (or GPaste).
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -n %{name}
|
||||
|
||||
%define debug_package %{nil}
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
sed -i -e 's|DATADIR=|DATADIR=$RPM_BUILD_ROOT|' install.sh
|
||||
sed -i -e 's|LIBDIR=|LIBDIR=$RPM_BUILD_ROOT|' install.sh
|
||||
./install.sh
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
@ -32,7 +36,4 @@ sed -i -e 's|LIBDIR=|LIBDIR=$RPM_BUILD_ROOT|' install.sh
|
||||
%{_prefix}/share/gnome-shell/search-providers/org.gnome.Pass.SearchProvider.ini
|
||||
|
||||
%changelog
|
||||
* Mon Nov 13 2023 dm1sh <me@dmitriy.icu> 1.3.2-1
|
||||
- new spec file
|
||||
- package built with tito
|
||||
%autochangelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user