Merge branch 'master' of github.com:aarongut/cmdasana
This commit is contained in:
@@ -25,6 +25,7 @@ class AsanaService(object):
|
|||||||
]
|
]
|
||||||
|
|
||||||
STORY_FIELDS = [
|
STORY_FIELDS = [
|
||||||
|
'created_at',
|
||||||
'created_by.name',
|
'created_by.name',
|
||||||
'html_text',
|
'html_text',
|
||||||
'text',
|
'text',
|
||||||
|
|||||||
@@ -211,6 +211,12 @@ class Story(AsanaObject):
|
|||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
def created_at(self):
|
||||||
|
if 'created_at' in self.object_dict:
|
||||||
|
return dateutil.parser.parse(self.object_dict['created_at'])
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
def text(self):
|
def text(self):
|
||||||
if 'html_text' in self.object_dict:
|
if 'html_text' in self.object_dict:
|
||||||
parser = HTMLTextParser()
|
parser = HTMLTextParser()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
palette = [
|
palette = [
|
||||||
('atm_section', 'white,bold', 'dark blue'),
|
('atm_section', 'white,bold', 'dark blue'),
|
||||||
('author', 'bold,dark blue', ''),
|
('author', 'bold,dark blue', ''),
|
||||||
|
('timestamp', 'underline', ''),
|
||||||
('custom_fields', 'dark red', ''),
|
('custom_fields', 'dark red', ''),
|
||||||
('header', 'bold,light green', ''),
|
('header', 'bold,light green', ''),
|
||||||
('project', 'yellow', ''),
|
('project', 'yellow', ''),
|
||||||
|
|||||||
@@ -117,7 +117,11 @@ class CustomFields(object):
|
|||||||
class Stories(object):
|
class Stories(object):
|
||||||
def __init__(self, stories):
|
def __init__(self, stories):
|
||||||
components = [
|
components = [
|
||||||
urwid.Text([('author', s.creator())] + s.text())
|
urwid.Text([
|
||||||
|
('timestamp', s.created_at().strftime('%Y-%m-%d %H:%M')),
|
||||||
|
' ',
|
||||||
|
('author', s.creator()),
|
||||||
|
] + s.text())
|
||||||
for s in stories]
|
for s in stories]
|
||||||
|
|
||||||
self.stories = urwid.Pile(components)
|
self.stories = urwid.Pile(components)
|
||||||
|
|||||||
Reference in New Issue
Block a user