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]
|
path = path_join(dir_path, filename)[:-4]
|
||||||
password_list.append(path)
|
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)
|
remaining = 5 - len(results)
|
||||||
|
|
||||||
if remaining > 0:
|
if remaining > 0:
|
||||||
containing_results = list(filter(lambda p: name in p, password_list))[
|
containing_results = list(
|
||||||
:remaining
|
sorted(filter(lambda p: name in p, password_list))
|
||||||
]
|
)[:remaining]
|
||||||
|
|
||||||
results.extend(containing_results)
|
results.extend(containing_results)
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
Name: gnome-pass-search-provider
|
Name: gnome-pass-search-provider
|
||||||
Version: 1.3.2
|
Version: 1.3.3
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Gnome Shell search provider for zx2c4/pass
|
Summary: Gnome Shell search provider for zx2c4/pass
|
||||||
License: GPL-3.0+
|
License: GPL-3.0+
|
||||||
Url: https://git.dm1sh.ru/dm1sh/%{name}
|
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: gnome-shell
|
||||||
Requires: pass
|
Requires: (pass or gopass)
|
||||||
Requires: python3-gobject
|
Requires: python3-gobject
|
||||||
Requires: python3-dbus
|
Requires: python3-dbus
|
||||||
Requires: python3-fuzzywuzzy
|
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).
|
A Gnome Shell passwords search provider for zx2c4/pass (passwordstore.org) or compatibles and Bitwarden/Vaultwarden that sends passwords to clipboard (or GPaste).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup -n %{name}
|
||||||
|
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
sed -i -e 's|DATADIR=|DATADIR=$RPM_BUILD_ROOT|' install.sh
|
sed -i -e 's|DATADIR=|DATADIR=$RPM_BUILD_ROOT|' install.sh
|
||||||
sed -i -e 's|LIBDIR=|LIBDIR=$RPM_BUILD_ROOT|' install.sh
|
sed -i -e 's|LIBDIR=|LIBDIR=$RPM_BUILD_ROOT|' install.sh
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%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
|
%{_prefix}/share/gnome-shell/search-providers/org.gnome.Pass.SearchProvider.ini
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Nov 13 2023 dm1sh <me@dmitriy.icu> 1.3.2-1
|
|
||||||
- new spec file
|
|
||||||
- package built with tito
|
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user