Parsing Apple.Mail's *.elmx files [MIME messages] - objective-c

I'm in search of a framework, which allows to parse *.elmx email files of Apple.Mail.
Ultimately, I'd like to extract attachments from emails.
Unfortunately, I'm not aware of such a framework. Are you?
PS: For general parsing problems, ParseKit looks promising.

There is an open-source solution written almost entirely in objective-c called Pantomime although probably dated. Here's the link.

Consider using AppleScript and Automator and integrate the AppleScript in your Cocoa app.
Similar example here, http://hintsforums.macworld.com/showthread.php?t=95583

Related

Reading (and writing) Opera .adr bookmarks

Is there any library to parse the .adr file format used by Opera bookmarks?
Does it also support writing in that format?
At first, I'd ask for a Python library, but I'm also curious if there are such library for other languages.
There is parser example for Perl language https://github.com/cosimo/Bookmarks-Parser/
I have been tinkering with this recently and wrote parser in PHP for it.
I am not sure writing or modifying it is viable, given items contain some kinds of internal IDs whichi probably tie into Opera Link and stuff.

objective-c tags file for vim

I'd like to use Vim for editing sources and Xcode for all other purposes like managing, debugging etc. I've installed cocoa.vim plugin and it helps with highlighting, but I still need a way to navigate around the code. In java project I used ctags for the purpose, but it doesn't support obj-c.
So the question is: what is the easiest way to generate vi-compatible tags file for Objective-C sources?
I'm the author of the second link that jelera pointed to and must say it is now out of date.
I would follow the advice in the accepted answer of Alternatives to Ctags/Cscope with Objective-c? in order to get full Obj-C parser support in ctags.
If you use tagbar, this post will help get the new ctags binary working with it:
http://bastibe.de/2011-12-04-how-to-make-tagbar-work-with-objective-c.html
This is pretty much the setup I now use.

making osx modal

I've used applescript a lot, and I love it. But for some workflows it would be really neat to be able to go into a "mode" where single keystrokes would allow me to launch scripts, choose options in dialogs, interact with apps etc. It's my impression that this is impossible with applescript alone but doable with objective-c. What are my options? What do I google to start reading up on this?
PS. If there are several options I'd prefer the ones that work best with applescript (or python).
I think the best way is learning AppleScriptObjC, You write an cocoa application with AppleScript syntax. Like Apple says, with AppleScriptObjC you can write first class applications in AppleScript. If you have no experience with cocoa it can be very time consuming job to use the right objects and it's methods. So before you think, like many others, that there is a huge lack of documentation, your answers can be found in the Cocoa-Objective-C documentations and examples. A good book for people who are familiar with AppleScript already is Shane Stanley's AppleScriptObjC explored, that can be found here http://www.macosxautomation.com/applescript/apps/index.html.
Because you know python as well you could use PyObjC as well but I don't have experience with it.

How to get and parse JSON using objective C?

Is it possible to get and parse JSON using objective C, then manipulate it within the cocoa framework for the iphone/pad? I'm specifically looking to do this for a couple of public APIs out there.
See here: how to do json parsing in iphone
Basically, you should look into the TouchJSON library (with CJSONDeserializer and CJSONSerializer).
Used Json-framework on some previous projects, worked really well.
EDIT: I read your post a bit too fast. I've used it on a Mac app before but not targeting the iphone/ipad. I think it should work but have no background to it. Maybe someone else can confirm?
It's not only possible, it's dirt simple if you use one of the many existing open source projects dedicated to this task. I recommend trying yajl-objc, which offers a streaming parser, but json-framework is a good one too. They're very similar.
I'd stay away from TouchJSON, since it gave me trouble a while back with special characters (line breaks) in strings.
However, I'll join the choir recommending json-framework. Since I switched to that from TouchJSON everything's been running smoothly.
Regarding how to integrate the API in your project, they're equally simple to include and use.
As a side note, I'm just now testing out JSONKit, since it's supposed to be much faster than both TouchJSON and json-framework. However, I can't vouch for its stability yet. The reviews of it are good, though.
If you're developing an application that is only iOS 5.0 or later, you can use NSJSONSerialization.

Syntax coloring for Cocoa app

I'm planning to do a Cocoa app that requires code syntax to be colored (in all common languages). Instead of writing my own code highlighter/parser, are there any pre-made solutions available?
Thanks
You might be able to use something like Geshi, but there're also the resources listed here: http://www.cocoadev.com/index.pl?SyntaxHighlighting
Edit
More links:
Syntax Highlighting in Cocoa TextView? Experiences? Suggestions? Ideas?
http://parsekit.com/okudakit/
An excellent solution is Uli Kusterer's UKSyntaxColoredTextDocument. It is fast and has several built-in syntax parsers. It's easy to add new languages.
It's free for non-commercial use and very cheap if you want it for a commercial app.
You can also use the JavaScript library SyntaxHighlighter and embed it into a WebView into your app.
After quite a bit of research trying to solve a similar problem, the simplest approach I found by far is to use a JavaScript library for syntax highlighting combined with a WebView. Spending time writing a syntax highlighter, a fairly complex task, is probably not what you'd want to spend time on.
I settled on using the popular CodeMirror and wrote an open source wrapper for Cocoa: https://github.com/swisspol/CodeMirrorView. You can use similar approaches to wrap other JavaScript based code editors in Cocoa apps.
You can use highlight that is used in QLColorCode :) (however, it's not a Framework that you include in your code, but a command-line utility)
EDIT: Ah yeah, use Geshi, it's probably better :D