{ "info": { "author": "riag", "author_email": "riag@163.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": "# pywslpath\nwindows \u548c WSL \u7684\u8def\u5f84\u4e92\u76f8\u8f6c\u6362\uff0c\u4ee5\u53ca\u83b7\u53d6 windows \u4e0b\u7684\u7cfb\u7edf\u76ee\u5f55\n\n## \u5b89\u88c5\n\u4f7f\u7528 setuptools \u6765\u5b89\u88c5\n\n```\npython3 setup.py install\n```\n\n\u6216\u8005\u4f7f\u7528 pip \u6765\u5b89\u88c5\n\n```\npip3 install pywslpath\n```\n\n## \u7528\u6cd5\n\u56e0\u4e3a\u8be5\u811a\u672c\u652f\u6301\u628a WSL Linux \u4e0b\u7684\u6240\u6709\u8def\u5f84\u8f6c\u6210 Windows,\n\u6240\u4ee5\u8981\u8bbe\u7f6e `WSL_ROOTFS_DIR` \u73af\u5883\u53d8\u91cf\uff0c\u6307\u5411\u5f53\u524d WSL Linux \u5b89\u88c5\u7684\u8def\u5f84\n\n```\npywslpath [OPTIONS] [PATH]\n```\n\n\u53c2\u6570\n```\n-w : \u8f93\u51fa windows \u683c\u5f0f\u7684\u8def\u5f84\n-d/--doubledash-path : \u53cc `\\`, \u53ea\u6709\u4f7f\u7528 -w \u53c2\u6570\u624d\u6709\u6548,\n \u8fd9\u4e2a\u53c2\u6570\u4e00\u822c\u5728 linux \u7684 shell \u91cc\u4f7f\u7528\n-u : \u8f93\u51fa linux \u683c\u5f0f\u7684\u8def\u5f84\n--desktop : \u83b7\u53d6 windows \u7684 DESKTOP \u8def\u5f84\n--appdata : \u83b7\u53d6 windows \u7684 ApplicationData \u8def\u5f84\n--localappdata : \u83b7\u53d6 windows \u7684 LocalApplicationData \u8def\u5f84\n--temp : \u83b7\u53d6 windows \u7684 TEMP \u8def\u5f84\n--sysdir : \u83b7\u53d6 windows \u7684 System \u8def\u5f84\n--windir : \u83b7\u53d6 windows \u7684 Windows \u8def\u5f84\n--start-menu : \u83b7\u53d6 windows \u7684 StartMenu \u8def\u5f84\n--startup : \u83b7\u53d6 windows \u7684 Startup \u8def\u5f84\n--home : \u83b7\u53d6 windows \u7684\u5f53\u524d\u7528\u6237\u8def\u5f84\n--program-files : \u83b7\u53d6 windows \u7684 ProgramFiles \u8def\u5f84\n```\n\n\u4f8b\u5b50\n```\npywslpath -w -d /mnt/c/\n\npywslpath -w -d test\n\npywslpath -w -d --localappdata\n\npywslpath -u c:/Windows\npywslpath -u c:\\\\Windows\npywslpath -u \"c:\\Windows\"\n```\n\n## \u4f7f\u7528\u573a\u666f\n### \u652f\u6301\u4f7f\u7528 windows \u8def\u5f84\u8fdb\u884c cd\n\u5728 zsh/bash \u91cc\u5b9a\u4e49\u4ee5\u4e0b\u51fd\u6570\n```\nfunction wd(){\n\tp=`pywslpath -u $1`\n\tcd $p\n}\n```\n\n`wd` \u51fd\u6570\u652f\u6301\u4f7f\u7528 windows \u8def\u5f84\u8fdb\u884c cd\n\n\n### \u6253\u5f00\u6587\u4ef6\n\u53ef\u4ee5\u5728 WSL Linux \u4e0b\u8c03\u7528 windows \u4e0b \u7684 VSCode/Atom \u7f16\u8f91\u5668\u6253\u5f00\u6587\u4ef6, \u5728 zsh/bash \u91cc\u5b9a\u4e49\u4ee5\u4e0b\u51fd\u6570\n```\nVSCODE_BIN='code'\n\nfunction vc(){\n\tp=`pywslpath -w -d $1`\n\t$VSCODE_BIN -r $p\n}\nfunction vcn(){\n\tp=`pywslpath -w -d $1`\n\t$VSCODE_BIN -n $p\n}\n\n\nwin_local_appdata_winpath=`pywslpath -w -d --localappdata`\nATOM_BIN_WINPATH=\"$win_local_appdata_winpath\\\\atom\\\\atom.exe\"\nfunction ac(){\n\tp=`pywslpath -w -d $1`\n\tpowershell.exe \"Start-Process -FilePath \\\"$ATOM_BIN_WINPATH\\\" -ArgumentList \\\"$p\\\"\"\n}\n\nfunction acn(){\n\tp=`pywslpath -w -d $1`\n\tpowershell.exe \"Start-Process -FilePath \\\"$ATOM_BIN_WINPATH\\\" -ArgumentList \\\"-n\\\", \\\"$p\\\"\"\n}\n```\n\n### \u5176\u4ed6\n\u4f7f\u7528 windows \u9ed8\u8ba4\u7684\u8f6f\u4ef6\u6253\u5f00\u76ee\u5f55\u6216\u8005\u6587\u4ef6, \u5728 zsh/bash \u91cc\u5b9a\u4e49\u4ee5\u4e0b\u51fd\u6570\n```\nfunction open(){\n\tif [ \"$1\" = \"--help\" ];then\n\t\tpywslpath $1\n\t\treturn\n\tfi\n\tp=`pywslpath -w -d $1`\n\tpowershell.exe start \"\\\"$p\\\"\"\n}\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/riag/pywslpath", "keywords": "", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "pywslpath", "package_url": "https://pypi.org/project/pywslpath/", "platform": "linux", "project_url": "https://pypi.org/project/pywslpath/", "project_urls": { "Homepage": "https://github.com/riag/pywslpath" }, "release_url": "https://pypi.org/project/pywslpath/0.3.2/", "requires_dist": [ "click (>=7.0)" ], "requires_python": "", "summary": "Converts Unix and Windows format paths in WSL", "version": "0.3.2" }, "last_serial": 5317851, "releases": { "0.3.1": [ { "comment_text": "", "digests": { "md5": "c787362d0bc0b211a9813502c1728a6f", "sha256": "909b2083bdac2bb57bc98a0c3321162b3fcdb6ca3926255b283d519f59ce960c" }, "downloads": -1, "filename": "pywslpath-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c787362d0bc0b211a9813502c1728a6f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8899, "upload_time": "2019-05-25T07:33:45", "url": "https://files.pythonhosted.org/packages/3a/8d/1edc077dacd93944e3ee0be65b77f627e4b282ef81946a9622d1bda7a803/pywslpath-0.3.1-py3-none-any.whl" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "c73a8b8478d2a37cc92edcafbe85fc5a", "sha256": "e0940d4693987c415ccceb0208ebf8c51bd5805212209ba8af1a78dbad9229ab" }, "downloads": -1, "filename": "pywslpath-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c73a8b8478d2a37cc92edcafbe85fc5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8911, "upload_time": "2019-05-26T04:27:40", "url": "https://files.pythonhosted.org/packages/08/8b/ef39357a10420f718fb5b4406a459e0806a7ecce9a29b8229f2eb9b66860/pywslpath-0.3.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c73a8b8478d2a37cc92edcafbe85fc5a", "sha256": "e0940d4693987c415ccceb0208ebf8c51bd5805212209ba8af1a78dbad9229ab" }, "downloads": -1, "filename": "pywslpath-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c73a8b8478d2a37cc92edcafbe85fc5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8911, "upload_time": "2019-05-26T04:27:40", "url": "https://files.pythonhosted.org/packages/08/8b/ef39357a10420f718fb5b4406a459e0806a7ecce9a29b8229f2eb9b66860/pywslpath-0.3.2-py3-none-any.whl" } ] }