NEW: For a prettier blog interface, see the Wordpress version!
Tasks
Priorities - A: high, B: medium, C: low; Status - _: unfinished, X: finished, C: cancelled, P: pending, o: in progress, >: delegated. Covey quadrants - Q1 & Q3: urgent, Q1 & Q2: important
| A1 | X | Reply about Perl thing {{Tasks:252}} |
| A2 | X | Create quiz for CS21A {{Tasks:251}} |
| A3 | X | Downgrade my laptop-net and hold it {{Tasks:253}} |
Schedule
Notes
4. Game development in Japan : 16:03
Categories: None -- Permalink
Hee Soo Lee's thinking of going for game development in Japan. Way cool. =)
E-Mail from Soo Lee
3. Software Elegance : 15:43
Categories: None -- Permalink
Gerald Generoso says
You might wanna check this out -->> http://www.eskimo.com/~scs/readings/software_elegance.htmlE-Mail from apache
2. Printer works again : 10:01
Categories: None -- Permalink
Apparently, they made it a printer server. Yay!
1. Perl script to extract tasks and put them into an HTML page from Markus Hoenicka : 09:35
Categories: PlannerMode#17 -- Permalink
Emacs LISP snippet to invoke it
(defun ewiki-tasklist ()
(interactive)
(shell-command
(format
"~/bin/tasklist.pl %s > %s/tasklist.html"
planner-directory
planner-publishing-directory)
"*ewiki-output*" nil))
Perl script to extract the tasks
#!/usr/bin/perl -w
# compiles a task list and a todo list from Emacs planner files and
# publishes it as a html file
# ToDos are recognized in a case-insensitive fashion, but they have to be
# sections, like in:
# ** ToDo
#
# Invocation: tasklist.pl planner-directory > planner-publishing-directory/tasklist.html
# extract all tasks from the planner day files
my @tasks = `cd $ARGV[0]; /usr/bin/find ./ -name "200*.*[^~]" | xargs grep "^#[ABC][0-9]" | /usr/bin/sort`;
# find all planner project files that contain a todo section
my @todos = `cd $ARGV[0]; /usr/bin/grep -l "\** [tT][oO][dD][oO]" *`;
# the current time in YYYY-MM-DD format
my $ltime = &get_ltime();
# write HTML header
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Task List</title>
<meta name="generator" content="emacs-wiki.el">
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<link rev="made" href="mailto:webmaster@PC51997">
<link rel="home" href="WelcomePage.html">
<link rel="index" href="WikiIndex.html">
<!-- <link rel="stylesheet" type="text/css" href="./emacs-wiki.css"> -->
<style type="text/css">
a.nonexistent {
font-weight: bold;
background-color: #F8F8F8; color: #FF2222;
}
a.nonexistent:visited {
background-color: #F8F8F8; color: #FF2222;
}
body {
background: white; color: black;
margin-left: 5%; margin-right: 5%;
margin-top: 3%;
}
em { font-style: italic; }
strong { font-weight: bold; }
ul { list-style-type: disc }
dl.contents { margin-top: 0; }
dt.contents { margin-bottom: 0; }
p.verse {
white-space: pre;
margin-left: 5%;
}
pre {
white-space: pre;
font-family: monospace;
margin-left: 5%;
}
td.prioritya {
color: red;
}
td.taskpending {
font-weight: bold;
}
td.taskdone {
color: green;
}
td.taskoverdue {
color: red;
}
table.ewiki-tasklist-table {
border: 2;
cellpadding: 5;
}
</style>
</head>
<body>
<h1>Task List</h1>
<table class="ewiki-tasklist-table" border="2" cellpadding="5">
<tbody>
<tr>
<th>Date</th>
<th>Number</th>
<th>Priority</th>
<th>Status</th>
<th>Task</th>
<th>Project</th>
</tr>
<!-- Page published by Emacs Wiki begins here -->';
# this is used to suppress the date in subsequent rows of the same date
my $prevdate = "1970-01-01";
# loop over all tasks
foreach $task (@tasks) {
# remove newline
chomp $task;
# remove leading dotslash from file name
$task =~ s%\./%%;
# extract the date (using dot notation)
my $date = $task;
$date =~ s%(.*):\#.*%$1%;
# get the date (using dash notation)
my $taskdate = $date;
$taskdate =~ s%\.%-%g;
# extract the task number
my $number = $task;
$number =~ s%.*:\#[ABC](\d*).*%$1%;
# extract the priority
my $priority = $task;
$priority =~ s%.*:\#([ABC]).*%$1%;
# extract the status
my $status = $task;
$status =~ s%.*:\#[ABC]\d* (.).*%$1%;
# extract the task description
my $the_task = $task;
$the_task =~ s%.*:\#[ABC]\d* . (.*) \(.*\)$%$1%;
# extract the project name
my $project = $task;
$project =~ s%.*:\#[ABC]\d*.* \((.*)\)$%$1%;
# remove double brackets, if any
$project =~ s%\[\[(.*)\]\]%$1%;
# start a new table row
print "<tr>";
# print date only if different from previous row
if ($date eq $prevdate) {
print "<td></td>";
}
else {
print "<td><a href=\"$date.html\">$taskdate</a></td>";
}
print "<td>$number</td>";
# allow for color coding according to priority
if ($priority eq "A") {
print "<td class=\"prioritya\">$priority</td>";
}
elsif ($priority eq "B") {
print "<td class=\"priorityb\">$priority</td>";
}
elsif ($priority eq "C") {
print "<td class=\"priorityc\">$priority</td>";
}
else {
print "<td>$priority</td>";
}
print "<td>$status</td>";
# allow for color coding according to status
if ($taskdate lt $ltime && $status ne "X") {
print "<td class=\"taskoverdue\">$the_task</td>";
}
elsif ($status eq "X") {
print "<td class=\"taskdone\">$the_task</td>";
}
elsif ($status eq "_") {
print "<td class=\"taskpending\">$the_task</td>";
}
elsif ($status eq ">") {
print "<td class=\"taskdelegate\">$the_task</td>";
}
else {
print "<td>$the_task</td>";
}
print "<td><a href=\"$project.html\">$project</a></td></tr>\n";
# save date for next iteration
$prevdate = $date;
}
# start todo list
print '</tbody></table>
<h1>ToDo List</h1>';
# loop over all files containing todo sections
foreach $file (@todos) {
print "<p><a href=\"$file.html\">$file</a></p>";
}
# output html footer
print '<br> <!-- Page published by Emacs Wiki ends here -->
<div class="navfoot">
<hr>
<table width="100%" border="0" summary="Footer navigation">
<tr>
<td width="33%" align="left">
<span class="footdate">Updated: ' . $ltime . '</span>
</td>
<td width="34%" align="center">
<span class="foothome">
<a href="WikiIndex.html">Index</a>
</span>
</td>
<td width="33%" align="right">
</td>
</tr>
</table>
</div>
</body>
</html>';
exit 0;
# return current local time in YYYY-MM-DD format
sub get_ltime() {
my %months = (
0 => "01",
1 => "02",
2 => "03",
3 => "04",
4 => "05",
5 => "06",
6 => "07",
7 => "08",
8 => "09",
9 => "10",
10 => "11",
11 => "12");
my($sec, $min, $hour, $day, $mon, $year, $wday, $yday, $isdst) = localtime(time);
my $fullday;
if ($day < 10) {
$fullday = "0" . $day;
}
else {
$fullday = $day;
}
my $fullyear = 1900 + $year;
my $datestring = $fullyear . "-" . $months{$mon} . "-" . $fullday;
}
E-Mail from ISO
I'd love to hear about any questions, comments, suggestions or links that you might have. Your comments will not be posted on this website immediately, but will be e-mailed to me first. You can use this form to get in touch with me, or e-mail me at sacha@sachachua.com .