I haven't found a way to easily markup IRC transcripts in Markdown on my Instiki install yet. Hopefully this isn't a reason to go through all my wiki pages and switch to Textile. For an IRC transcript like this: <johnsu01> M P r marks all the articles in the region with # <johnsu01> M-& makes the next command apply to all marked articles <johnsu01> M-U removes all marks (like the read mark) <johnsu01> in gnus you can mark articles with # when you want commands to apply to more than one article <johnsu01> the mark will disappear after the command is executed The best markup I've found is to simple wrap the text in <pre>, </pre> tags. However, the usernames between the <, >'s always disappear when rendered in HTML. Is the only way to get the usernames not to disappear is in HTML is to replace the <, >'s with <, >'s? Can I get Markdown do that for me?
on 2007-06-23 19:21
on 2007-06-23 21:40
On Jun 23, 10:15 am, levander <levander...@gmail.com> wrote: > Is the only way to get the usernames not to disappear is in HTML is to replace the <, >'s with <, >'s? You definitely need to escape them one way or another. If you want to do it all in ruby, this will do it: require 'cgi' CGI::escapeHTML(irc_log) > Can I get Markdown do that for me? According to http://daringfireball.net/projects/markdown/syntax#precode you can start each line with a tab to get both <pre> text and HTML escaping. From ruby do irc_log.gsub(/^/,"\t") Does either solution work for you?
on 2007-06-24 00:30
Thanks rking. Indenting every line 4 space in the IRC transcript did work. Guess I just didn't want to do it that way because I wanted to be able to copy and paste the whole transcript in without any formatting. Guess I'll just have to use a fully-featured text editor to indent it, then copy and paste it into instiki from there.
on 2007-06-24 03:36
On Jun 23, 3:27 pm, levander <levander...@gmail.com> wrote: > Thanks rking. Indenting every line 4 space in the IRC transcript did > work. Guess I just didn't want to do it that way because I wanted to > be able to copy and paste the whole transcript in without any > formatting. > > Guess I'll just have to use a fully-featured text editor to indent it, > then copy and paste it into instiki from there. Not to plug my own war3z, but it was exactly things like that that moved me to write `clipfilter`, which is distributed with Clipboard.pm (which I vaguely intend on rubifying). Available at: http://search.cpan.org/~king/Clipboard-0.09/ (it should work using native calls in Windows and OSX, and use the `xclip` program under Unices) If you create a script like this: #!/bin/sh ruby -pe 'sub(/^/, " "*4)' and put it in $PATH with a name of, say, 4spaces, you can then run: clipfilter 4spaces This will pipe the current clipboard contents to the listed program and then take the output to be the new clipboard contents. You might want to speed the access to this, such as an alias (like "c4"), bind it to a keyboard shortcut, or maybe make a launcher/icon thing.