Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kainjow

Moderator emeritus
Original poster
Jun 15, 2000
7,958
7
BBEncoder is a little app I put together that converts rich text to BBCode.

Screenshots and examples:

bbencoder_screenshot.png

Code:
[color=#007400]//[/color]
[color=#007400]//  main.m[/color]
[color=#007400]//[/color]

[color=#643820]#import [/color][color=#c41a16]<Cocoa/Cocoa.h>[/color][color=#643820]
[/color]
[color=#aa0d91]int[/color] main([color=#aa0d91]int[/color] argc, [color=#aa0d91]char[/color] * argv[])
{
    [color=#aa0d91]return[/color] [color=#2e0d6e]NSApplicationMain[/color](argc,  ([color=#aa0d91]const[/color] [color=#aa0d91]char[/color] **) argv);
}

Code:
[b]tell[/b] [i][color=#0000ff]application[/color][/i] "iTunes"
    [b][color=#0000ff]play[/color][/b] ([b][color=#0000ff]next track[/color][/b])
[b]end[/b] [b]tell[/b]

MacRumors RSS said:
No SD Card Slot in Next-Generation iPad?
A series of rumors over the past several months have suggested that the next-generation iPad could gain an SD card slot, making it easier for consumers to load photos directly onto the device without needing to resort to a dongle attached via its doc...
Friday, 1:12 PM
A series of rumors over the past several months have suggested that the next-generation iPad could gain an SD card slot, making it easier for consumers to load photos directly onto the device without needing to resort to a dongle attached via its doc... *Read more…

Currently supported tags: [b], [u], [i], [color], [url], [left], [right], [center], [size] and [s] ([s])

AppleScript Editor and Xcode will copy formatted text automatically, so you can paste directly into the program.

Requires 10.5+ (PPC and Intel). Open source.
 

Attachments

  • BBEncoder.zip
    27.7 KB · Views: 411
Last edited:
Thank you for this! I've been looking for something related that will streamline the ability to copy this:
PHP:
<a href="https://forums.macrumors.com/forums/90/">MacBook Pro</a>
... and paste to the forum (even with a different shortcut) this:
PHP:
[url="https://forums.macrumors.com/forums/90/"]MacBook Pro[/url]
The closest I've been able to come is a script that does the conversion, but I'm still left with:
  1. Right-click
  2. "Copy Link HTML Tag"
  3. Click the script button on the Menu Bar
  4. Click on the URL script in the script listing
  5. Paste the reformatted string.
 
Thank you for this! I've been looking for something related that will streamline the ability to copy this:
PHP:
<a href="https://forums.macrumors.com/forums/90/">MacBook Pro</a>
... and paste to the forum (even with a different shortcut) this:
PHP:
[url="https://forums.macrumors.com/forums/90/"]MacBook Pro[/url]

On that note, if you use Firefox, the CoLT add-on helps with this by adding a copy link as BB Code option, amongst others. It's really helpful for composing posts here.

The BBEncoder looks pretty slick. BBEdit (no relation to BBCode) is my editor of choice and I created a clippings group for BBCode to more quickly compose posts. Parsing rich text can be a pain so congrats on dealing with it.
 
^^ I hate to be rude, and i normally don't bump up topics like this, but I was wondering if it would be possible to modify the software to account for different sizes? See, I sometimes write literature, and i find it, irritating, to have to go back, and add in the appropriate BBcodes.

If you don't want to, I understand. I have no issue with that.
 
It's something I can look into. What do you use to write the source document (for example Word or Pages)?
 
What a great utility! This will be used a lot as it is but it would be cool if you could add support for more tags.

http://www.bbcode.org/reference.php

A few that seem easier to code would be

Line-through
Font-size
Center

As i said, it's a fantastic time saver already. Thanks so much!
 
I just uploaded version 1.1 which adds support for tags left, right, center, size and s/strike. Also the source code is now available (link in first post).
 
Just as TUSF, sorry for bumping the thread, and thanks so much for making this app! Its very useful and saves a lot of time!

I'd like to ask if there is any way you could make available the version 1.0 that didn't have size or, make a new version that allows to disable it? I'm doing big transcriptions and it is already saving me a lot of time, but I have to delete all the size codes it makes, it would be awesome if removing it was possible (it marks the size as 1 even though its like 10, but its better if it doesn't say the size at all) Nevermind! Just found the replace tool, can remove it very easily with it.

Either way, thanks for the great app! =)
 
Last edited:
I just downloaded the program and it keeps putting the left alignment code around everything in italics, making breaks in paragraphs around every italicized word. Can you maybe fix it so it doesn't do that? I'm spending almost as much time going through the document deleting all the align left code as I am just manually putting in the code to italicize a word. Other than that, it's a great little program. I've been looking all day for something that'll do this and it's the closest I've come to anything decent. Thanks for creating it!
 
Last edited:
I, too, would like to thank you for this tool. If there wasn't such a tool, I would have used my limited programming knowledge to try to write my own. Currently fimfiction doesn't allow file uploads so I had to manually add italics. A few things I noticed: it tends to set the alignment even if it's left-aligned. Perhaps an option for ignoring left alignment?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.