BBEncoder - convert formatted text to BBCode

Discussion in 'Mac Apps and Mac App Store' started by kainjow, Jan 30, 2011.

  1. kainjow, Jan 30, 2011
    Last edited: Apr 23, 2011

    kainjow Moderator emeritus


    Jun 15, 2000
    BBEncoder is a little app I put together that converts rich text to BBCode.

    Screenshots and examples:


    [color=#007400]//  main.m[/color]
    [color=#643820]#import [/color][color=#c41a16]<Cocoa/Cocoa.h>[/color][color=#643820]
    [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);
    [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]
    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.

    Attached Files:

  2. GGJstudios macrumors Westmere


    May 16, 2008
    Thank you for this! I've been looking for something related that will streamline the ability to copy this:
    <a href="">MacBook Pro</a>
    ... and paste to the forum (even with a different shortcut) this:
    [url=""]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.
  3. angelwatt Moderator emeritus


    Aug 16, 2005
    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.
  4. GGJstudios macrumors Westmere


    May 16, 2008
    I haven't seen anything like that for Safari. It sure would come in handy!
  5. TUSF macrumors newbie

    Apr 5, 2011
    ^^ 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.
  6. kainjow thread starter Moderator emeritus


    Jun 15, 2000
    It's something I can look into. What do you use to write the source document (for example Word or Pages)?
  7. paladincomp macrumors newbie

    Apr 16, 2011
    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.

    A few that seem easier to code would be


    As i said, it's a fantastic time saver already. Thanks so much!
  8. kainjow thread starter Moderator emeritus


    Jun 15, 2000
    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).
  9. Yechnagoth, Oct 24, 2011
    Last edited: Oct 25, 2011

    Yechnagoth macrumors newbie

    Oct 24, 2011
    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! =)
  10. AlexKade, Dec 27, 2011
    Last edited: Dec 27, 2011

    AlexKade macrumors newbie

    Dec 27, 2011
    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!
  11. Madd the Sane macrumors 6502a

    Madd the Sane

    Nov 8, 2010
    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?

Share This Page