From 8bc1561f5df8e01ac95e61ea879caf836c81d7c6 Mon Sep 17 00:00:00 2001 From: schodet Date: Fri, 23 Jul 2004 18:40:41 +0000 Subject: Indentations possibles Ajout des + et - --- 2005/d/dev/todo/tasklist.css | 9 ++++++++- 2005/d/dev/todo/tasklist.dtd | 3 +++ 2005/d/dev/todo/tasklist.pl | 16 ++++++++++++++-- 2005/d/dev/todo/tasklist.xsl | 6 +++++- 4 files changed, 30 insertions(+), 4 deletions(-) (limited to '2005') diff --git a/2005/d/dev/todo/tasklist.css b/2005/d/dev/todo/tasklist.css index 5fdb706..9a4d284 100644 --- a/2005/d/dev/todo/tasklist.css +++ b/2005/d/dev/todo/tasklist.css @@ -50,12 +50,19 @@ div.subtask { /* border: 1px solid black; */ } -div.desc { +div.desc, div.desc-todo { display: block; margin: 0; padding: 5px; } +div.desc-done { + display: block; + margin: 0; + padding: 5px; + color: #888; +} + div.header { display: block; } diff --git a/2005/d/dev/todo/tasklist.dtd b/2005/d/dev/todo/tasklist.dtd index ae077d2..a0a2389 100644 --- a/2005/d/dev/todo/tasklist.dtd +++ b/2005/d/dev/todo/tasklist.dtd @@ -9,3 +9,6 @@ + diff --git a/2005/d/dev/todo/tasklist.pl b/2005/d/dev/todo/tasklist.pl index 5e9aaba..a08f32d 100755 --- a/2005/d/dev/todo/tasklist.pl +++ b/2005/d/dev/todo/tasklist.pl @@ -33,6 +33,7 @@ sub build_tab while (<>) { chomp; + s/^[ \t]+//; if (!defined $lastdesc && /^([a-z0-9](?:\.[a-z0-9.]+)*) (.*)/) { # Task. @@ -67,7 +68,7 @@ sub build_tab { die "Task not defined" unless defined $task; $$task{'desc'} = [ ] unless defined $$task{'desc'}; - if (defined $lastdesc) + if (defined $lastdesc && !/^[+-]/) { $$lastdesc .= ' ' . $_; } @@ -95,7 +96,18 @@ sub print_task_xml } for (@{$$task{'desc'}}) { - print "$space $_\n"; + if (/^\+ /) + { + print "$space $_\n"; + } + elsif (/^- /) + { + print "$space $_\n"; + } + else + { + print "$space $_\n"; + } } for (sort { $a <=> $b || $a cmp $b } keys %$task) { diff --git a/2005/d/dev/todo/tasklist.xsl b/2005/d/dev/todo/tasklist.xsl index 59fa0b0..48d72b6 100644 --- a/2005/d/dev/todo/tasklist.xsl +++ b/2005/d/dev/todo/tasklist.xsl @@ -67,7 +67,11 @@ - + + - + + -- cgit v1.2.3