todoman: update to 4.2.1.
This commit is contained in:
parent
1f6727b1ab
commit
0bfab0e6a1
|
@ -1,86 +0,0 @@
|
||||||
A pull request containing this patch has been submitted upstream [1].
|
|
||||||
|
|
||||||
[1] https://github.com/pimutils/todoman/pull/495
|
|
||||||
|
|
||||||
diff --git a/contrib/completion/zsh/_todo b/contrib/completion/zsh/_todo
|
|
||||||
index b9bbe8a..53976e7 100644
|
|
||||||
--- a/contrib/completion/zsh/_todo
|
|
||||||
+++ b/contrib/completion/zsh/_todo
|
|
||||||
@@ -5,7 +5,7 @@ local common_options_help=(
|
|
||||||
'(- :)--help[Show a help message and exit]'
|
|
||||||
)
|
|
||||||
local common_options_start=(
|
|
||||||
- {-s,--start=}'[When the task starts]:DATE:__todo_date'
|
|
||||||
+ '--start=[When the task starts]:DATE:__todo_date'
|
|
||||||
)
|
|
||||||
local common_options_due=(
|
|
||||||
{-d,--due=}'[When the task is due]:DATE:__todo_date'
|
|
||||||
@@ -32,7 +32,7 @@ __color_mode(){
|
|
||||||
# }}}
|
|
||||||
# {{{ general helper: set variable of path to configuration file
|
|
||||||
__todo_set_conf(){
|
|
||||||
- todoman_configuration_file=${XDG_CONFIG_DIR:-${HOME}/.config}/todoman/todoman.conf
|
|
||||||
+ todoman_configuration_file=${XDG_CONFIG_DIR:-${HOME}/.config}/todoman/config.py
|
|
||||||
if [[ -f $todoman_configuration_file ]]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
@@ -43,7 +43,7 @@ __todo_set_conf(){
|
|
||||||
# {{{ general helper: set variable main.path from configuration file
|
|
||||||
__todo_set_conf_path(){
|
|
||||||
if __todo_set_conf; then
|
|
||||||
- tasks_lists_path="$(sed -n -e 's/^[^#]\s*path\s*=\s*\(.*\)$/\1/p' $todoman_configuration_file 2>/dev/null)"
|
|
||||||
+ tasks_lists_path="$(sed -n -e "s/^\\s*path\\s*=\\s*['\"]\\(.*\\)['\"]$/\\1/p" $todoman_configuration_file 2>/dev/null)"
|
|
||||||
# the eval echo is needed since the path may contain ~ which should be evalueated to $HOME
|
|
||||||
tasks_lists_dir="$(eval echo ${tasks_lists_path%/\**})"
|
|
||||||
if [[ -z "${tasks_lists_path}" || ! -d "${tasks_lists_dir}" ]]; then
|
|
||||||
@@ -59,18 +59,18 @@ __todo_set_conf_path(){
|
|
||||||
# {{{ general helper: set variables related to date and time formats for __todo_date
|
|
||||||
__todo_set_conf_dt(){
|
|
||||||
if __todo_set_conf; then
|
|
||||||
- date_format="$(eval echo $(sed -n -e 's/^[^#]\s*date_format\s*=\s*\(.*\)$/\1/p' $todoman_configuration_file 2>/dev/null))"
|
|
||||||
- dt_separator="$(eval echo $(sed -n -e 's/^[^#]\s*dt_separator\s*=\s*\(.*\)$/\1/p' $todoman_configuration_file 2>/dev/null))"
|
|
||||||
- time_format="$(eval echo $(sed -n -e 's/^[^#]\s*time_format\s*=\s*\(.*\)$/\1/p' $todoman_configuration_file 2>/dev/null))"
|
|
||||||
+ date_format="$(eval echo $(sed -n -e "s/^\\s*date_format\\s*=\\s*['\"]\\(.*\\)['\"]$/\\1/p" $todoman_configuration_file 2>/dev/null))"
|
|
||||||
+ dt_separator="$(eval echo $(sed -n -e "s/^\\s*dt_separator\\s*=\\s*['\"]\\(.*\\)['\"]$/\\1/p" $todoman_configuration_file 2>/dev/null))"
|
|
||||||
+ time_format="$(eval echo $(sed -n -e "s/^\\s*time_format\\s*=\\s*['\"]\\(.*\\)['\"]$/\\1/p" $todoman_configuration_file 2>/dev/null))"
|
|
||||||
# default value according to documentation: https://todoman.readthedocs.io/en/stable/configure.html
|
|
||||||
if [[ -z "${date_format}" ]]; then
|
|
||||||
date_format="%x"
|
|
||||||
fi
|
|
||||||
if [[ -z "${dt_separator}" ]]; then
|
|
||||||
- dt_separator=""
|
|
||||||
+ dt_separator=" "
|
|
||||||
fi
|
|
||||||
if [[ -z "${time_format}" ]]; then
|
|
||||||
- time_format="%x"
|
|
||||||
+ time_format="%X"
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
@@ -150,7 +150,7 @@ __todo_lists(){
|
|
||||||
zstyle ":completion:${curcontext}:" cache-policy __todo_lists_cache_policy
|
|
||||||
fi
|
|
||||||
local -a tasks_lists
|
|
||||||
- if _cache_invalid todoman_lists; then
|
|
||||||
+ if _cache_invalid todoman_lists || ! _retrieve_cache todoman_lists; then
|
|
||||||
if [[ ${tasks_lists_path} =~ '/*$' ]]; then
|
|
||||||
for dir in $(eval echo ${tasks_lists_path}); do
|
|
||||||
if grep "VTODO" -q -R "${dir}"; then
|
|
||||||
@@ -160,8 +160,6 @@ __todo_lists(){
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
_store_cache todoman_lists tasks_lists
|
|
||||||
- else
|
|
||||||
- _retrieve_cache todoman_lists
|
|
||||||
fi
|
|
||||||
if [[ "${#tasks_lists[@]}" == 1 ]]; then
|
|
||||||
_message "only one list was detected: (\"${tasks_lists[1]}\")"
|
|
||||||
@@ -243,7 +241,7 @@ _command_list_options=(
|
|
||||||
'(--reverse --no-reverse)'{--reverse,--no-reverse}'[sort tasks in reverse order (see --sort)]'
|
|
||||||
"${common_options_start[@]}"
|
|
||||||
"${common_options_due[@]}"
|
|
||||||
- '--priority[Only show tasks with priority at least as high as TEXT]:TEXT:("low", "medium", "high")'
|
|
||||||
+ '--priority=[Only show tasks with priority at least as high as TEXT]:TEXT:("low" "medium" "high")'
|
|
||||||
'--startable[Show only todos which should can be started today]'
|
|
||||||
{-s,--status=}'[Show only todos with the provided comma-separated statuses]:STATUS:{_values -s , "status" "NEEDS-ACTION" "CANCELLED" "COMPLETED" "IN-PROCESS" "ANY"}'
|
|
||||||
"${common_options_help[@]}"
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Template file for 'todoman'
|
# Template file for 'todoman'
|
||||||
pkgname=todoman
|
pkgname=todoman
|
||||||
version=4.1.0
|
version=4.2.1
|
||||||
revision=3
|
revision=1
|
||||||
build_style=python3-module
|
build_style=python3-pep517
|
||||||
hostmakedepends="python3-setuptools_scm"
|
hostmakedepends="python3-setuptools_scm python3-wheel"
|
||||||
depends="python3-icalendar python3-urwid python3-xdg python3-parsedatetime
|
depends="python3-icalendar python3-urwid python3-xdg python3-parsedatetime
|
||||||
python3-atomicwrites python3-click-repl python3-click-log
|
python3-atomicwrites python3-click-repl python3-click-log
|
||||||
python3-dateutil python3-humanize jq"
|
python3-dateutil python3-humanize jq"
|
||||||
|
@ -15,11 +15,11 @@ license="ISC"
|
||||||
homepage="https://github.com/pimutils/todoman"
|
homepage="https://github.com/pimutils/todoman"
|
||||||
changelog="https://raw.githubusercontent.com/pimutils/todoman/main/CHANGELOG.rst"
|
changelog="https://raw.githubusercontent.com/pimutils/todoman/main/CHANGELOG.rst"
|
||||||
distfiles="${PYPI_SITE}/t/todoman/todoman-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/t/todoman/todoman-${version}.tar.gz"
|
||||||
checksum=ce3caa481d923e91da9b492b46509810a754e2d3ef857f5d20bc5a8e362b50c8
|
checksum=b69afe914c8fb0f9387d61c86c9bf2e8ba17717bf3f9cfb1b711e3c87a773b85
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense LICENCE
|
vlicense LICENCE
|
||||||
vcompletion contrib/completion/zsh/_todo zsh todo
|
vcompletion contrib/completion/zsh/_todo zsh todo
|
||||||
vcompletion contrib/completion/bash/_todo bash todo
|
vcompletion contrib/completion/bash/_todo bash todo
|
||||||
vsconf config.py.sample
|
vsconf config.py.sample config.py
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue