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
f8415113
Commit
f8415113
authored
Jun 13, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add source() function.
text() is the todo text without the tags. source() is the raw todo text.
parent
167f91b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
TodoBase.py
TodoBase.py
+10
-3
No files found.
TodoBase.py
View file @
f8415113
...
...
@@ -119,9 +119,16 @@ class TodoBase(object):
"""
return self.fields['
priority
']
def text(self):
def text(self
, p_with_tags=False
):
""" Returns the todo text with tags stripped off. """
return self.text
return self.src if p_with_tags else self.fields['
text
']
def source(self):
"""
Returns the source text of the todo. This is the raw text with all
the tags included.
"""
return self.text(True)
def set_text(self, p_text):
""" Sets the todo source text. The text will be parsed again. """
...
...
@@ -154,4 +161,4 @@ class TodoBase(object):
def __print__(self):
""" A printer for the todo item. """
print self.s
rc
+ "
\
n
"
print self.s
ource()
+ "
\
n
"
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