++++ tagview script
++++%4 script: list todo sorted by todo name, then list todo sorted by
pagename. Lines 1-31 are used; listing always starts at line 32
<%4
line_to_begin = 31
editor.GotoLine(line_to_begin)
editor.AddText("\n")
editor.GotoLine(line_to_begin)
#add 1 blank lines, then go to line 31
todos=pwiki.wikiData.getTodos()
todos.sort(key=lambda x:x[1])
editor.AddText("++++Listing todo by wikiname then pagename; time:
"+lib.now()+"\n"+"<< \n")
#listing by todo name
for todo in todos:
editor.AddText(" * "+(todo[0])+", ")
editor.AddText((todo[1])+"\n")
editor.AddText("----------List by pagename page name\n")
#listing by page name
todos.sort()
for todo in todos:
editor.AddText(" * "+(todo[0])+", ")
editor.AddText((todo[1])+"\n")
editor.AddText(">> \n"+"----End listing, Time is "+lib.now()+"\n")
%>
----Line 31
++++ Notes on todo listing script
* This is a script I use to list my complete todo on a page, then I
can search todo's easily
* Allow process autogenerated area & process inserted script in
wikidpad options/security
* create a wiki page name for each month, e.g. tagview 0910 for Oct.
2009
* copy line 2 to line 31 to this page, i.e. from ++++%4 script: to
----Line 31
* use ctrl-4 to operate the script
* The todo listing will start at line 32 onwards, it is enclosed with
quotes << >> and the list can be folded
* when several todo lists are generated, delete the old lists at
bottom of page
* The line "todos.sort(key=lambda x:x[1])" was copied from google
searches, it means sorting by column 2, I do not know python language
at all & can not explain details.
* This script has been tested to work with ver. 1.9 rc08 and 2.0
beta07
* I have a question, can wikidpad compact sqlite file be named
something other than "wiki.sli" ?
* I wish to put several wiki.sli on same flash disk directory, and
they can not have same name.
* Hope someone will enjoy this script.
*