|
| From: | Egli Christian (KIRO 433) |
| Subject: | RE: [Orgmode] Org-mode versus Taskpaper - now for real |
| Date: | Fri, 4 Apr 2008 14:20:16 +0200 |
> Anyone wants to take up the challenge? What N can be achieved?
Haha, it's Friday afternoon and I decided to take the challenge. I
implemented a very simplistic and stupid translator which is quite small
but just barely manages to pass the test. It does so with 480 bytes
which makes for N = 9 (2^9 = 512).
Here's the script:
#! /usr/bin/perl
while(<STDIN>){
print unless /[:-]/g;
print if s/^(.*):$/* $1/;
print if s/^- (.*)\s+(address@hidden)$/** DONE $1/;
print if s/^- (.*)\s+(@\w+)\s+(@\w+)$/** TODO $1 :$2: :$3:/;
print if s/^- (.*)\s+(@\w+)$/** TODO $1 :$2:/;
print if s/^- (.*)$/** TODO $1/;
print if s/^\s+- (.*)\s+(address@hidden)$/*** DONE $1/;
print if s/^\s+- (.*)\s+(@\w+)\s+(@\w+)$/*** TODO $1 :$2: :$3:/;
print if s/^\s+- (.*)\s+(@\w+)$/*** TODO $1 :$2:/;
print if s/^\s+- (.*)$/*** TODO $1/;
}
Christian
| [Prev in Thread] | Current Thread | [Next in Thread] |