Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
99b91fea
Commit
99b91fea
authored
Nov 05, 2015
by
Jacek Sowiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Append %d and %t to default list_format
parent
9f0d658a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
topydo.conf
topydo.conf
+1
-1
topydo/lib/Config.py
topydo/lib/Config.py
+1
-1
topydo/lib/PrettyPrinterFilter.py
topydo/lib/PrettyPrinterFilter.py
+5
-5
No files found.
topydo.conf
View file @
99b91fea
...
@@ -15,7 +15,7 @@ auto_creation_date = 1
...
@@ -15,7 +15,7 @@ auto_creation_date = 1
hide_tags
=
id
,
p
,
ical
hide_tags
=
id
,
p
,
ical
indent
=
0
indent
=
0
list_limit
= -
1
list_limit
= -
1
list_format
= |%
I
| %
x
%{(}
p
{)} %
c
%
s
%
k
list_format
= |%
I
| %
x
%{(}
p
{)} %
c
%
s
%
k
%{
due
:}
d
%{
t
:}
t
[
tags
]
[
tags
]
tag_start
=
t
tag_start
=
t
...
...
topydo/lib/Config.py
View file @
99b91fea
...
@@ -74,7 +74,7 @@ class _Config:
...
@@ -74,7 +74,7 @@ class _Config:
'hide_tags'
:
'id,p,ical'
,
'hide_tags'
:
'id,p,ical'
,
'indent'
:
'0'
,
'indent'
:
'0'
,
'list_limit'
:
'-1'
,
'list_limit'
:
'-1'
,
'list_format'
:
'|%I| %x %{(}p{)} %c %s %k'
,
'list_format'
:
'|%I| %x %{(}p{)} %c %s %k
%{due:}d %{t:}t
'
,
},
},
'tags'
:
{
'tags'
:
{
...
...
topydo/lib/PrettyPrinterFilter.py
View file @
99b91fea
...
@@ -163,15 +163,14 @@ class PrettyPrinterFormatFilter(PrettyPrinterFilter):
...
@@ -163,15 +163,14 @@ class PrettyPrinterFormatFilter(PrettyPrinterFilter):
# todo ID pre-filled with 1 or 2 spaces if its length is <3
# todo ID pre-filled with 1 or 2 spaces if its length is <3
placeholders['I'] = lambda t: filler(str(self.todolist.number(t)), 3)
placeholders['I'] = lambda t: filler(str(self.todolist.number(t)), 3)
# list of tags (spaces) without due: and t:
# list of tags (spaces) without
hidden ones and
due: and t:
placeholders['k'] = lambda t: ' '.join([u('{}:{}').format(tag, value)
placeholders['k'] = lambda t: ' '.join([u('{}:{}').format(tag, value)
for tag, value in sorted(p_todo.tags()) if
for tag, value in sorted(p_todo.tags()) if
tag not in config().hidden_tags() + [config().tag_start(), config().tag_due()]])
tag not in config().hidden_tags() + [config().tag_start(), config().tag_due()]])
# list of tags (spaces)
# list of
all
tags (spaces)
placeholders['K'] = lambda t: ' '.join([u('{}:{}').format(tag, value)
placeholders['K'] = lambda t: ' '.join([u('{}:{}').format(tag, value)
for tag, value in sorted(p_todo.tags()) if
for tag, value in sorted(p_todo.tags())])
tag not in config().hidden_tags()])
# priority
# priority
placeholders['p'] = lambda t: t.priority() if t.priority() else ''
placeholders['p'] = lambda t: t.priority() if t.priority() else ''
...
@@ -225,7 +224,8 @@ class PrettyPrinterFormatFilter(PrettyPrinterFilter):
...
@@ -225,7 +224,8 @@ class PrettyPrinterFormatFilter(PrettyPrinterFilter):
text_lim = line_width - len(p_todo_str) - 4
text_lim = line_width - len(p_todo_str) - 4
p_todo_str = re.sub(re.escape(repl), repl[:text_lim] + '...', p_todo_str)
p_todo_str = re.sub(re.escape(repl), repl[:text_lim] + '...', p_todo_str)
return p_todo_str
# cut trailing space left when last placeholder in p_todo_str is empty and its predecessor is not
return p_todo_str.rstrip()
class PrettyPrinterAlignFilter(PrettyPrinterFilter):
class PrettyPrinterAlignFilter(PrettyPrinterFilter):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment