mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
VimwikiTask: Add method to create from current line
This commit is contained in:
parent
74dd281338
commit
c0c2b91f3f
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@ from datetime import datetime
|
|||
from regexp import *
|
||||
from tasklib.task import Task, SerializingObject
|
||||
import viewport
|
||||
import util
|
||||
|
||||
|
||||
def convert_priority_from_tw_format(priority):
|
||||
|
@ -36,6 +37,11 @@ class VimwikiTask(object):
|
|||
def __setitem__(self, key, value):
|
||||
self.data[key] = value
|
||||
|
||||
@classmethod
|
||||
def from_current_line(cls, cache):
|
||||
line_number = util.get_current_line_number()
|
||||
return cls.from_line(cache, line_number)
|
||||
|
||||
@classmethod
|
||||
def from_line(cls, cache, number):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue