Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Clipboard transform key: Text to HTML for PerlMonks

by PhilHibbs (Hermit)
on Aug 19, 2003 at 18:08 UTC ( #284974=note: print w/replies, xml ) Need Help??

in reply to Clipboard transform keys

Here is another clipboard transform that I use. It translates plain text to HTML markup for special characters, and is enhanced for PerlMonks with [ and ] handling (there, I just used it). I call it "clipmonk.cmd", and I bind it to Ctrl-Shift-M.
Update: Added L~R, ()}{ and s_t translation
@rem = '--*-Perl-*-- @echo off perl -x -S "%~dpnx0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl @rem '; #!perl #line 8 use strict; use warnings; use HTML::Entities; use Win32::Clipboard; my $CLIP = Win32::Clipboard(); my $text = $CLIP->GetText; $text = encode_entities($text); $text =~ s|\[|\[|g; $text =~ s|\]|\]|g; $text =~ s/L~R/[Limbic~Region|L~R]/g; $text =~ s/\(\)}{/[(-+-)bsidian }{eat|()}{]/g; $text =~ s/s_t/[submersible_toaster|s_t]/g; $CLIP->Set($text); __END__ :endofperl

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://284974]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-11-18 02:49 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (277 votes). Check out past polls.