Re: Simple ROT13

2012-06-23 Thread Kendall Conrad
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  | 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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Simple ROT13

2012-06-23 Thread LuKreme

On 23-Jun-2012, at 16:21, "Ed. Floden"  wrote:

> On 2012-Jun-23, at 16:58 , 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.
> 
> Have you tried Text > Apply Text Filter > Rot13?

There is nothing listed in Text -> Apply Text Filter. There is a right arrow 
showing that there should be a sub menu, but no menu appears.

-- 
showing snuffy is when Sesame Street jumped the shark

-- 
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Simple ROT13

2012-06-23 Thread Ed. Floden
On 2012-Jun-23, at 16:58 , 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.

Have you tried Text > Apply Text Filter > Rot13?


-- 
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 


Re: Simple ROT13

2012-06-23 Thread Charlie Garrison

Good morning,

On 23/06/12 at 3:58 PM -0600, LuKreme  wrote:


However, it seems pretty straightforward to do, maybe with a text factory?

cat  | tr a-zA-Z n-za-mN-ZA-M

But I'd prefer not dropping to the command line to do this.


How about a text filter to drop to the command line for you? 
Just wrap the command in a shell script and drop it into your 
Text Filters folder. BBEdit will pass selected text as STDIN and 
read STDOUT to replace selected text. (At least I think that's 
right, maybe check the manual.)



Charlie

--
   Ꮚ Charlie Garrison ♊ 

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt

--
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.

Follow @bbedit on Twitter: 


Simple ROT13

2012-06-23 Thread LuKreme
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  | 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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at

If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: