desktop/todoman: Updated for version 4.3.2 and for Slackware 15.0.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
fa882bd245
commit
3aa266346d
|
@ -0,0 +1,11 @@
|
|||
--- cli.py 2023-10-25 16:23:07.432517853 +0200
|
||||
+++ cli.py 2023-10-25 16:16:22.702505847 +0200
|
||||
@@ -97,7 +97,7 @@
|
||||
raise click.BadParameter(e) from None
|
||||
|
||||
|
||||
-def _validate_start_date_param(ctx, param, val) -> Tuple[bool, datetime] | None:
|
||||
+def _validate_start_date_param(ctx, param, val):
|
||||
ctx = ctx.find_object(AppContext)
|
||||
if not val:
|
||||
return None
|
|
@ -25,7 +25,7 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=todoman
|
||||
VERSION=${VERSION:-4.2.1}
|
||||
VERSION=${VERSION:-4.3.2}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
@ -79,6 +79,13 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# Use newer, non-stock setuptools due to package requirements
|
||||
# Requires python/python3-setuptools-opt build-time dependency
|
||||
export PYTHONPATH=/opt/python3.9/site-packages/
|
||||
|
||||
patch -i $CWD/cli.py.patch $PRGNAM/cli.py
|
||||
patch -i $CWD/widgets.py.patch $PRGNAM/widgets.py
|
||||
|
||||
python3 -m build --no-isolation
|
||||
python3 -m installer -d "$PKG" dist/*.whl
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="todoman"
|
||||
VERSION="4.2.1"
|
||||
VERSION="4.3.2"
|
||||
HOMEPAGE="https://github.com/pimutils/todoman"
|
||||
DOWNLOAD="https://files.pythonhosted.org/packages/6c/0e/5a3ed2a34251625f8483f844ba0dba4bf903b0db8b63e87a70666eea7ee7/todoman-4.2.1.tar.gz"
|
||||
MD5SUM="b44620a549d4afeae307bc99ad811d3b"
|
||||
DOWNLOAD="https://files.pythonhosted.org/packages/98/3d/db9427c5612c2ba2313b7782ee1f1e28a9c4995d54727d7e9ea23ab131ae/todoman-4.3.2.tar.gz"
|
||||
MD5SUM="5a0755b381f8d668e5a1f435a1effcf6"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="python3-atomicwrites click click-log icalendar python3-dateutil parsedatetime humanize python3-tabulate python-urwid"
|
||||
REQUIRES="python3-atomicwrites click click-log icalendar python3-dateutil parsedatetime humanize python3-tabulate python-urwid python3-setuptools-opt pytz"
|
||||
MAINTAINER="Tonus"
|
||||
EMAIL="tonus1@free.fr"
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
--- widgets.py 2023-10-25 16:23:17.886518163 +0200
|
||||
+++ widgets.py 2023-10-25 16:17:16.178507433 +0200
|
||||
@@ -39,15 +39,11 @@
|
||||
("Ctrl-O", "Edit in $EDITOR"),
|
||||
)
|
||||
|
||||
- def __init__(self, parent: urwid.Widget, *a, **kw) -> None:
|
||||
+ def __init__(self, parent, *a, **kw):
|
||||
self._parent = parent
|
||||
super().__init__(*a, **kw)
|
||||
|
||||
- def keypress(
|
||||
- self,
|
||||
- size: tuple[int, int] | tuple[int] | tuple[()],
|
||||
- key: str,
|
||||
- ) -> None:
|
||||
+ def keypress(self,size,key):
|
||||
if key == "ctrl w":
|
||||
self._delete_word()
|
||||
elif key == "ctrl u":
|
||||
@@ -69,13 +65,13 @@
|
||||
|
||||
return None
|
||||
|
||||
- def _delete_forward_letter(self) -> None:
|
||||
+ def _delete_forward_letter(self):
|
||||
text = self.get_edit_text()
|
||||
pos = self.edit_pos
|
||||
text = text[:pos] + text[pos + 1 :]
|
||||
self.set_edit_text(text)
|
||||
|
||||
- def _delete_word(self) -> None:
|
||||
+ def _delete_word(self):
|
||||
"""delete word before cursor"""
|
||||
text = self.get_edit_text()
|
||||
t = text[: self.edit_pos].rstrip()
|
||||
@@ -86,7 +82,7 @@
|
||||
self.set_edit_text(f_text + text[self.edit_pos :])
|
||||
self.set_edit_pos(len(f_text))
|
||||
|
||||
- def _delete_till_beginning_of_line(self) -> None:
|
||||
+ def _delete_till_beginning_of_line(self):
|
||||
"""delete till start of line before cursor"""
|
||||
text = self.get_edit_text()
|
||||
sol = text.rfind("\n", 0, self.edit_pos) + 1
|
||||
@@ -96,7 +92,7 @@
|
||||
self.set_edit_text(before_line + text[self.edit_pos :])
|
||||
self.set_edit_pos(sol)
|
||||
|
||||
- def _delete_till_end_of_line(self) -> None:
|
||||
+ def _delete_till_end_of_line(self):
|
||||
"""delete till end of line before cursor"""
|
||||
text = self.get_edit_text()
|
||||
eol = text.find("\n", self.edit_pos)
|
||||
@@ -105,19 +101,19 @@
|
||||
|
||||
self.set_edit_text(text[: self.edit_pos] + after_eol)
|
||||
|
||||
- def _goto_beginning_of_line(self) -> None:
|
||||
+ def _goto_beginning_of_line(self):
|
||||
text = self.get_edit_text()
|
||||
sol = text.rfind("\n", 0, self.edit_pos) + 1
|
||||
self.set_edit_pos(sol)
|
||||
|
||||
- def _goto_end_of_line(self) -> None:
|
||||
+ def _goto_end_of_line(self):
|
||||
text = self.get_edit_text()
|
||||
eol = text.find("\n", self.edit_pos)
|
||||
if eol == -1:
|
||||
eol = len(text)
|
||||
self.set_edit_pos(eol)
|
||||
|
||||
- def _editor(self) -> None:
|
||||
+ def _editor(self):
|
||||
self._parent._loop.screen.clear()
|
||||
new_text = click.edit(self.get_edit_text())
|
||||
if new_text is not None:
|
||||
@@ -137,12 +133,7 @@
|
||||
[1, 2, 3, 4],
|
||||
)
|
||||
|
||||
- def __init__(
|
||||
- self,
|
||||
- parent: urwid.Widget,
|
||||
- priority: int | None,
|
||||
- formatter_function: Callable[[int | None], str],
|
||||
- ) -> None:
|
||||
+ def __init__(self,parent,priority,formatter_function):
|
||||
self._parent = parent
|
||||
self._label = urwid.SelectableIcon("", 0)
|
||||
urwid.WidgetWrap.__init__(self, self._label)
|
||||
@@ -151,10 +142,10 @@
|
||||
self._formatter = formatter_function
|
||||
self._set_label()
|
||||
|
||||
- def _set_label(self) -> None:
|
||||
+ def _set_label(self):
|
||||
self.set_label(self._formatter(self._priority))
|
||||
|
||||
- def _update_label(self, delta: int = 0) -> None:
|
||||
+ def _update_label(self, delta: int = 0):
|
||||
for i, r in enumerate(PrioritySelector.RANGES):
|
||||
if self._priority in r:
|
||||
self._priority = PrioritySelector.RANGES[
|
||||
@@ -163,11 +154,7 @@
|
||||
self._set_label()
|
||||
return
|
||||
|
||||
- def keypress(
|
||||
- self,
|
||||
- size: tuple[int, int] | tuple[int] | tuple[()],
|
||||
- key: str,
|
||||
- ) -> None:
|
||||
+ def keypress(self,size,key):
|
||||
if key in ["right", "enter"]:
|
||||
self._update_label(1)
|
||||
return None
|
||||
@@ -178,5 +165,5 @@
|
||||
return super().keypress(size, key)
|
||||
|
||||
@property
|
||||
- def priority(self) -> int | None:
|
||||
+ def priority(self):
|
||||
return self._priority
|
Loading…
Reference in New Issue