{ "info": { "author": "andyguo", "author_email": "andyguo@phenom-films.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation" ], "description": "dayu_path\n=========\n\n|Build Status|\n\n\u9488\u5bf9\u5f71\u89c6\u884c\u4e1a\u7684\u6587\u4ef6\u8def\u5f84\u5904\u7406\u7c7b\u3002\u6bd4\u8d77\u4f20\u7edf\u7684os.path \u6709\u7740\u4e0b\u9762\u7684\u4f18\u70b9\uff1a\n\n- \u57fa\u4e8eunipath\uff0c\u5c06\u6587\u4ef6\u8def\u5f84\u4f5c\u4e3a\u5bf9\u8c61\u5904\u7406\n- \u66f4\u597d\u7684\u9488\u5bf9\u5f71\u89c6\u884c\u4e1a\u6587\u4ef6\u4f18\u5316\u3002\u53ef\u4ee5\u5feb\u901f\u5f97\u5230frame count\u3001version \u7b49\u5b57\u6bb5\n- \u626b\u63cf\u6587\u4ef6\u81ea\u52a8\u62fc\u5408\u5e8f\u5217\u5e27\uff0c\u5e76\u4e14\u53ef\u4ee5\u8bc6\u522b\u4e22\u5e27\n- \u66f4\u5feb\u6377\u7684\u6587\u4ef6\u5e8f\u5217\u5e27\u683c\u5f0f\u8f6c\u6362\u3002\u652f\u6301%0?d\u3001####\u3001$F? \u7684\u4e09\u79cd\u5f62\u5f0f\n- \u652f\u6301\u7528\u6237\u81ea\u884c\u5bf9DayuPath \u6dfb\u52a0\u66f4\u591a\u7684\u65b9\u6cd5\u3001\u5c5e\u6027\n\n\u7b80\u5355\u7528\u6cd5\u8bf4\u660e\n============\n\n\u7ee7\u627f\u4e0eunipath\uff0c\u56e0\u6b64\u5177\u5907\u6240\u6709unipath \u7684\u65b9\u6cd5\u3002 \uff08unipath\n\u7684git\uff1ahttps://github.com/mikeorr/Unipath \uff09\n\n.. code:: python\n\n from dayu_path import DayuPath\n\n # \u521d\u59cb\u5316\n disk_path = DayuPath('/some/v0001/A001C001_170922_E4FB.1001.exr')\n\n # \u67e5\u8be2\u7236\u7ea7\u76ee\u5f55\n assert disk_path.parent == '/some/v0001'\n\n # \u62fc\u63a5\u5b50\u6587\u4ef6\u5939\u3001\u5b50\u6587\u4ef6\n assert disk.path.parent.child('child', 'new_file.txt') == '/some/v0001/child/new_file.txt'\n\n # \u83b7\u5f97\u6587\u4ef6\u540d\u3001\u6587\u4ef6\u6269\u5c55\u540d\u3001\u6587\u4ef6\u4e3b\u5e72\u90e8\u5206\n assert disk_path.name == 'A001C001_170922_E4FB.1001.exr'\n assert disk.path.ext == '.exr'\n assert disk_path.stem == 'A001C001_170922_E4FB.1001'\n\n # \u626b\u63cf\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u5939\u3001\u6587\u4ef6\n print disk_path.parent.listdir()\n\n # \u904d\u5386\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u6240\u6709\u6df1\u5ea6\u7684\u6587\u4ef6\u5939\u3001\u6587\u4ef6\n for single_file in disk_path.parent.walk():\n print single_file\n\n # \u5feb\u901f\u83b7\u5f97\u76f8\u5e94\u7684version\u3001frame count\n assert disk_path.frame == 1001\n assert disk_path.version == 'v0001'\n\n # \u5feb\u901f\u5f97\u5230\u6587\u4ef6\u7684\u6302\u8f7d\u76ee\u5f55\uff08\u76d8\u7b26\u3001\u6302\u8f7d\u70b9\uff09\n assert disk_path.root == '/'\n\n # \u5224\u65ad\u6587\u4ef6\u662f\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\uff0c\u8fd8\u662f\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\n assert DayuPath('/some/local/file').is_local == True\n assert DayuPath('/some/network/file').is_network == True\n\n # \u6587\u4ef6\u5b9e\u9645\u540d\u79f0\u8f6c\u6362\u4e3a\u5e8f\u5217\u5e27\u5f62\u5f0f\n assert disk_path.to_pattern() == '/some/v0001/A001C001_170922_E4FB.%04d.exr'\n assert disk_path.to_pattern('#') == '/some/v0001/A001C001_170922_E4FB.####.exr'\n assert disk_path.to_pattern('$') == '/some/v0001/A001C001_170922_E4FB.$F4.exr'\n\n # \u4ece\u5e8f\u5217\u5e27\u7684\u5f62\u5f0f\uff0c\u6062\u590d\u6210\u4e3a\u7edd\u5bf9\u6587\u4ef6\u8def\u5f84\n disk_pattern = disk_path.to_pattern()\n assert disk_pattern.pattern == '%04d'\n assert disk_pattern.restore_pattern(1234) == '/some/v0001/A001C001_170922_E4FB.1234.exr'\n\n # \u6587\u4ef6\u626b\u63cf\uff0c\u652f\u6301\u9012\u5f52\u6df1\u5ea6\u3002\u5e76\u4e14\u5c06\u626b\u63cf\u7684\u6587\u4ef6\u81ea\u52a8\u8bc6\u522b\u4e3a\u5e8f\u5217\u5e27\u7684\u5f62\u5f0f\n for sequence_file in disk_path.scan(recursive=True):\n print sequence_file\n # SequenceFile(filename='/some/v0001/A001C001_170922_E4FB.%04d.exr'\n # frames=[1001, 1002, 1003, 1004, 1006],\n # missing=[1005])\n\nDayuPathPlugin \u7684\u63d2\u4ef6\u7528\u6cd5\n=========================\n\n\u5982\u679c\u7528\u6237\u9700\u8981\u5bf9DayuPath\n\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7684\u51fd\u6570\u5c5e\u6027\uff0c\u9664\u4e86\u5e38\u89c4\u7684\u7ee7\u627f\u65b9\u6cd5\u4e4b\u5916\u3002\u8fd8\u53ef\u4ee5\u4f7f\u7528DayuPathPlugin\n\u5c06\u81ea\u5b9a\u4e49\u7684\u65b9\u6cd5\u3001\u5c5e\u6027\u4ee5\u63d2\u4ef6\u7684\u5f62\u5f0f\u52a0\u5165DayuPath\u3002\n\u8fd9\u6837\u53ef\u4ee5\u66f4\u52a0\u7075\u6d3b\u7684\u5728\u4ee3\u7801\u7684\u4efb\u610f\u5730\u65b9\u6839\u636e\u9700\u8981\u589e\u52a0\u3001\u51cf\u5c11\u529f\u80fd\u3002\n\n.. code:: python\n\n from dayu_path import DayuPath, DayuPathPlugin\n\n # \u7528\u6237\u81ea\u5df1\u6dfb\u52a0\u7684\u529f\u80fd\u51fd\u6570\n def my_function(self, *args, **kwargs):\n print args, kwargs\n\n # \u589e\u52a0\u63d2\u4ef6\u51fd\u6570 \uff08\u5b9e\u4f8b\u5316\u65b9\u6cd5\uff09\n DayuPathPlugin.register_func(my_function)\n DayuPath('/some/path/file').my_function(123) # (1,2,3), {}\n\n # \u4e5f\u53ef\u4ee5\u4f7f\u7528\u88c5\u9970\u5668\u6765\u8fdb\u884c\u6ce8\u518c\n @DayuPathPlugin.register_func\n def other_function(self):\n return 'hello world'\n\n\n # \u589e\u52a0\u63d2\u4ef6\u5c5e\u6027 \uff08\u7c7b\u5c5e\u6027\uff09\n DayuPathPlugin.register_attribute('my_key', default_value=100)\n assert DayuPath('/some/other/file').my_key == 100\n\n # \u53d6\u6d88\u63d2\u4ef6\u51fd\u6570\u3001\u63d2\u4ef6\u5c5e\u6027\n ret = DayuPathPlugin.unregister('my_function')\n assert ret == True\n ret = DayuPathPlugin.unregister('my_key')\n assert ret == True\n\n.. |Build Status| image:: https://travis-ci.org/phenom-films/dayu_path.svg?branch=master\n :target: https://travis-ci.org/phenom-films/dayu_path\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/phenom-films/dayu_path", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dayu-path", "package_url": "https://pypi.org/project/dayu-path/", "platform": "", "project_url": "https://pypi.org/project/dayu-path/", "project_urls": { "Homepage": "https://github.com/phenom-films/dayu_path" }, "release_url": "https://pypi.org/project/dayu-path/0.5.2/", "requires_dist": null, "requires_python": "", "summary": "a python path lib optimized for Movie industry. Support scan for sequence files, extract frame count and many other useful functions.", "version": "0.5.2" }, "last_serial": 5296052, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "2034df3d3e3028ee1403eb2691c7eb10", "sha256": "103c06fa1d7d0c1430beb4caebd061a4059c9448dc9fb0bb427c640b74935063" }, "downloads": -1, "filename": "dayu_path-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2034df3d3e3028ee1403eb2691c7eb10", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11629, "upload_time": "2018-10-08T03:31:28", "url": "https://files.pythonhosted.org/packages/60/49/9596699c48ddf32368d24240ae373ea63bae2b10cb3f136bb8b5344b1dcd/dayu_path-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2965d88192730b0bbe74034a89bff6ed", "sha256": "1158c3fca3a1a079c776a5faf62ada6fd57c01fc515af998f25c7d2aade9d4cc" }, "downloads": -1, "filename": "dayu_path-0.2.tar.gz", "has_sig": false, "md5_digest": "2965d88192730b0bbe74034a89bff6ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11218, "upload_time": "2018-10-08T03:31:30", "url": "https://files.pythonhosted.org/packages/85/bb/4913355b0c42ac33e1b67701bb82a472531ae9d4e71c434b7732488d1c07/dayu_path-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "753beae5e9ac55538a6ed0fa78afba91", "sha256": "8892d650e980b5b72ac345224994f9588e12fc6e383e80946d1f7fef748486aa" }, "downloads": -1, "filename": "dayu_path-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "753beae5e9ac55538a6ed0fa78afba91", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11744, "upload_time": "2018-10-09T11:54:04", "url": "https://files.pythonhosted.org/packages/9f/0b/bddd2ba85bbc89603269ba538b8e269f0bae733ae2c4764355ebc0bd67c0/dayu_path-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "621c42947fa7965e491cc5e74aec511a", "sha256": "0ded26fb71134316363bdadc1ede96ae5a728f8dbfe6e831105b4385244d9dee" }, "downloads": -1, "filename": "dayu_path-0.3.tar.gz", "has_sig": false, "md5_digest": "621c42947fa7965e491cc5e74aec511a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11319, "upload_time": "2018-10-09T11:54:05", "url": "https://files.pythonhosted.org/packages/24/c5/42f6a72441f4893f607e7188ee5ebd80a5779a2f60edcadbd96790ef0b36/dayu_path-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "2c536048d0352b60fa56f2890fc3ab18", "sha256": "56d89e78053ff7fda7a6b0a681c5fcfb519237b2aa658ae02d8be14801fb5731" }, "downloads": -1, "filename": "dayu_path-0.3.1.tar.gz", "has_sig": false, "md5_digest": "2c536048d0352b60fa56f2890fc3ab18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9853, "upload_time": "2019-01-10T09:00:55", "url": "https://files.pythonhosted.org/packages/2e/0a/f29c048808a4aa54e439a23561dd168878602bae9fedf1e04da3ae1c53f8/dayu_path-0.3.1.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "cc4a5a49d95a63b45efd40a341415f9c", "sha256": "7b02d78d7e3b5cf454ef6058f0b20415f1f202a3b8e011930ad143a6be64c3a1" }, "downloads": -1, "filename": "dayu_path-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cc4a5a49d95a63b45efd40a341415f9c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9720, "upload_time": "2019-02-03T04:13:31", "url": "https://files.pythonhosted.org/packages/7c/4e/b3f1cf758b6db290ddd14bf8e1c95fdb18e12a0c8c97eb1f2255edf44cf6/dayu_path-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2f30af17e1b8968488699ddfd280e35c", "sha256": "912b0d6461466e13c5500e7a4649bc72904abd7590fd2da03905ceddfee95b40" }, "downloads": -1, "filename": "dayu_path-0.4.1.tar.gz", "has_sig": false, "md5_digest": "2f30af17e1b8968488699ddfd280e35c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13593, "upload_time": "2019-02-03T04:13:34", "url": "https://files.pythonhosted.org/packages/c7/59/f54a08e4720584e3ef30b419a3bc9993eaadfcbde5cdf1b017147b5040b6/dayu_path-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "8ec74e37d4aeabba82f49d690b958df7", "sha256": "7d6489ad6a89d08b9468f4b866bf6ba75acccded68dbd20d7bcd7b392675447b" }, "downloads": -1, "filename": "dayu_path-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8ec74e37d4aeabba82f49d690b958df7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9734, "upload_time": "2019-02-25T11:18:06", "url": "https://files.pythonhosted.org/packages/07/e3/83a6635f3fe685d667530e68353fdaa493c6e9cad1fb698280c816df75a6/dayu_path-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3c7cc1617197ac4e2e7a14a9be7eb61", "sha256": "17144f240583e99a25fa10c48442869e52f70e63d2110d88e4611761558b6649" }, "downloads": -1, "filename": "dayu_path-0.4.2.tar.gz", "has_sig": false, "md5_digest": "a3c7cc1617197ac4e2e7a14a9be7eb61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13620, "upload_time": "2019-02-25T11:18:08", "url": "https://files.pythonhosted.org/packages/dd/62/9cb377fc167abbe40ccf670c21659dbdf1511eb3e291e31d3021b10aa0a0/dayu_path-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "08deb7017c14ff5d0ba53898e0acde21", "sha256": "11e0ae8c56e1943ab991e7df117aebbb1c389cf5c97f9de90ae9f5b5e0df30d5" }, "downloads": -1, "filename": "dayu_path-0.4.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "08deb7017c14ff5d0ba53898e0acde21", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9750, "upload_time": "2019-02-28T07:52:37", "url": "https://files.pythonhosted.org/packages/c5/ba/267fc79752773152c1efe4087573f41a933a25a6d562978d88f993babd4c/dayu_path-0.4.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c2859621039a88ca0778fc9c15f2558d", "sha256": "e0f22ba87747e711534328ef9801815857fe1a15bf3c509c6a0b2bbec72604bd" }, "downloads": -1, "filename": "dayu_path-0.4.3.tar.gz", "has_sig": false, "md5_digest": "c2859621039a88ca0778fc9c15f2558d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13637, "upload_time": "2019-02-28T07:52:40", "url": "https://files.pythonhosted.org/packages/9d/29/19a64896c7a1514a33ead38c06cba7678051a0ae39ceb7e05eb1e255810f/dayu_path-0.4.3.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "9ade9a02a5a8e9f1e3c6105eaa5e9c4d", "sha256": "93d22cdc9b7ea759aaa79b8df55912808d04c1e07989f32dc512667089ef10cc" }, "downloads": -1, "filename": "dayu_path-0.5.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9ade9a02a5a8e9f1e3c6105eaa5e9c4d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13322, "upload_time": "2019-05-20T15:02:12", "url": "https://files.pythonhosted.org/packages/65/cc/499b68d917305479db046a233a518365881148b6f5e2921c4924630c38eb/dayu_path-0.5.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9205e2ea6fb60a53ab6a3d4cbfa724c2", "sha256": "06e41e61f56fe48b4723fd80d049b5a777699e87885005b1a4cc14a7151945ce" }, "downloads": -1, "filename": "dayu_path-0.5.1.tar.gz", "has_sig": false, "md5_digest": "9205e2ea6fb60a53ab6a3d4cbfa724c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11914, "upload_time": "2019-05-20T15:02:14", "url": "https://files.pythonhosted.org/packages/2a/f1/549de73afc3fb7ac1a052a277953420473a56443c684ea12660534231be3/dayu_path-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "6a577e7814bf85cc9d79189b66b3a2eb", "sha256": "d6d738ea8baaaaee4a4f246aaf7f3e60ab4e186a8803e7a82419fce1a818080f" }, "downloads": -1, "filename": "dayu_path-0.5.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6a577e7814bf85cc9d79189b66b3a2eb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13314, "upload_time": "2019-05-21T06:20:12", "url": "https://files.pythonhosted.org/packages/42/28/34d975bad55689e51885b95a6963b55ba901f8488a97f1cf72f1a29cdaa5/dayu_path-0.5.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a66f3015b5e9755e2eee57bf3940b9f", "sha256": "9cee18f7bf3235beacf43c077863de7eeda92d192e18a49f52a71ef73a32de40" }, "downloads": -1, "filename": "dayu_path-0.5.2.tar.gz", "has_sig": false, "md5_digest": "1a66f3015b5e9755e2eee57bf3940b9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11891, "upload_time": "2019-05-21T06:20:14", "url": "https://files.pythonhosted.org/packages/aa/07/229b2155728b38f6989efe8a361c7e26541079d4de976118066d625e6668/dayu_path-0.5.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6a577e7814bf85cc9d79189b66b3a2eb", "sha256": "d6d738ea8baaaaee4a4f246aaf7f3e60ab4e186a8803e7a82419fce1a818080f" }, "downloads": -1, "filename": "dayu_path-0.5.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6a577e7814bf85cc9d79189b66b3a2eb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13314, "upload_time": "2019-05-21T06:20:12", "url": "https://files.pythonhosted.org/packages/42/28/34d975bad55689e51885b95a6963b55ba901f8488a97f1cf72f1a29cdaa5/dayu_path-0.5.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a66f3015b5e9755e2eee57bf3940b9f", "sha256": "9cee18f7bf3235beacf43c077863de7eeda92d192e18a49f52a71ef73a32de40" }, "downloads": -1, "filename": "dayu_path-0.5.2.tar.gz", "has_sig": false, "md5_digest": "1a66f3015b5e9755e2eee57bf3940b9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11891, "upload_time": "2019-05-21T06:20:14", "url": "https://files.pythonhosted.org/packages/aa/07/229b2155728b38f6989efe8a361c7e26541079d4de976118066d625e6668/dayu_path-0.5.2.tar.gz" } ] }