Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/marcransome/mrworker
- Owner: marcransome
- License: mit
- Created: 2013-11-25T19:52:38.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-11-28T23:32:51.000Z (about 2 years ago)
- Last Synced: 2024-10-11T18:03:51.328Z (4 months ago)
- Topics: async-command, objective-c
- Language: Objective-C
- Homepage:
- Size: 53.7 KB
- Stars: 14
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).