Incoming from Curtis Sloan:
>
> However, the notes in korganizer still don't respect the \n. Any leads to
> solving that would be great. But I think I'm pretty close now. I still need
> to evaluate each DESCRIPTION property for some rogue characters that need
> escaping. Thanks to everyone for their help so far, especially Stephen.
Glad to see you're making progress. :-)
I don't use korganizer (nor any other kind of organizer; I do better
with find and grep :-), so I have no idea what the file format should
be. Can you set your current data aside and make korganizer save a
sample data file? That should make for a good comparison between the
two, showing you what you need to do with the real data.
Failing that, pull out vi again and do a few "J" (join line) commands
in the right places, then see if KO groks that entry. If that works,
then you know KO wants to see the entry all in one long unbroken line
of data.
And if that's true, it's then just a matter of looping through all the
description sections with a script, concatting each into individual
long lines.
Smiple. :-)
#!/usr/bin/perl -w
#
# usage:
# $0 < infile > outfile
#
my( $line, $line2 );
while( <STDIN> ) {
chomp( $line = $_ );
next if ! /DESCRIPTION/;
chomp( $line2 = <STDIN> );
while( ! /ENDSECTION/ ) {
$line .= " " . $line2;
chomp( $line2 = <STDIN> );
}
print $line . "\n";
}
... or something like that.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling
- -
_______________________________________________
clug-talk mailing list
[EMAIL PROTECTED]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca