Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marcransome/mrworker

A tiny Objective-C library for launching command-line programs and observing their output.
https://github.com/marcransome/mrworker

async-command objective-c

Last synced: 3 months ago
JSON representation

A tiny Objective-C library for launching command-line programs and observing their output.

Awesome Lists containing this project

README

        

# MRWorker

[![Build Status](http://img.shields.io/travis/marcransome/MRWorker.svg?style=flat)](https://travis-ci.org/marcransome/MRWorker)

`MRWorker` is a tiny Objective-C library for running command-line programs asynchronously and observing their output.

A simple example:

```objc
MRWorkerOperation *operation = [MRWorkerOperation workerOperationWithLaunchPath:@"/bin/ls" arguments:@[@"-al", @"/"] outputBlock:^(NSString *output) {
// buffer/process program output
...
} completionBlock:^(int terminationStatus) {
// respond to program termination
...
}];

[[MRWorker sharedWorker] addOperation:operation];
```

## Project integration
MRWorker can be integrated into a project using [CocoaPods](http://cocoapods.org). Add the following lines to your `Podfile`:

```ruby
platform :osx, '10.9'
pod 'MRWorker'
```

Then install the dependency into your project:

`$ pod install`

## Contributions
If you would like to contribute to the project, [fork the repository](https://help.github.com/articles/fork-a-repo), make your code changes, then submit a [pull request](https://help.github.com/articles/using-pull-requests) with a brief description of your feature or bug fix.

## License
`MRWorker` is provided under the terms of the [MIT License](http://opensource.org/licenses/mit-license.php).

## Contact
Email me at [[email protected]](mailto:[email protected]) or [create an issue](https://github.com/marcransome/MRWorker/issues).