pimutils / todoman

✅ A simple, standards-based, cli todo (aka: task) manager.
https://todoman.readthedocs.io
ISC License
489 stars 78 forks source link

CATEGORIES fields destruction and other concerns about format #491

Open tkapias opened 2 years ago

tkapias commented 2 years ago

Hi,

First of all, thank you for creating Todoman, otherwise I would not have switches 100% to cli for mails, calendars, contacts and todos.

But, I have several issues with Todoman, especially with the categories and the destruction of the original data.

My todo stack:

Despite what other reports suggest, I observe that categories are not yet supported on Todoman. But worse, properly formatted data is ruined by Todoman.

I tried with VTODOs created on Tasks.org or on Evolution then synchronized by DAVx5->Baikal->Vdirsyncer:

In addition:

WhyNotHugo commented 2 years ago

For any issue, I need a sample ics file and a series of steps that you take to reproduce the issue. This is necessary to understand what happens and evaluate how to fix it.

The --category argument is still not working.

What do you mean by "not working"? Some tests run todo list --category... and those seem to be working fine.

The categories are not displayed, either in list, show or edit.

Correct, see: https://github.com/pimutils/todoman/issues/10

If the ics file contains more than one category per line, Todoman destroys the information.

What exactly did you do? I'd like to be able to reproduce this, sounds like a serious bug.

If there is only one category, sometimes it leaves it alone, but eventually destroys it.

Ditto.

The CATEGORIES field disappears after launching Todoman.

todoman does not write to files when reading them. Did you edit the tasks? What exactly did you do? Editing a few with categories does not

tkapias commented 2 years ago

Hello,

Thanks for paying attention to my message.

In the meantime, I discovered that by uninstalling the version from Debian Testing and installing the one from PIP, everything was normal. They are both in 4.1.0 (4.1.0-1 for debian).

I wanted to make an analysis of the differences to provide you with an explanation, so I reinstalled the Debian version, but I don't have the same problems as yesterday... I need to make a clean reproduction, I don't have time today, I'll do it in the week.

Content of a basic VTODO from Android Tasks (stay same in Baikal and Vdirsync):

BEGIN:VCALENDAR
VERSION:2.0
PRODID:+//IDN bitfire.at//ical4android
BEGIN:VTODO
DTSTAMP:20220706T083000Z
UID:546700398054453231
CREATED:20220706T082946Z
LAST-MODIFIED:20220706T082946Z
SUMMARY:TestTask1
DESCRIPTION:TestDescription
PRIORITY:9
STATUS:NEEDS-ACTION
CATEGORIES:TestTag1,TestTag2
DUE;VALUE=DATE:20220710
END:VTODO
END:VCALENDAR

My config:

cache_path = "~/.config/todoman/cache.sqlite3"
date_format = "%Y-%m-%d"
default_due = 48
default_list = "Principal"
default_priority = 9
humanize = False
path = "~/.calendars/*"
time_format = "%H:%M"

Debian version informations:

Package: todoman
Version: 4.1.0-1
Priority: optional
Section: utils
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Installed-Size: 437 kB
Depends: python3-atomicwrites, python3-click, python3-click-log, python3-dateutil, python3-humanize, python3-icalendar, python3-parsedatetime, python3-urwid, python3-xdg, python3:any, libjs-sphinxdoc (>= 4.3), sphinx-rtd-theme-common (>= 1.0.0+dfsg)
Suggests: vdirsyncer
Homepage: https://github.com/pimutils/todoman
Download-Size: 85,5 kB
APT-Sources: https://deb.debian.org/debian testing/main amd64 Packages
Description: Simple CalDAV-based todo manager
 Todoman is a simple, standards-based, cli todo (aka: task) manager. Todos are
 stored into icalendar files, which means you can sync them via CalDAV using,
 for example, vdirsyncer.

 Size Name
  958 /usr/bin/todoman
  --- /usr/lib/python3/dist-packages/todoman
    - ├── bin
   89 │  └── todoman
  126 ├── __init__.py
   94 ├── __main__.py
 16Ki ├── cli.py
6,7Ki ├── configuration.py
1,0Ki ├── exceptions.py
9,0Ki ├── formatters.py
6,0Ki ├── interactive.py
 33Ki ├── model.py
  142 ├── version.py
5,3Ki └── widgets.py

PIP version informations:

Name: todoman
Version: 4.1.0
Summary: A simple CalDav-based todo manager.
Home-page: https://github.com/pimutils/todoman
Author: Hugo Osvaldo Barrera
Author-email: hugo@barrera.io
License: ISC
Location: /home/user/.local/lib/python3.10/site-packages
Requires: atomicwrites, click, click-log, humanize, icalendar, parsedatetime, python-dateutil, pyxdg, urwid
Required-by:

 Size Name
  208 /home/user/.local/bin/todo
  --- /home/user/.local/lib/python3.10/site-packages/todoman
  133 ├── __init__.py
   94 ├── __main__.py
 16Ki ├── cli.py
6,7Ki ├── configuration.py
1,0Ki ├── exceptions.py
9,0Ki ├── formatters.py
6,0Ki ├── interactive.py
 33Ki ├── model.py
  142 ├── version.py
5,3Ki └── widgets.py
Schubisu commented 1 year ago

I think it's correct that category support does not work in version 4.1.0. When I understand correctly from here and here, the releases (from December 2021) have been generated before category support was added (commit messages feat(categories)) in January 2022 (tui support in July 2022).

I can confirm that it works well when installed from latest github main branch. But the new release v4.2.0 as mentioned in the change log seems to be not yet available.

WhyNotHugo commented 1 year ago

Indeed, category support is unreleased. I guess there's nothing blocking a 4.2.0 release at this point.

Schubisu commented 1 year ago

Thanks, just installed 4.2.0 via pip :)