Skip to content

Commit

Permalink
index: add tags to be seen at make_index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagnus committed Dec 7, 2022
1 parent 8f14ed2 commit 47e2f8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions engine/make_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ def update(self, list_md):
if l.strip().startswith('[desc:'):
desc = l.replace('[desc:', '').replace(']', '').strip()

desc = desc.replace('#todo', '<span class="label label-danger">#todo</span>')
desc = desc.replace('#work', '<span class="label label-primary">#work</span>')
desc = desc.replace('#done', '<span class="label label-success">#done</span>')
desc = desc.replace('#progress', '<span class="label label-warning">#progress</span> ')
desc = desc.replace('#waiting', '<span class="label label-info">#waiting</span>')

mdfn = re.sub('.md$', '', mdfn) # replace only .md at the very end
path = PATH_TO_HTML + '/' + mdfn
Expand Down
7 changes: 4 additions & 3 deletions engine/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,14 @@ def get_todo(text):
l = l.replace('@inprogress', '<span class="label label-warning">@inprogress</span>')
l = l.replace('@progress', '<span class="label label-warning">@progress</span> ')
l = l.replace('#progress', '<span class="label label-warning">#progress</span> ')
l = l.replace('#work', '<span class="label label-primary">#work</span>')
l = l.replace('@done', '<span class="label label-success">@done</span>')
l = l.replace('#done', '<span class="label label-success">#done</span>')
l = l.replace('#DONE', '<span class="label label-success">#DONE</span>')
#l = l.replace('#DONE', '<span class="label label-success">#DONE</span>')
l = l.replace('#@k', '<span class="label label-success">@ok</span>')
l = l.replace('#ok', '<span class="label label-success">#ok</span>')
l = l.replace('#success', '<span class="label label-success">#success</span>')
l = l.replace('@fixed', '<span class="label label-info">@fixed</span>')


l = l.replace('#waiting', '<span class="label label-info">#waiting</span>')

l = l.replace('@error', '<span class="label label-danger">@error</span>')
Expand All @@ -191,6 +190,8 @@ def get_todo(text):
l = l.replace('#True', '<span class="label label-success">True</span>')
l = l.replace('#False', '<span class="label label-danger">False</span>')

l = l.replace('#done', '<span class="label label-success">#done</span>')

ntext += l + '\n'
ntext = change_todo_square_chainbox_or_icon(ntext)
return ntext
Expand Down

0 comments on commit 47e2f8e

Please sign in to comment.