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
76d46255
Commit
76d46255
authored
Nov 26, 2016
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format the group headers
parent
f9f4449f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
topydo/lib/printers/PrettyPrinter.py
topydo/lib/printers/PrettyPrinter.py
+13
-4
No files found.
topydo/lib/printers/PrettyPrinter.py
View file @
76d46255
...
...
@@ -78,14 +78,23 @@ class PrettyPrinter(Printer):
def
print_groups
(
self
,
p_groups
):
result
=
[]
first
=
True
def
print_header
(
p_key
):
""" Prints a header for the given key. """
if
not
first
:
result
.
append
(
''
)
key_string
=
", "
.
join
(
p_key
)
result
.
append
(
key_string
)
result
.
append
(
"="
*
len
(
key_string
))
for
key
,
todos
in
p_groups
.
items
():
result
.
append
(
TopydoString
(
''
))
result
.
append
(
TopydoString
(
key
))
result
.
append
(
TopydoString
(
"==="
))
print_header
(
key
)
first
=
False
result
+=
self
.
print_list
(
todos
)
return
result
return
[
TopydoString
(
s
)
for
s
in
result
]
def
pretty_printer_factory
(
p_todolist
,
p_additional_filters
=
None
):
""" Returns a pretty printer suitable for the ls and dep subcommands. """
...
...
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