Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LOCATIONS #11

Closed
WhyNotHugo opened this issue Apr 17, 2016 · 11 comments
Closed

Add support for LOCATIONS #11

WhyNotHugo opened this issue Apr 17, 2016 · 11 comments

Comments

@WhyNotHugo
Copy link
Member

This issue was moved from the issue tracker at GitLab.


todoman should show the LOCATION assigned to a task.
i.e. the following task contains the "Location" LOCATION:

$ cat 9fe6d194-24e2-46cf-a600-faad711f9f20.ics
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VTODO
CREATED:20150414T065645Z
LAST-MODIFIED:20150414T065820Z
DTSTAMP:20150414T065820Z
UID:9fe6d194-24e2-46cf-a600-faad711f9f20
SUMMARY:Todoman Testtask
PRIORITY:1
STATUS:NEEDS-ACTION
CATEGORIES:Online
X-MOZ-LASTACK:20150414T065807Z
DTSTART;TZID=Europe/Berlin:20150414T090000
DUE;TZID=Europe/Berlin:20150428T090000
LOCATION:Location
PERCENT-COMPLETE:20
DESCRIPTION:Description \n\nHello World
SEQUENCE:1
X-MOZ-GENERATION:3
X-MOZ-SNOOZE-TIME:20150415T065807Z
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT15M
DESCRIPTION:Default Mozilla Description
END:VALARM
END:VTODO
END:VCALENDAR

but todoman doesn't show it:

$ todo show 22
Todoman Testtask
Due: 2015-04-28 Urgent 

Description 

Hello World

@AnubhaAgrawal
Copy link
Contributor

I want to work on this issue. I think there should be a requirement of test cases. and what is the difference between #10 and this issue?

@untitaker
Copy link
Member

untitaker commented Mar 1, 2017

Hello @AnubhaAgrawal, this issue is about the LOCATION property, while #10 is about the CATEGORIES property.

I think there should be a requirement of test cases.

Exactly. For the implementation, here's what needs to happen:

  • Todo already has a location property we can use.

  • I think the LOCATION property should only be shown in the detailed view of a task that is shown using todo show (see TodoFormatter.detailed).

  • todo new needs a --location flag. In the same step, the --location flag for todo edit can be added.

  • The interactive UI needs a new textfield for LOCATION

Let us know if you have any questions!

@AnubhaAgrawal
Copy link
Contributor

but, I think before test cases there is also a need for some other thing. so can you please tell that how I start it.

@untitaker
Copy link
Member

@AnubhaAgrawal I'm not sure what you mean. The above bullet point list is regarding the implementation (I think that's what you mean?), not the tests.

@AnubhaAgrawal
Copy link
Contributor

ok, Thankyou! Now, I got it.

@AnubhaAgrawal
Copy link
Contributor

when I print todo --list Anu then why it shows error ??

Traceback (most recent call last):
  File "/home/anubha/Desktop/todoman/venv/bin/todo", line 11, in <module>
    load_entry_point('todoman', 'console_scripts', 'todo')()
  File "/home/anubha/Desktop/todoman/venv/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/anubha/Desktop/todoman/venv/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/anubha/Desktop/todoman/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/anubha/Desktop/todoman/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/anubha/Desktop/todoman/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/anubha/Desktop/todoman/todoman/cli.py", line 95, in command_wrap
    return command(*a, **kw)
  File "/home/anubha/Desktop/todoman/venv/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/anubha/Desktop/todoman/todoman/cli.py", line 194, in new
    ui = TodoEditor(todo, ctx.obj['db'].lists(), ctx.obj['formatter'])
  File "/home/anubha/Desktop/todoman/todoman/ui.py", line 33, in __init__
    self.current_list = todo.list
  File "/home/anubha/Desktop/todoman/todoman/model.py", line 283, in list
    return self._list
AttributeError: 'FileTodo' object has no attribute '_list'

@AnubhaAgrawal
Copy link
Contributor

I create a directory Anu.

@untitaker
Copy link
Member

Hmm, I don't get that error though. For me it shows: Error: Invalid value for "lists": Anu.

AnubhaAgrawal added a commit to AnubhaAgrawal/todoman that referenced this issue Mar 2, 2017
@WhyNotHugo
Copy link
Member Author

In progress in #163 (I can't assign to non-contributors).

@untitaker
Copy link
Member

Thanks @AnubhaAgrawal!

@WhyNotHugo
Copy link
Member Author

Thanks! 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants