{ "info": { "author": "PayPal SDK Team", "author_email": "brfitzgerald@paypal.com, jbleechersnyder@paypal.com", "bugtrack_url": null, "classifiers": [], "description": "Baler\n=====\n\n.. image:: https://raw.githubusercontent.com/paypal/baler/master/doc/baler-logo.jpg\n\nBaler is a Python-based tool that makes it easy to bundle and use resources (images,\nstrings files, etc.) in an iOS static library.\n\nThe `card.io`_ and `PayPal iOS SDK`_ projects use baler to include images and\nother non-code assets in their SDK static libraries. Developers only\nneed to add the ``.h`` headers and ``.a`` archive, which includes all\nresources.\n\n.. _card.io: https://github.com/card-io/card.io-iOS-SDK\n.. _PayPal iOS SDK: https://github.com/paypal/PayPal-iOS-SDK\n\nBaler is *not* a good way to handle assets in a regular consumer-facing\napp!\n\nFeatures\n--------\n\n- Preserves all subdirectory structure (useful for localization via\n ``.lproj`` subbundles)\n- Optional transparent libz compression (good for text, not helpful for images\n only).\n- Resolution- and device-aware image loading very similar to\n ``UIImage's +imageNamed:``.\n\nTo see the full set of options, run ``bale -h``.\n\nTo use the generated code, look at the generated header file. It should\nbe documented and self-explanatory. If the help flag to the python\nscript or the header file is not sufficient documentation, please `file\nan issue`_!\n\n.. _file an issue: https://github.com/paypal/baler/issues\n\nThe included Xcode project is not needed to use baler. It is useful for\ndeveloping baler itself, and for an example integration.\n\n\nRequirements\n------------\n\n- Python 2 >= 2.6 (pull requests to also support Python 3 welcomed)\n- ARC, deployment target of iOS 6.0+, and Xcode 5+\n- `pip`_\n\n.. _pip: http://www.pip-installer.org/\n\n\nInstallation\n------------\n\nInstall with pip:\n\n::\n\n pip install baler\n\nOr download and install from source:\n\n::\n\n python setup.py install\n\n\nUsage\n-----\n\nBaler generates code. A python script (``bale``) accepts a directory of\nassets and generates an Objective-C class that bundles those assets.\n\nOptions are documented in the built-in help:\n\n::\n\n bale -h\n\nExample invocation:\n\n::\n\n bale resources/bundle_assets/,resources/strings Classes/ --overwrite-delay 0 -z -c BalerBundle\n\nThis would use the files in ``resources/bundle_assets`` and\n``resources/strings`` to generate a bundle class written to\n``Classes/BalerBundle.h`` and ``Classes/BalerBundle.m``, with\ncompression and no overwrite delay. Be sure to use a class\nname more appropriate to your SDK than \"BalerBundle\", to\navoid possible collisions with other SDKs using baler.\n\nOnce the class files are generated, go ahead and add them to your project, then\nin your code import the generated header:\n\n::\n\n #import \"MyBalerBundle.h\"\n\nAnd then get and use your bundle normally:\n\n::\n\n NSBundle *aBundle = [[PPZebraBundle sharedInstance] NSBundle]\n\nOr take advantage of the `imageNamed` method:\n\n::\n\n UIImage *img = [[MyBalerBundle sharedInstance] imageNamed:@\"baler-logo.jpg\"];\n\n\nIntegration\n-----------\n\nYou can integrate baler into your build process in two ways:\n\n1. Manually, by running it whenever you alter your assets.\n2. Automatically, by integrating it into your Xcode build.\n\nManual Use\n~~~~~~~~~~\n\nA quick way to get running is to manually invoke baler whenever you\nchange, add, delete, or move assets.\n\n1. Install baler as described above.\n2. Run\n ``bale ``.\n3. Add the output code to your project. Refer to the header file\n (e.g. ``BalerBundle.h``) for usage.\n4. If using compression, add ``libz.dylib`` in the Link Binary With\n Libraries build phase.\n\n\nAutomated Use\n~~~~~~~~~~~~~\n\nInstead of running `bale` manually each time you want to update the generated code, you can add a `bale` step into your Xcode project.\n\n1. Install baler as described above.\n\n2. Place the assets that you want to include in a subdirectory (e.g. `baled_assets`), usually alongside your `.xcodeproj` bundle. Optional: You can add this directory to your\n Xcode project if you want, but be sure not add them to any targets.\n\n3. Create a **Run Script** build phase. In your project/target's Build Phases tab -- before the Compile Sources phase -- add an appropriate invocation of `bale`, e.g.\n\n ::\n\n /path/to/python/env/bin/bale baled_assets Classes --overwrite-delay 0 -c BalerBundle\n\n This will regenerate the bundle from the assets each time you build. See tips below for more further advice.\n\n4. Add the generated files (e.g. ``Classes/BalerBundle.[h|m]``) to your Xcode project as usual. Refer to the header file (e.g. `BalerBundle.h`) for usage.\n\n5. If using compression, add ``libz.dylib`` in the Link Binary With Libraries build phase.\n\n6. Optional: Add the generated classes' self-tests to your unit tests.\n\n Set ``BALER_DEBUG=1`` in your test target settings, then use the bundle instance's ``passesSelfTest`` method:\n\n ::\n\n NSError *bundleSelfTestError = nil;\n BOOL pass = [[BalerBundle sharedInstance] passesSelfTest:&bundleSelfTestError];\n STAssertTrue(pass, @\"BalerBundle failed self-test with error %@\", bundleSelfTestError);\n\n\nRun Script tips\n```````````````\n\nSkip if baler isn't set up\n''''''''''''''''''''''''''\n\nYou can ensure the build progresses even if the baler invocation fails by having the shell command swallow the non-zero return code from baler, e.g.\n\n::\n\n /path/to/python/env/bin/bale baled_assets Classes --overwrite-delay 0 || echo \"Failed to generate bundle\"\n\nThis keeps the coupling with baler a little looser, so other contributors won't need baler to build the project.\n\nBYOB (Bring Your Own Baler)\n''''''''''''''''''''''''''''\n\nYou may want to let your teammates specify which baler to use in a `.gitignore`'d shell script. For example, a `.env`:\n\n::\n\n export PATH=\"/path/to/python/env/bin:$PATH\"\n\nThen your Run Script would look like this:\n\n::\n\n [ -f .env ] && source .env 2>/dev/null\n bale ...\n\nContribute\n----------\n\nPull requests and new issues are welcome. See CONTRIBUTING.md_ for details.\n\n.. _CONTRIBUTING.md: https://github.com/paypal/baler/blob/master/CONTRIBUTING.md\n\n\nThanks\n------\n\nLogo image\n~~~~~~~~~~\n\nThe baler logo is modified and shared with permission of Wikimedia Commons using the same `Creative Commons Attribution-Share Alike 3.0 Unported license.`_ See also the `original image and license`_.\n\n.. _Creative Commons Attribution-Share Alike 3.0 Unported license.: http://creativecommons.org/licenses/by-sa/3.0/deed.en\n.. _original image and license: http://commons.wikimedia.org/wiki/File:Britains_-_Fiat_880DT_and_a_hay_baler.jpg\n\nContributors\n~~~~~~~~~~~~\n\n* `Dave Goldman`_\n* `Roman Punskky`_\n* `Josh Bleecher Snyder`_\n* `Brent Fitzgerald`_\n\n.. _Dave Goldman: https://github.com/dgoldman-ebay/\n.. _Roman Punskky: https://github.com/romk1n/\n.. _Josh Bleecher Snyder: https://github.com/josharian/\n.. _Brent Fitzgerald: https://github.com/burnto/\n\nBrought to you by `PayPal`_.\n\n.. _PayPal: https://paypal.com/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/paypal/baler", "keywords": "ios,objective-c,generation,static,resource,NSBundle,mobile", "license": "The MIT License (MIT)\n\nCopyright (c) 2014 PayPal\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "baler", "package_url": "https://pypi.org/project/baler/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/baler/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/paypal/baler" }, "release_url": "https://pypi.org/project/baler/1.0.4/", "requires_dist": null, "requires_python": null, "summary": "Bundle assets into iOS static libraries", "version": "1.0.4" }, "last_serial": 1151020, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "d31da1c19180fc7cda07cdb892d3880a", "sha256": "4f035b08cf8971a1492c0d1fe9494c4830a93124945b560ebcff513f6dc2c969" }, "downloads": -1, "filename": "baler-1.0.tar.gz", "has_sig": false, "md5_digest": "d31da1c19180fc7cda07cdb892d3880a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7602, "upload_time": "2014-04-04T18:47:38", "url": "https://files.pythonhosted.org/packages/0d/73/86bbd2ed57eaedb385a6eadebea1422effa0c1cfbc0924329fcf5dff5ea4/baler-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "85923cb1a30a09509de9d5e5f63b9917", "sha256": "654a3b00875b28e3e6146118b17562b52c07f926a38117bf6500960a2b663c75" }, "downloads": -1, "filename": "baler-1.0.1.tar.gz", "has_sig": false, "md5_digest": "85923cb1a30a09509de9d5e5f63b9917", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7592, "upload_time": "2014-04-04T18:53:48", "url": "https://files.pythonhosted.org/packages/02/c1/e6df8484ed4cba8d3711f1f41b991fc050df74a08de79e685834d043454e/baler-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "16855a5966c8f1b9956460ad198265d5", "sha256": "9857ed9cc66823b86836d72e04fe95ff17efa274d48bae3f00e8d722067af19d" }, "downloads": -1, "filename": "baler-1.0.2.tar.gz", "has_sig": false, "md5_digest": "16855a5966c8f1b9956460ad198265d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12396, "upload_time": "2014-04-04T20:41:03", "url": "https://files.pythonhosted.org/packages/14/ca/46a2e0e4fae91fcd5ba6fc7e3d4bd482bf45937adcfc3e44ae8d2bdb1b0d/baler-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "95761ce530559d85c3443765871727b1", "sha256": "d2562ff12741b19a51a6fd4f6c54fb1266fc540ede93e1d2a81db7ff33ccaab0" }, "downloads": -1, "filename": "baler-1.0.3.tar.gz", "has_sig": false, "md5_digest": "95761ce530559d85c3443765871727b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12398, "upload_time": "2014-04-29T22:55:14", "url": "https://files.pythonhosted.org/packages/1a/e3/3e8363f8699f64e84015a79ff6116a0af3a654fb0690d8bbe6ec68239aa4/baler-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "f423442221b7bdfecc807293cf00d0a7", "sha256": "3509eaec87cbe33ef58393fa8a4eb54780e31020daeb614a8785df5d25526e1f" }, "downloads": -1, "filename": "baler-1.0.4.tar.gz", "has_sig": false, "md5_digest": "f423442221b7bdfecc807293cf00d0a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12453, "upload_time": "2014-07-08T14:32:18", "url": "https://files.pythonhosted.org/packages/ed/3a/92d8fa889cbd7dffa628197ad83ef0f51e653b9df1eee7ac302057835838/baler-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f423442221b7bdfecc807293cf00d0a7", "sha256": "3509eaec87cbe33ef58393fa8a4eb54780e31020daeb614a8785df5d25526e1f" }, "downloads": -1, "filename": "baler-1.0.4.tar.gz", "has_sig": false, "md5_digest": "f423442221b7bdfecc807293cf00d0a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12453, "upload_time": "2014-07-08T14:32:18", "url": "https://files.pythonhosted.org/packages/ed/3a/92d8fa889cbd7dffa628197ad83ef0f51e653b9df1eee7ac302057835838/baler-1.0.4.tar.gz" } ] }