I found a rot13 Python script in my BBEdit Unix Filter folder. Below is the 
script. As a Unix Filter, it will be applied to whatever is highlighted, or 
the entire file if there's no selection. I don't remember where the script 
came from, but seems to work. Alternatively, you could write your own Unix 
Filter that goes to a Bash script using the command you gave, though not 
quite in it's current format, provided after the Python.

=================
#!/usr/local/bin/python

import fileinput
import string

unshifted = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
shifted =   'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
rot13_table = string.maketrans(unshifted, shifted)

for my_line in fileinput.input():
    print string.translate(my_line, rot13_table),

=================

#!/bin/sh
cat "$1" | tr a-zA-Z n-za-mN-ZA-M

=================

-Kendall


On Saturday, June 23, 2012 5:58:55 PM UTC-4, LuKreme wrote:
>
> I know there is an old plugin for BBEfit that does ROT13, but considering 
> it's 6 years old I have no idea if it even works with a modern mac and a 
> modern version of BBEdit.
>
> However, it seems pretty straightforward to do, maybe with a text factory?
>
> cat <text> | tr a-zA-Z n-za-mN-ZA-M
>
> But I'd prefer not dropping to the command line to do this.
>
> (Yes, I know, ROT13 is a relic of a bygone age, but it is still sometimes 
> useful<1> on USENET, or at least requested.)
>
> <1> FSVO useful.
>
> -- 
> I just got into the Beatles a couple years ago, you know, I like it. 
> —Ziggy Marley
>
>

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to